[quarantine] dev-login.spec.ts — silently passes in CI without asserting #54

Closed
opened 2026-08-05 02:27:14 +00:00 by Mark · 1 comment
Owner

Quarantined under Mark/nodedesk#49 (Phase 2 quality gates).

Test location

  • File: tests/dev-login.spec.ts
  • Test: "dev login" (lines 4-27)

Reproduction

# Local (development mode) — button visible, test asserts
npm run dev &
npm run test:e2e:all -- tests/dev-login.spec.ts

# CI (production mode) — button hidden, test passes without asserting
NODE_ENV=production npm run test:e2e:all -- tests/dev-login.spec.ts

Failure mode

The "Developer Login (Bypass)" button only renders in NODE_ENV=development. CI builds with NODE_ENV=production, so the test takes the else branch (line 22-26), logs a message, and passes without asserting anything. It claims coverage it never provides.

Root cause

Conditional test logic that depends on runtime environment mode. The test should either run only in a dev-mode CI job, or explicitly test.skip with reason when the button is hidden.

Acceptance criteria for un-quarantine

  • Add a CI job that runs with NODE_ENV=development and includes this test, OR
  • Convert to conditional-skip pattern with explicit test.skip + reason when button is hidden, OR
  • Delete the test and rely on the dev-only manual login path.

References

  • Parent: #49 (quarantine tracking)
  • Epic: #38 (quality gates)
  • Audit: docs/ci/audit.md §3.5, P2-1
Quarantined under Mark/nodedesk#49 (Phase 2 quality gates). ## Test location - File: `tests/dev-login.spec.ts` - Test: "dev login" (lines 4-27) ## Reproduction ```bash # Local (development mode) — button visible, test asserts npm run dev & npm run test:e2e:all -- tests/dev-login.spec.ts # CI (production mode) — button hidden, test passes without asserting NODE_ENV=production npm run test:e2e:all -- tests/dev-login.spec.ts ``` ## Failure mode The "Developer Login (Bypass)" button only renders in `NODE_ENV=development`. CI builds with `NODE_ENV=production`, so the test takes the `else` branch (line 22-26), logs a message, and **passes without asserting anything**. It claims coverage it never provides. ## Root cause Conditional test logic that depends on runtime environment mode. The test should either run only in a dev-mode CI job, or explicitly `test.skip` with reason when the button is hidden. ## Acceptance criteria for un-quarantine - [ ] Add a CI job that runs with `NODE_ENV=development` and includes this test, OR - [ ] Convert to conditional-skip pattern with explicit `test.skip` + reason when button is hidden, OR - [ ] Delete the test and rely on the dev-only manual login path. ## References - Parent: #49 (quarantine tracking) - Epic: #38 (quality gates) - Audit: `docs/ci/audit.md` §3.5, P2-1
Author
Owner

Closed by fixup lane — deliverable verified on main

Implementation landed on origin/main and satisfies the acceptance criterion (option 2: conditional-skip pattern):

  • a279d63 fix(#54): dev-login e2e explicitly skips when dev button hidden
  • 9c554c9 docs(testing): mark dev-login no-op finding resolved (#54)

tests/dev-login.spec.ts now calls test.skip(reason) when the Developer Login (Bypass) button is hidden (lines 10-13), and the console.log fallback is removed — CI production builds report the test as skipped with a clear reason instead of silently passing. Verify gate evidence: gate 1 (test.skip present / no console.log) PASS, gate 2 (production build, playwright → "1 skipped") PASS, lint PASS.

The dev-mode e2e gate still trips a known pre-existing Turbopack first-compile race (family-14 redirect timeout — expect(page).toHaveURL(/\/app/) needs an explicit { timeout: 30000 }); that is a test-infra follow-up, not a blocker for this quarantine issue.

## Closed by fixup lane — deliverable verified on main Implementation landed on origin/main and satisfies the acceptance criterion (option 2: conditional-skip pattern): - `a279d63` fix(#54): dev-login e2e explicitly skips when dev button hidden - `9c554c9` docs(testing): mark dev-login no-op finding resolved (#54) `tests/dev-login.spec.ts` now calls `test.skip(reason)` when the Developer Login (Bypass) button is hidden (lines 10-13), and the `console.log` fallback is removed — CI production builds report the test as **skipped** with a clear reason instead of silently passing. Verify gate evidence: gate 1 (`test.skip` present / no `console.log`) PASS, gate 2 (production build, playwright → "1 skipped") PASS, lint PASS. The dev-mode e2e gate still trips a known pre-existing Turbopack first-compile race (family-14 redirect timeout — `expect(page).toHaveURL(/\/app/)` needs an explicit `{ timeout: 30000 }`); that is a test-infra follow-up, not a blocker for this quarantine issue.
Sign in to join this conversation.
No description provided.