Commit 88fdbfb
MOB-48124: Fix isFirstLevelStep to walk ancestor chain, not just check parent
Root-caused via a diagnostic reporter build with per-hook debug logging
(sandbox only): when a whole-test timeout fires while a test.step() loop
is still running, Playwright can attribute still-executing test.step()
calls to its own teardown fixture (e.g. "Fixture \"context\"") as their
parent, instead of null. isFirstLevelStep() previously treated any
non-null parent as nesting, silently dropping these steps from STEP
granularity even though they were never actually nested under another
test.step(). Now walks the full ancestor chain and only disqualifies a
step if a genuine test.step ancestor is found, ignoring hook/fixture
ancestors. Verified via deterministic reproduction: a step with a
corrupted "Fixture \"context\"" parent is now correctly still reported.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 2bb5506 commit 88fdbfb
1 file changed
Lines changed: 10 additions & 4 deletions
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
207 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
208 | 212 | | |
209 | 213 | | |
210 | 214 | | |
211 | 215 | | |
212 | | - | |
213 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
214 | 220 | | |
215 | 221 | | |
216 | 222 | | |
| |||
0 commit comments