11 Commits

Author SHA1 Message Date
psmyrdek 9bdc69bfa9 test(e2e): query module 0 in list detail test
The shared e2e auth account is only enrolled in module 0 (prework), so
module 1 is locked and now returns lessons: [] after the locked-module
mask. Point the list-detail test at module 0 to match what the account
can actually see.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 16:44:49 +02:00
psmyrdek 95a8d4ec5e test(e2e): stop logging third-party recipients in resend poller
The first-poll diagnostic dumped the 5 most recent emails from the
shared Resend account, including their `to` field, leaking unrelated
customer addresses into CI logs. Replace with a counts-only summary
and drop the recipient from the timeout error message.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 15:56:54 +02:00
psmyrdek 43710470c9 test(e2e): align list/get fixtures with prework-enabled catalog
list now returns module 0 (prework) first, and the shared test account
is only enrolled in module 0 — switch the get fixtures from m1l1 to
m0l1 and update the list assertion to expect module 0 at index 0.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-16 15:32:13 +02:00
“mkczarkowski” 56560edbdc fix(e2e): gracefully skip tests on auth rate-limit instead of failing
When the backend rate-limits magic-link requests (e.g. from CI re-runs),
tests now skip with a clear message rather than hard-failing the entire
suite. AuthRateLimitedError is caught in beforeAll and sets authSkipped
flag that each test checks.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-10 16:01:26 +02:00
“mkczarkowski” c34e5f7020 fix(e2e): avoid rate-limit by reusing shared auth singleton
auth-flow.test.ts now uses ensureSharedAuth() (single login per run)
and verifies the resulting auth.json, rather than triggering a
duplicate login that gets rate-limited by the backend.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-10 15:55:37 +02:00
“mkczarkowski” 11bbfc6517 fix(e2e): include stdout in earlyExit error for JSON mode diagnostics
In --json mode the error envelope goes to stdout, not stderr. The
earlyExit handler now reports both streams so CI failures show the
actual API error message.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-10 15:53:00 +02:00
“mkczarkowski” 06d841f27a fix(e2e): review fixes — kill timer, fetch check, temp cleanup, earlyExit race
- cli.ts: add 60s kill timer to spawnCli, export cleanupTempDirs()
- auth-flow.test.ts: add earlyExit Promise.race + callback response check
- auth-setup.ts: check callback response status
- doctor.test.ts: use getE2EEnv().testEmail instead of hardcoded string
- all test files: add afterAll(cleanupTempDirs) hooks
- reviews/impl-review.md: save full review report

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-10 15:31:42 +02:00
“mkczarkowski” b12e8ff572 feat(e2e): authenticated command tests — doctor, list, get (p4)
Files: tests/e2e/doctor.test.ts, tests/e2e/list.test.ts,
tests/e2e/get.test.ts, tests/e2e/support/auth-setup.ts,
context/changes/e2e/plan.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-10 15:08:27 +02:00
“mkczarkowski” d97ed75678 feat(e2e): auth flow e2e test with Resend magic-link verification (p3)
Files: tests/e2e/auth-flow.test.ts, tests/e2e/support/auth-setup.ts,
context/changes/e2e/plan.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-10 14:49:37 +02:00
“mkczarkowski” 9ec3798294 feat(e2e): auth-free e2e tests — global flags and unauthenticated auth (p2)
Files: tests/e2e/global-flags.test.ts, tests/e2e/auth-no-credentials.test.ts,
context/changes/e2e/plan.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-10 14:36:09 +02:00
“mkczarkowski” 40454c4eca feat(e2e): e2e infrastructure — spawn helper, Resend utility, env config (p1)
Files: tests/e2e/support/cli.ts, tests/e2e/support/env.ts,
tests/e2e/support/resend-magic-links.ts, tests/e2e/.env.test.example,
.gitignore, context/changes/e2e/{change,research,plan}.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-10 14:33:13 +02:00