Skip to content

test(console): cover the first-run wizard's CA reconfirm path - #195

Merged
Bugs5382 merged 3 commits into
mainfrom
test/193-ca-reconfirm
Oct 15, 2026
Merged

Bugs5382 merged 3 commits into
mainfrom
test/193-ca-reconfirm

Conversation

@Bugs5382

Copy link
Copy Markdown
Contributor

What and why

CaStep's already-registered branch (apps/console/src/components/first-run/ca-step.tsx) had no
test: the wizard's existing tests only exercise a fresh registration, so a regression in the
reconfirm path -- accepting a mismatched fingerprint, or never letting the operator continue --
would not be caught.

This adds a focused test file on the public component, covering:

  • the already-registered state shows the fingerprint to confirm, with Confirm disabled until a
    paste is entered
  • the right paste enables Confirm and reconfirms through a single RPC, without a new registration
  • a mismatched paste keeps Confirm disabled and explains why, and calls nothing
  • "Register a different CA" cancels the reconfirm and switches to a fresh registration form,
    registering nothing
  • a refused reconfirm surfaces inline and does not advance

I confirmed these tests actually catch a regression (temporarily loosening the Confirm button's
guard locally, watching two of them fail, then reverting) before finishing.

No production code changed.

Refs #193

Verification

  • Lint clean
  • Tests pass
  • Build succeeds
  • Documentation updated (if behavior or API changed)

How this was verified

  • npm run lint (eslint + prettier --check): clean.
  • npm run test across all workspaces: 790 console + 247 ui tests pass, including the new file's
    axe check.
  • npm run build across all workspaces: tsc + vite build succeed for console, tsc succeeds for ui.
  • node scripts/check-release-bundle.mjs apps/console/dist: release bundle clean.
  • No behavior or API changed; test-only, so no docs page needed updating.

CaStep's already-registered branch (ca-step.tsx) had no test: the wizard's
existing tests only exercise a fresh registration, so a regression here
(accepting a mismatched fingerprint, or never letting the operator continue)
would not have been caught.

Covers, through the public component: the already-registered state shows the
fingerprint and keeps Confirm disabled until a paste is entered; the right
paste enables Confirm and reconfirms without a new registration; a mismatch
keeps Confirm disabled and explains why; Register a different CA cancels the
reconfirm without registering anything; and a refused reconfirm surfaces
inline without advancing.

Refs #193

Signed-off-by: Bugs5382 <12115015+Bugs5382@users.noreply.github.com>
@Bugs5382
Bugs5382 marked this pull request as ready for review October 15, 2026 20:20
@github-actions github-actions Bot added the skip-changelog Excluded from release notes (chore/ci/test/style). label Oct 15, 2026
@Bugs5382
Bugs5382 enabled auto-merge (squash) October 15, 2026 23:35
@Bugs5382
Bugs5382 merged commit 985f322 into main Oct 15, 2026
9 checks passed
@Bugs5382
Bugs5382 deleted the test/193-ca-reconfirm branch October 15, 2026 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Excluded from release notes (chore/ci/test/style).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant