test(web): accept remaining timeout budget in diagnostics
Merged
SH
20d ago+4+4+0123456789-1-1-0123456789
- Accept a remaining Playwright timeout above 1500 ms and at most 2000 ms instead of requiring exactly 2000 ms. Deadline setup can legitimately leave 1999 ms; the lower bound still catches a tap that gives up early.
- Check the error prefix before parsing, while retaining the missing-locator diagnostic,
NOT_ACTIONABLE/ nonretryable result and 3500 ms elapsed-time bound. Only the existing test changes.
Issue
Fixes #1689.
Verified
Ran it locally: yes
The original main assertion failed on a valid 1999 ms diagnostic in CI. The revised assertion passed the complete web package suite in real Chromium:
Test Files 75 passed (75)
Tests 784 passed | 1 skipped (785)
For a negative control, changed only the locator evaluateHandle timeout to Math.max(1, Math.floor(remaining() / 2)):
| Assertion | Same half-budget mutation |
|---|---|
| Previous PR assertion | 83 passed |
| Revised assertion | 82 passed; 1 failed: expected 1000 to be greater than 1500 |
Restored production code and rebuilt; the revised case passed. pnpm check also passed.