Skip to content

test(ui): cover the dialog contract of the access dialogs - #1243

Merged
TheMeinerLP merged 2 commits into
mainfrom
test/access-dialog-contract
Nov 23, 2026
Merged

TheMeinerLP merged 2 commits into
mainfrom
test/access-dialog-contract

Conversation

@TheMeinerLP

Copy link
Copy Markdown

Description

The access dialogs (member, confirm, machine, team, user, password reset, SSO provider) were moved onto the shared dialog component, but only some had tests for the shared dialog behaviour. This adds one table-driven test that holds all of them to the same contract: named by heading, focus in and back, Escape closes, at most one filled button, and no fixed heading id on the machine dialog. Covers task 4.2 of unify-dialogs-menus-and-feedback for the dialogs; no production code changes.

Type of change

  • test - tests only

How was this tested?

  • npx vitest run src/components/access/accessDialogs.contract.test.ts (36 passed)
  • npx vitest run full frontend suite on main before the change: 424 files, 7383 tests passed
  • npx vitest run src/anchors src/style-gate (211 passed)
  • npm run typecheck clean

Checklist

  • Commit messages follow the Conventional Commits convention
  • Tests cover the change
  • ./gradlew build passes locally (frontend only, no backend change)
  • Existing copyright headers are preserved; new files carry the appropriate header
  • No credentials, tokens or personal data are included in the diff

The seven access dialogs sit on the shared dialog component, but only
some of them asserted the shared behaviour. One table-driven test now
checks that each is named by its heading, takes focus on open, gives it
back on close, closes on Escape and has at most one filled button, and
that two machine dialogs never share a heading id.

Signed-off-by: TheMeinerLP <github@themeinerlp.dev>
The mount results are already typed as VueWrapper, so the casts only
tripped no-unnecessary-type-assertion.

Signed-off-by: TheMeinerLP <github@themeinerlp.dev>
@TheMeinerLP
TheMeinerLP force-pushed the test/access-dialog-contract branch from 1704e65 to a14b783 Compare November 23, 2026 07:15
@TheMeinerLP
TheMeinerLP added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit f76836b Nov 23, 2026
39 checks passed
@TheMeinerLP
TheMeinerLP deleted the test/access-dialog-contract branch November 23, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant