Skip to content

test(ui): cover the dialog contract of the settings dialogs - #1257

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

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

Conversation

@TheMeinerLP

Copy link
Copy Markdown

Description

The settings dialogs were already moved onto the shared dialog, but two of them (conflict and delete entry) were only checked in parts. This adds one contract test that holds every dialog to the same rules: it is named by its heading, takes focus when it opens, gives it back when it closes, closes on Escape and shows at most one filled button. The other settings dialogs, the wizard, the review sheet and the download menu already cover these rules in their own test files. Part of task 4.4 of unify-dialogs-menus-and-feedback. Test only, no visible change.

Type of change

  • test - tests only

How was this tested?

  • npx vitest run src/components/settings/settingsDialogs.contract.test.ts: 10 passed
  • npx vitest run src/anchors src/style-gate: 211 passed

Checklist

  • Commit messages follow the Conventional Commits convention documented in CLAUDE.md
  • Tests cover the change, or the change is not testable and I explained why above
  • ./gradlew build passes locally: not applicable, frontend test only
  • Documentation and configuration samples are updated if the change is user-facing: not user-facing
  • Existing copyright headers are preserved; new files carry the appropriate header
  • No credentials, tokens or personal data are included in the diff

The conflict and delete entry dialogs had no shared check for name,
focus, Escape and the single filled button. The other settings dialogs,
the wizard, the review sheet and the download menu already assert these
rules in their own test files.

Signed-off-by: TheMeinerLP <github@themeinerlp.dev>
Cast the dialog components to Component so the linter no longer sees
error typed values, and drop the redundant wrapper assertion.

Signed-off-by: TheMeinerLP <github@themeinerlp.dev>
@TheMeinerLP
TheMeinerLP force-pushed the test/settings-dialog-contract branch from ed519d4 to fbec26d Compare November 23, 2026 07:45
@TheMeinerLP
TheMeinerLP added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit 6c340e7 Nov 23, 2026
39 checks passed
@TheMeinerLP
TheMeinerLP deleted the test/settings-dialog-contract branch November 23, 2026 08:26
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