Skip to content

Conversation

@rdott
Copy link
Contributor

@rdott rdott commented Aug 24, 2021

...RangeSlider and ConnectedFilter

WHY are these changes introduced?

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

For the following component tests:

  • Pane
  • Section
  • PositionedOverlay
  • SingleThumb
  • RangeSlider
  • ConnectedFilter

WHAT is this pull request doing?

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

@github-actions
Copy link
Contributor

size-limit report

Path Size
cjs 142.82 KB (0%)
esm 96.55 KB (0%)
esnext 139.59 KB (0%)
css 33.77 KB (0%)

@rdott rdott marked this pull request as ready for review August 24, 2021 20:32
@rdott rdott requested review from a team and debchn August 24, 2021 20:32
Copy link
Contributor

@debchn debchn left a comment

Choose a reason for hiding this comment

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

2 nits, one question that also applies to the old test. None blocking. Thanks for doing this!

Comment on lines +116 to +118
expect(positionedOverlay).toContainReactComponent('div', {
style: expect.objectContaining({left: 0, right: undefined}),
});
Copy link
Contributor

Choose a reason for hiding this comment

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

This reads so much better 👏


expect(expected).toStrictEqual(actual || {});
expect(element).toContainReactComponent('div', {
style: expect.objectContaining(expected) || {},
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you know what's going on here? Why expected || {} -- shouldn't it just be expected?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah looking back at it I think you're right, there's no reason to expect anything else.

@rdott rdott merged commit 6e72064 into main Aug 25, 2021
@rdott rdott deleted the test-mod/pane branch August 25, 2021 14:57
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