Skip to content

Conversation

@rdott
Copy link
Contributor

@rdott rdott commented Aug 11, 2021

WHY are these changes introduced?

Updating existing tests to use the new modern framework and eliminate stale dependencies.

For the following component tests:

  • Scrollable
  • ScrollTo
  • ScrollLock
  • Select
  • SettingToggle
  • Sheet
  • Spinner
  • Sticky

WHAT is this pull request doing?

Part of test modernization, updating tests using {mountWithAppProvider} from 'test-utilities/legacy' to {mountWithApp} from 'test-utilities'

@rdott rdott requested review from a user and laucindy August 11, 2021 16:00
@rdott rdott changed the title Modernized tests - Scrollable, ScrollTo, ScrollLock, Select, SettingToggle, Sheet, Spinner, and Sticky components [Test Modernization] - Scrollable, ScrollTo, ScrollLock, Select, SettingToggle, Sheet, Spinner, and Sticky components Aug 11, 2021
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Looks good to me! I just left a question and I see that the CI is complaining around conflicts because this merge fest that we are having these days 🤪

const element = mountWithApp(
<Select label="Select" options={[]} onBlur={spy} onChange={noop} />,
);
element.find('select').simulate('focus');
Copy link

Choose a reason for hiding this comment

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

Here is not necessary to call onFocus?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think it's needed to focus on the event as we're just testing the callback when onBlur is triggered.

@github-actions
Copy link
Contributor

size-limit report

Path Size
cjs 142.51 KB (0%)
esm 96.27 KB (0%)
esnext 139.44 KB (0%)
css 33.74 KB (0%)

@rdott rdott merged commit b02b1e1 into main Aug 12, 2021
@rdott rdott deleted the test-mod/scroll branch August 12, 2021 18:34
lucabezerra pushed a commit that referenced this pull request Aug 16, 2021
…ingToggle, Sheet, Spinner, and Sticky components (#4386)

* Select tests modernized

* Test modernization for Scrollable, ScrollTo, ScrollLock, Select, SettingToggle, Sheet, Spinner, and Sticky
BPScott pushed a commit that referenced this pull request Aug 17, 2021
…ingToggle, Sheet, Spinner, and Sticky components (#4386)

* Select tests modernized

* Test modernization for Scrollable, ScrollTo, ScrollLock, Select, SettingToggle, Sheet, Spinner, and Sticky
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.

2 participants