Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Make item scroll tests more legible #554

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Make item scroll tests more legible #554

wants to merge 10 commits into from

Conversation

50Wliu
Copy link
Contributor

@50Wliu 50Wliu commented Jan 12, 2019

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

It really wasn't clear what these tests were doing before, which was partly because the width of each tab was not explicitly defined. The tests themselves were also wrong - scrollIntoView doesn't do anything if the item is at least partially visible. I've updated these tests to properly test that scrolling works as expected, and also updated scrollIntoView to use the new options listed at https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView.

Alternate Designs

None.

Benefits

The purpose of these tests should be more clear and the intended behavior more easy to follow.

Possible Drawbacks

None.

Applicable Issues

None.

@50Wliu
Copy link
Contributor Author

50Wliu commented Jan 12, 2019

Ah yes, good old "it works on my laptop now but not on CI".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant