Commit 08d44f1
fix(test): stabilize flaky EventReplay inline onboarding test (#111902)
The `ReplayInlineOnboardingPanel` component is loaded via
`React.lazy()`, creating an async code-splitting boundary. Inside that
lazy-loaded component, `usePrompt` calls `useApiQuery` (React Query),
adding another async data-fetching boundary. The combination of these
two async layers occasionally exceeded the `findByText` default timeout
in CI, causing the test to flake.
This PR mocks the `replayInlineOnboardingPanel` module (a pattern
already used for `replayClipPreview`) and asserts on a `data-test-id`
instead of the rendered text.
Fixes REPLAY-879
~Note that CI Jest tests are failing because the
https://github.com/getsentry/sentry/labels/Frontend%3A%20Rerun%20Flaky%20Tests
label is causing _other_, still-flaky tests to be run.~ No longer
applicable now that this is targeting `master` and #111860 is not yet
merged.
Made with [Cursor](https://cursor.com)1 parent d3ec18c commit 08d44f1
1 file changed
+7
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
33 | 38 | | |
34 | 39 | | |
35 | 40 | | |
| |||
136 | 141 | | |
137 | 142 | | |
138 | 143 | | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | 144 | | |
144 | 145 | | |
145 | | - | |
146 | | - | |
147 | | - | |
| 146 | + | |
148 | 147 | | |
149 | 148 | | |
150 | 149 | | |
| |||
0 commit comments