test(app-store): add unit tests for stores and app list view#13943
test(app-store): add unit tests for stores and app list view#13943dj4oC wants to merge 2 commits into
Conversation
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>
|
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. |
|
|
Closes: #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. |
|
|
Superseded by owncloud/ocis#12545. The 🤖 Automated by Claude Code Generated by Claude Code |



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
AppListoverview view.New files:
packages/web-app-app-store/tests/unit/piniaStores/apps.spec.tspackages/web-app-app-store/tests/unit/piniaStores/repositories.spec.tspackages/web-app-app-store/tests/unit/views/AppList.spec.tsuseAppsStorecovered:loadApps: successful load and mapping (repository/mostRecentVersion), aper-repository fetch failure being caught + logged and yielding no apps for
that repository, and case-insensitive name sorting
getById: match and no-matchuseRepositoriesStorecovered:setRepositoriesstate updateAppList.vuecovered:filterroute queryfilterqueryRelated 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:unit(vitest 4.1.6, node 22)Test Files 3 passed,Tests 9 passed (9)(
apps.tsandrepositories.tsat 100%;AppList.vue96.77% lines / 100%branches) — above the 85% target
eslint: clean ·prettier --check: clean · full-repovue-tsc --noEmit: notype errors
This is a test-only change — no product code is modified.
Documentation checklist
changelog/unreleased/change-add-app-store-unit-tests.LICENSEand carries no per-file SPDX headers on existing source/test files, so none
were added, to stay consistent with the codebase.
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
fetchstubbed, no network), deterministic.Risk level: minimal (adds tests only).
Open tasks:
🤖 Automated by Claude Code
Generated by Claude Code