Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
💚 [#445] Fix flakiness in Chromatic/interaction tests
Doing a click + ArrowDown on a react select seems to have a race condition where sometimes the *next* option gets 'focus', resulting in it being higlighted with a different color, which in turn trips the Chromatic snapshots as it's toggling between which option is focused. Replacing this with an explicit focus + ArrowDown causes the menu to open and seems to avoid the race condition. The click used to be required in older versions of testing library and react-select to properly focus the input/select when the browser window itself doesn't have focus, e.g. when live-reloading saved code in SB which would lead to a frustrating DX.
- Loading branch information