Skip to content

test(app-store): add unit tests for stores and app list view#13943

Closed
dj4oC wants to merge 2 commits into
masterfrom
fix/web/11634-app-store-unit-tests
Closed

test(app-store): add unit tests for stores and app list view#13943
dj4oC wants to merge 2 commits into
masterfrom
fix/web/11634-app-store-unit-tests

Conversation

@dj4oC

@dj4oC dj4oC commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Description

Adds unit test coverage for the app store, which had merged e2e journeys and a
first batch of component tests but no coverage for its pinia stores or the
AppList overview view.

New files:

  • packages/web-app-app-store/tests/unit/piniaStores/apps.spec.ts
  • packages/web-app-app-store/tests/unit/piniaStores/repositories.spec.ts
  • packages/web-app-app-store/tests/unit/views/AppList.spec.ts

useAppsStore covered:

  • loadApps: successful load and mapping (repository/mostRecentVersion), a
    per-repository fetch failure being caught + logged and yielding no apps for
    that repository, and case-insensitive name sorting
  • getById: match and no-match

useRepositoriesStore covered:

  • setRepositories state update

AppList.vue covered:

  • no-content message shown when there are no matching apps
  • a tile rendered per app
  • search input reflected into the filter route query
  • tiles narrowed to apps matching the active filter query

Related Issue

Motivation and Context

Locks down the store data flow (fetch/parse/sort/merge, failure isolation) and
the list view's rendering/search behaviour so future changes are guarded.

How Has This Been Tested?

  • test environment: pnpm --filter web-app-app-store test:unit (vitest 4.1.6, node 22)
  • result: Test Files 3 passed, Tests 9 passed (9)
  • coverage on the three touched source files: 98.27% lines, 100% branches
    (apps.ts and repositories.ts at 100%; AppList.vue 96.77% lines / 100%
    branches) — above the 85% target
  • eslint: clean · prettier --check: clean · full-repo vue-tsc --noEmit: no
    type errors

This is a test-only change — no product code is modified.

Documentation checklist

  • Changelog: added changelog/unreleased/change-add-app-store-unit-tests.
  • REUSE/SPDX headers: not applicable — this repo uses a single root LICENSE
    and carries no per-file SPDX headers on existing source/test files, so none
    were added, to stay consistent with the codebase.
  • Admin/end-user docs, WCAG note, OTEL metrics: not applicable (no behaviour or
    UI change).

Phase 4 pre-flight review (non-blocking findings): none — specs use a real
testing pinia for the stores and fully stubbed dependencies for the view (global
fetch stubbed, no network), deterministic.

Risk level: minimal (adds tests only).

Open tasks:

  • none

🤖 Automated by Claude Code


Generated by Claude Code

The app store's pinia stores (apps, repositories) and the AppList overview
view had no unit test coverage. This adds specs covering useAppsStore
(loadApps success, per-repository failure handling, name sorting, getById),
useRepositoriesStore (setRepositories) and AppList (no-content state, tile
rendering, search-term reflection into the route query, and filtering).

Closes: #11634

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: dj4oC <noreply@github.com>
@update-docs

update-docs Bot commented Jul 9, 2026

Copy link
Copy Markdown

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Closes: #11634

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: dj4oC <noreply@github.com>
@kw-security

kw-security commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@dj4oC dj4oC mentioned this pull request Jul 9, 2026
25 tasks
@sonarqubecloud

sonarqubecloud Bot commented Jul 9, 2026

Copy link
Copy Markdown

dj4oC commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by owncloud/ocis#12545.

The owncloud/web frontend has been consolidated into owncloud/ocis (under web/), so this test coverage has been moved there. Closing in favour of the ocis PR.

🤖 Automated by Claude Code


Generated by Claude Code

@dj4oC dj4oC closed this Jul 9, 2026
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.

Test coverage for the app store

4 participants