Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Jul 14, 2021

WHY are these changes introduced?

I am updating existing tests for Message, Menu, Search, SearchDismissOverlay, SearchField, UserMenu and TopBar components to use the new modern framework.

WHAT is this pull request doing?

Part of test modernization (https://docs.google.com/spreadsheets/d/1GBuEZbOpVYJLNISK7gL69DU8rCxocn5L5GYaKtPXPbU/edit#gid=1498187033), updating tests using {mountWithAppProvider} from 'test-utilities/legacy' to {mountWithApp} from 'test-utilities'.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 14, 2021

size-limit report

Path Size
cjs 142.53 KB (0%)
esm 96.3 KB (0%)
esnext 139.5 KB (0%)
css 33.75 KB (0%)

@ghost ghost force-pushed the polaris_topbar_tests branch 3 times, most recently from f29f4ee to d6809dd Compare July 14, 2021 16:28
@ghost ghost force-pushed the polaris_topbar_tests branch from d6809dd to 3075259 Compare July 14, 2021 19:52
it('renders with the given props', () => {
const userMenu = mountWithAppProvider(<UserMenu {...userMenuProps} />);
expect(userMenu.find(UserMenu).props()).toStrictEqual(userMenuProps);
const userMenu = mountWithApp(<UserMenu {...userMenuProps} />);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only big change that I am doing, but not sure if this makes sense to test that the props are being render.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me

@ghost ghost marked this pull request as ready for review July 14, 2021 19:54
@ghost ghost requested review from a team, AndrewMusgrave and andrewmcgov and removed request for AndrewMusgrave July 14, 2021 20:30
@ghost ghost requested a review from rdott July 22, 2021 18:56
Copy link
Contributor

@rdott rdott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of small comments, but otherwise it looks good!

Karen Pinzás Morrongiello and others added 2 commits August 10, 2021 09:57
Co-authored-by: Richard T <richard.todd@shopify.com>
Co-authored-by: Richard T <richard.todd@shopify.com>
@ghost ghost merged commit a21e70d into main Aug 10, 2021
@ghost ghost deleted the polaris_topbar_tests branch August 10, 2021 15:19
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants