atom / tabs

Tabs in Atom
MIT License
111 stars 118 forks source link

Make item scroll tests more legible #554

Open 50Wliu opened 5 years ago

50Wliu commented 5 years ago

Requirements

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 commented 5 years ago

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