Commit 569cfcc
[Discover][Metrics] Fix flaky fullscreen interaction Scout test (elastic#270775)
## Summary
Fixes the flaky `fullscreen.spec.ts` Scout test ("should interact with
metrics in fullscreen mode").
**Two failure modes were identified:**
1. **Chrome header interception** (~65 failures, Apr 3–18): Already
fixed by PR elastic#264932 which added `chromeHeader.waitFor({ state: 'hidden'
})` to `toggleFullscreen()`. No recurrence since.
2. **`viewDetails` action not found** (2 failures, May 20): After
`clearSearch()`, the grid re-renders with the full unfiltered metric
set. The test immediately opened the context menu without waiting for
the grid to settle — the Lens embeddable hadn't finished re-mounting and
registering its actions.
**Fix:** Add `await
expect(metricsExperience.pagination.container).toBeVisible()` after
`clearSearch()` to wait for the grid to finish re-rendering before
opening the context menu. This matches the pattern used in
`grid.navigation.spec.ts`.
Closes elastic#261199
## Test plan
- [ ] Run `node scripts/scout run-tests --arch stateful --domain classic
--testFiles
src/platform/plugins/shared/discover/test/scout/ui/parallel_tests/metrics_experience/fullscreen.spec.ts`
locally
- [ ] Verify CI passes on stateful and serverless targets
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 974c42a commit 569cfcc
3 files changed
Lines changed: 43 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| 85 | + | |
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
| |||
148 | 150 | | |
149 | 151 | | |
150 | 152 | | |
| 153 | + | |
151 | 154 | | |
152 | 155 | | |
153 | 156 | | |
| |||
289 | 292 | | |
290 | 293 | | |
291 | 294 | | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
296 | 324 | | |
297 | 325 | | |
298 | 326 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
11 | 19 | | |
12 | 20 | | |
13 | 21 | | |
| |||
142 | 150 | | |
143 | 151 | | |
144 | 152 | | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
| 153 | + | |
149 | 154 | | |
150 | 155 | | |
151 | 156 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| |||
0 commit comments