diff --git a/app/component-library/components/Badges/Badge/foundation/BadgeBase/BadgeBase.test.tsx b/app/component-library/components/Badges/Badge/foundation/BadgeBase/BadgeBase.test.tsx index 97e01db987a..3aa3f2da9b0 100644 --- a/app/component-library/components/Badges/Badge/foundation/BadgeBase/BadgeBase.test.tsx +++ b/app/component-library/components/Badges/Badge/foundation/BadgeBase/BadgeBase.test.tsx @@ -1,6 +1,6 @@ // Third party dependencies. import React from 'react'; -import { shallow } from 'enzyme'; +import { render, screen } from '@testing-library/react-native'; // External dependencies. import Tag from '../../../../Tags/Tag'; @@ -11,26 +11,24 @@ import { BADGE_BASE_TEST_ID } from './BadgeBase.constants'; describe('BadgeBase - snapshots', () => { it('should render badge correctly', () => { - const wrapper = shallow( + const { toJSON } = render( , ); - expect(wrapper).toMatchSnapshot(); + expect(toJSON()).toMatchSnapshot(); }); }); describe('BadgeBase', () => { it('should render badge with the given content', () => { - const wrapper = shallow( + render( , ); - const contentElement = wrapper.findWhere( - (node) => node.prop('testID') === BADGE_BASE_TEST_ID, - ); - expect(contentElement.exists()).toBe(true); + const contentElement = screen.getByTestId(BADGE_BASE_TEST_ID); + expect(contentElement).toBeTruthy(); }); }); diff --git a/app/component-library/components/Badges/Badge/foundation/BadgeBase/__snapshots__/BadgeBase.test.tsx.snap b/app/component-library/components/Badges/Badge/foundation/BadgeBase/__snapshots__/BadgeBase.test.tsx.snap index fb897f11534..29259829b8c 100644 --- a/app/component-library/components/Badges/Badge/foundation/BadgeBase/__snapshots__/BadgeBase.test.tsx.snap +++ b/app/component-library/components/Badges/Badge/foundation/BadgeBase/__snapshots__/BadgeBase.test.tsx.snap @@ -5,8 +5,34 @@ exports[`BadgeBase - snapshots should render badge correctly 1`] = ` style={{}} testID="badge-base" > - + + + Children + + `; diff --git a/app/component-library/components/Sheet/SheetBottom/SheetBottom.test.tsx b/app/component-library/components/Sheet/SheetBottom/SheetBottom.test.tsx index ecd5e42ca89..d07baa73969 100644 --- a/app/component-library/components/Sheet/SheetBottom/SheetBottom.test.tsx +++ b/app/component-library/components/Sheet/SheetBottom/SheetBottom.test.tsx @@ -1,6 +1,6 @@ // Third party dependencies. import React from 'react'; -import { shallow } from 'enzyme'; +import { render } from '@testing-library/react-native'; import { Platform, View } from 'react-native'; // Internal dependencies. @@ -38,11 +38,11 @@ describe('SheetBottom', () => { const platforms = [PlatformEnum.iOS, PlatformEnum.Android]; test.each(platforms)('should render correctly on %s', (platform) => { Platform.OS = platform; - const wrapper = shallow( + const { toJSON } = render( , ); - expect(wrapper).toMatchSnapshot(platform); + expect(toJSON()).toMatchSnapshot(platform); }); -}); +}); \ No newline at end of file diff --git a/app/component-library/components/Sheet/SheetBottom/__snapshots__/SheetBottom.test.tsx.snap b/app/component-library/components/Sheet/SheetBottom/__snapshots__/SheetBottom.test.tsx.snap index 3d462325bf6..8a9b20d3f15 100644 --- a/app/component-library/components/Sheet/SheetBottom/__snapshots__/SheetBottom.test.tsx.snap +++ b/app/component-library/components/Sheet/SheetBottom/__snapshots__/SheetBottom.test.tsx.snap @@ -1,9 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`SheetBottom should render correctly on android: android 1`] = ` - - - - - - - + } + /> + + + `; exports[`SheetBottom should render correctly on ios: ios 1`] = ` - - - - - - - + } + /> + + + `;