test: complete frontend test suite, add lint and CI workflow #45
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/frontend-tests"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
angular-eslintflat config), atypecheckscript, and a Forgejo Actions workflow at.forgejo/workflows/test.ymlthat runs install -> lint -> typecheck -> unit tests -> Playwright e2e on every PR/push todevelop/main.injectAuthClient()toinject(AUTH_CLIENT)so the Better-Auth client can be faked under TestBed (no runtime behavior change).matchMedia,IntersectionObserver, andlocalStorageinsrc/test-setup.tsso JSDOM-only specs work without per-spec stubs.Scope
Test plan
🤖 Generated with Claude Code
The shoot/folder/changelog endpoints live at the API root (`${apiUrl}/shoot`, `/folder`, `/changelog`), not under `/api/`. Only Better-Auth uses `/api/auth/*`. The previous patterns (`**/api/shoot/paginated*`) never matched, so `/shoots` rendered with "Failed to fetch" and the shoot-card test couldn't find "Morning roll". - Move built-in mocks to register first so caller-supplied routes (registered last) win per Playwright's LIFO route resolution. - Add a catch-all for `/shoot` and `/frame` so navigation tests don't show error toasts. - shoots.spec: register the override AFTER mockApi() and use a regex that targets `/shoot?...` (paginated list) without shadowing `/shoot/<id>` paths. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>The Shoots page calls ShootService.getAll() (-> ?all=true, returns Shoot[]), not getPaginated() (-> {data, total, page, ...}). The fixture's catch-all and the test override were both returning the paginated shape, so .length was undefined and the page rendered the empty state. - shoots.spec: override returns a plain array. - mock-api fixture: catch-all inspects `all=true` and returns the matching shape (array vs paginated object). Verified locally: 6/6 e2e tests pass. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>