You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 548f661
Browse filesBrowse the repository at this point in the historyBrowse files
test(dashboard): Pick e2e options through pickOption (#3925)
A list that closes on a pick, such as a select, a search, or the command
palette, closes with a transition. If a press on another control lands
before that transition ends, it can be lost. That race made the snooze
specs flaky (#3918).
This turns that fix into a shared rule. `pickOption(option)` in
`e2e/pick-option.ts` clicks the option and waits for it to hide. The
ast-grep rule `e2e-option-click-through-pick-option` makes dashboard e2e
specs pick options only through it, and its autofix rewrites a raw
option click. Every option pick in the specs now uses the helper. That
includes the search pick in `inbox-snoozes.spec.ts`, which is followed
at once by a click on the Event select: the same race.
The rule can't see an option locator that is held in a variable, so I
converted those calls by hand.
<!-- junior-request-attribution:start -->
via @dcramer.
<!-- junior-request-attribution:end -->
<!-- junior-session-footer:start -->
<!-- junior-conversation-id:slack%3AC0CHB3YHES2%3A1795218787.096889 -->
--
[View
Session](https://junior-prod.sentry.dev/conversations/slack%3AC0CHB3YHES2%3A1795218787.096889)
[[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC0CHB3YHES2%3A1795218787.096889/?project=4510944073809921)
<!-- junior-session-footer:end -->
Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: David Cramer <[email protected]>
message: "Pick a dashboard e2e option with pickOption from packages/junior-dashboard/e2e/pick-option.ts, not with a raw click. pickOption waits for the list to close. A list closes with a transition, and a press on another control before it ends can be lost, which makes the test flaky."
0 commit comments