test(web): add unit tests for app store stores and app list view#12545
Open
dj4oC wants to merge 2 commits into
Open
test(web): add unit tests for app store stores and app list view#12545dj4oC wants to merge 2 commits into
dj4oC wants to merge 2 commits into
Conversation
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>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This was referenced Jul 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 theAppListoverview view.New files:
web/packages/web-app-app-store/tests/unit/piniaStores/apps.spec.tsweb/packages/web-app-app-store/tests/unit/piniaStores/repositories.spec.tsweb/packages/web-app-app-store/tests/unit/views/AppList.spec.tsuseAppsStore:loadAppssuccess + mapping, per-repository fetch failure caught/logged (no apps for that repo), case-insensitive name sorting;getByIdmatch/no-match.useRepositoriesStore:setRepositoriesstate update.AppList.vue: no-content message when empty; a tile per app; search input reflected into thefilterroute query; tiles narrowed to apps matching the activefilterquery.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?
pnpm --filter web-app-app-store test:unitinweb/(vitest 4.1.6, node 22)Test Files 3 passed,Tests 9 passed (9)apps.ts/repositories.ts100%;AppList.vue96.77% lines / 100% branches) — above the 85% targeteslintclean ·prettier --checkcleanThis 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. Theweb/subtree carries no per-file SPDX headers on existing source/test files, so none were added (consistent with the codebase).Types of changes
Checklist:
🤖 Automated by Claude Code
Generated by Claude Code