Skip to content

test(web): add unit tests for app store stores and app list view#12545

Open
dj4oC wants to merge 2 commits into
masterfrom
test/web-app-store-unit-tests
Open

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

Conversation

@dj4oC

@dj4oC dj4oC commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Description

Adds unit test coverage for the web app store (under web/packages/web-app-app-store), which had no coverage for its pinia stores or the AppList overview view.

New files:

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

useAppsStore: loadApps success + mapping, per-repository fetch failure caught/logged (no apps for that repo), case-insensitive name sorting; getById match/no-match.
useRepositoriesStore: setRepositories state update.
AppList.vue: no-content message when empty; a tile per app; search input reflected into the filter route query; tiles narrowed to apps matching the active filter query.

Moved from the now-deprecated owncloud/web repo (frontend consolidated into owncloud/ocis under web/). Supersedes owncloud/web#13943.

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 in web/ (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/repositories.ts 100%; AppList.vue 96.77% lines / 100% branches) — above the 85% target
  • eslint clean · prettier --check clean

This is a test-only change — no product source is modified. A changelog entry was added at changelog/unreleased/change-web-app-store-unit-tests.md. The web/ subtree carries no per-file SPDX headers on existing source/test files, so none were added (consistent with the codebase).

Types of changes

  • Tests only (no source changes)

Checklist:

  • Unit tests added

🤖 Automated by Claude Code


Generated by Claude Code

claude added 2 commits July 9, 2026 19:13
The web 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).

Moved from owncloud/web (now consolidated into owncloud/ocis).
Closes: owncloud/web#11634

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: dj4oC <noreply@github.com>
Closes: owncloud/web#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

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 marked this pull request as ready for review July 9, 2026 21:17
@dj4oC dj4oC requested a review from a team as a code owner July 9, 2026 21:17
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

3 participants