Skip to content

test(versioniq): cover trusted sources and token panel actions - #668

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

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

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Vitest specs for src/components.

  • TrustedSourcesPanel.spec.ts (15 tests, the component had no spec of its own): loading the allowlist (list, empty state, retired-forge marker, load errors), the trust form (owner and confirmation required before sending, trimmed request body with and without a repository, chosen forge, server refusal, thrown errors, form reset), and removing a pattern (encoded DELETE, refusal, thrown error)
  • TokensPanel.actions.spec.ts (14 tests): token list rendering and load errors, share/unshare (PATCH body, reload, refusal, thrown errors), delete (reload, refusal, thrown errors), and the token-creation deeplink (forge parameter, link and instructions, missing link, errors)

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

Line coverage: TrustedSourcesPanel.vue 65.2% → 98.5%, TokensPanel.vue 53.7% → 92.6%, JS total 74.2% → 77.3%.
Suite (vitest run): before 44 files / 2730 tests passing; after 46 files / 2759 tests passing. eslint clean on the new files.

Tests only; no production code changed.


Generated by Claude Code

Adds vitest specs for the trusted sources panel (load, trust form checks
and request body, removal) and for the token panel's share, delete and
deeplink actions, including their error paths.

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

Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/versioniq @ cd0c263

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:35 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