diff --git a/UNRELEASED.md b/UNRELEASED.md index 33b84027ace..8c1e5fd4f65 100644 --- a/UNRELEASED.md +++ b/UNRELEASED.md @@ -33,13 +33,14 @@ Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to f ### Code quality - Modernized tests for Avatar, Backdrop, Badge, Banner components([#4306](https://github.com/Shopify/polaris-react/pull/4306)) -- Modernized test for Card: Subsection, Header, Sections and Card ([#4325](https://github.com/Shopify/polaris-react/pull/4325)). +- Modernized tests for Card: Subsection, Header, Sections and Card ([#4325](https://github.com/Shopify/polaris-react/pull/4325)). - Modernized tests for Item, Panel, List, Tab, TabMeasurer (from Tabs components). ([#4313](https://github.com/Shopify/polaris-react/pull/4313)) - Modernized tests for Tooltip, Toast components([#4314](https://github.com/Shopify/polaris-react/pull/4314)) - Modernized tests for AccountConnection, ActionList components([#4316](https://github.com/Shopify/polaris-react/pull/4316)) - Modernized tests for ActionMenu and its subcomponents ([#4318](https://github.com/Shopify/polaris-react/pull/4318)) - Modernized tests for Loading-List-Item-Label components([#4321](https://github.com/Shopify/polaris-react/pull/4321)) -- Modernizes test for DiscardConfirmationModal, ContextualSaveBar, Loading, Toast, ToastManager, Frame (from Frame components) ([#4324](https://github.com/Shopify/polaris-react/pull/4324)) +- Modernized tests for DiscardConfirmationModal, ContextualSaveBar, Loading, Toast, ToastManager, Frame (from Frame components) ([#4324](https://github.com/Shopify/polaris-react/pull/4324)) +- Modernized tests for Truncate and UnstyledButton ([#4327](https://github.com/Shopify/polaris-react/pull/4327)). - Modernized tests for PageActions, Page and its components ([#4326](https://github.com/Shopify/polaris-react/pull/4326)) - Modernized tests for FormLayout and some components of ColorPicker ([#4330](https://github.com/Shopify/polaris-react/pull/4330)) - Modernized tests for Breadcrumbs, BulkActions, Button, ButtonGroup/Item, and ButtonGroup components([#4315](https://github.com/Shopify/polaris-react/pull/4315)) diff --git a/src/components/Truncate/tests/Truncate.test.tsx b/src/components/Truncate/tests/Truncate.test.tsx index 586c6c29caa..3c5ba54bd2b 100644 --- a/src/components/Truncate/tests/Truncate.test.tsx +++ b/src/components/Truncate/tests/Truncate.test.tsx @@ -1,12 +1,11 @@ import React from 'react'; -// eslint-disable-next-line no-restricted-imports -import {mountWithAppProvider} from 'test-utilities/legacy'; +import {mountWithApp} from 'test-utilities'; import {Truncate} from '../Truncate'; describe('', () => { it('renders its children', () => { - const truncate = mountWithAppProvider(Long text); - expect(truncate.contains('Long text')).toBe(true); + const truncate = mountWithApp(Long text); + expect(truncate).toContainReactText('Long text'); }); }); diff --git a/src/components/UnstyledButton/tests/UnstyledButton.test.tsx b/src/components/UnstyledButton/tests/UnstyledButton.test.tsx index f9fa1bf8b55..c2958269629 100644 --- a/src/components/UnstyledButton/tests/UnstyledButton.test.tsx +++ b/src/components/UnstyledButton/tests/UnstyledButton.test.tsx @@ -1,6 +1,5 @@ import React from 'react'; -// eslint-disable-next-line no-restricted-imports -import {mountWithAppProvider, trigger} from 'test-utilities/legacy'; +import {mountWithApp} from 'test-utilities'; import {UnstyledLink} from 'components'; import {UnstyledButton} from '../UnstyledButton'; @@ -11,33 +10,31 @@ describe('