Skip to content

test(versioniq): cover the install and pin dialogs - #669

Merged
rubenvdlinde merged 1 commit into
developmentfrom
quality/test-coverage-js-0023cfc7-1
Nov 13, 2026
Merged

rubenvdlinde merged 1 commit into
developmentfrom
quality/test-coverage-js-0023cfc7-1

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Vitest specs for src/dialogs.

  • PinDialog.spec.ts (10 tests): PUT with trimmed optional reason and encoded app id, emits the stored pin for this app and closes, prefill/reset on open, refusal and thrown errors keep it open, field disabled while saving, cancel/dismiss write nothing
  • PinOverrideDialog.spec.ts (6 tests): texts, each button and dismiss resolve the right choice and close
  • ShaMismatchDialog.spec.ts (4 tests): both digests shown, only the accept button resolves true
  • DowngradeConfirmDialog.spec.ts (8 tests): transition, range, orphaned migration list / empty / unknown summaries, each answer and dismiss, buttons disabled while busy
  • EnableAppDialog.buttons.spec.ts (7 tests): enable needs a password and an idle caller, confirming keeps it open, cancel/dismiss, password forgotten on close

Only HTTP (../ocs), l10n and the Nextcloud Vue components are mocked. Each new spec was checked to fail when a dialog line is broken.

Line coverage: every file in src/dialogs is now 100% (was 33–71%); JS total 74.2% → 76.1%.
Suite (vitest run): before 44 files / 2730 tests passing; after 49 files / 2765 tests passing. eslint clean on the new files.

Tests only; no production code changed.


Generated by Claude Code

Adds vitest specs for the pin, pin override, checksum mismatch and
downgrade confirmation dialogs, and for the enable dialog's buttons.

Assisted-by: ClaudeCode:claude-opus-5-5
@rubenvdlinde
rubenvdlinde merged commit 067cda0 into development Nov 13, 2026
7 of 9 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/versioniq @ b467426

Check PHP Vue Security License Tests
lint ✅
phpcs ✅
phpmd ✅
psalm ✅
phpstan ✅
phpmetrics ✅
eslint ✅
stylelint ✅
build ✅
composer ✅ ✅ 32/32
npm ✅ ✅ 302/302
app:check-code ⏭️
info.xml ✅
REUSE ❌
lockfile sync ✅
PHPUnit ✅ 1331/1331 · 25 skipped (8 legs)
Newman ⏭️
Playwright ⏭️ deferred: E2E runs locally and on the promotion path only. This pull request targets development, so the suite is asked once per promotion into beta and main rather than once per push per open pull request. Run it locally with npx playwright test, or from the Actions tab on a branch with no open pull request into development.
Hydra gates ✅

Quality workflow — 2026-11-15 05:41 UTC

Download the full PDF report from the workflow artifacts.

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