Files
sencho/.github
Anso 3f2b5348be fix(e2e): stop a failed two-factor spec from cascading the whole suite (#2009)
The E2E suite runs serially against one shared admin account, so a spec that
leaves server-side state dirty breaks every spec scheduled after it. The
two-factor spec was the worst offender: it enrols, consumes backup codes, then
disables, and its cleanup only ran when the block had captured both a secret
and two unused backup codes, with every error swallowed. A test failing
mid-chain destroys exactly that state, so MFA stayed enrolled and each later
login stopped at the challenge screen, paying the full readiness timeout three
times per test with retries until the job hit its ceiling.

Playwright also retries a serial block as a whole in a new worker process, so
the retry could not re-enrol either: the enrol endpoint answers 409 for an
already-enrolled account and the group failed again.

Reset the enrolment from beforeAll and afterAll through the existing emergency
CLI, which is the only path that does not require possession of a second
factor. The block is now self-healing on a retry and cannot leak state.

Two supporting changes:

- loginAs now recognises the challenge screen and a login that never left the
  sign-in form, and names the cause instead of timing out. A cascade costs
  seconds per test and says what to do about it.
- The suite bounds itself in CI, so a cascade fails the test step while the job
  is still alive to upload the report. A job cancelled by its own timeout runs
  no further steps, which is why the previous runs produced no evidence at all.
  The job ceiling is raised above that bound as a backstop.
2026-09-26 13:13:56 -04:00
..