Files
doona/e2e
Zakk 0ed10b68c7 ci(check): fix two flaky e2e tests and trim the nightly run (#705)
## Problem / 问题

A CI audit of the last ~200 Check runs (owner's report) found two more
intermittent e2e failures and a wasteful schedule:

- `e2e/dashboard.spec.ts:160` failed on WebKit on 11-08, 11-24 and
11-25. It measured the dashboard while the dnsAnswers and policyGroups
cards could still be titles only, and the level-column check passed on
the half-loaded page.
- `e2e/qiangguo.spec.ts:12` failed twice on main. It could scroll while
the startup frame was showing. `heldScroll.ts` then restored that offset
and undid the scripted scroll to the top, as designed.
- 25 of 26 nightly runs re-ran `check` and all nine e2e shards on a main
head its push had already checked, about 510 job minutes a week.

## How I fixed it / 解决方法

- The dashboard test waits for every card's content and for no loading
state before measuring.
- The Qiangguo test waits for the page's loading states to clear before
scrolling.
- On the schedule, `changes` and `ci-ok` are skipped, so only `nightly`
(Firefox) runs. `notify-nightly` treats a skipped `ci-ok` as not failed.
Push, PR and manual dispatch behave as before.

Assertions are unchanged. `failOnFlakyTests` stays on.

## Verified / 验证

- `pnpm format:check`, `lint`, `typecheck` and `test` exit 0.
- e2e in the CI image (`playwright:v1.63.0-noble`) with `CI=1
--retries=0`:
- dashboard: before, 1/200 at 2 workers and 6/80 at 4; after, 300/300 at
2 and at 4 workers.
- Qiangguo: before, failed 6/6 with the CI error when the page chunk is
held back past the first scroll; after, 600/600 at 2 and at 4 workers,
and 20/20 with the chunk delayed 1.5 s.
- actionlint 1.7.7 reports nothing. The scheduled path has not run on
GitHub yet.
2026-11-25 21:47:50 +11:00
..