Files
Spoolman/tests_frontend_v2/package.json
T
Donkie a76c8ed3d9 tests_frontend_v2: cover labels, settings, search and installability
Browser coverage was smoke plus CRUD, mirroring the old React suite --
which left the subsystems with the most new code in them completely
untested. Everything added here needs a real deployment to mean
anything, which is why it lives in this suite and not in vitest.

search.spec.ts drives the top-bar search (a filament, a manufacturer
and a location each land in their own section; spools match on their
own text, not their filament's, so a location is what finds one) and
the toolbar's group / filter / sort. Group, sort and filters live in
the URL, so each is checked to survive a reload. Sorting a grouped list
by something the backend cannot order groups by flattens the view, and
that is asserted rather than left as a surprise.

labels.spec.ts round-trips a design through the label_designs server
setting and exports a label for a real spool through the "Image files"
mode, asserting a non-trivial PNG comes back -- the only way to prove
the QR encoding, template substitution, logo and mm-to-pixel maths
actually ran. The print modes are left alone on purpose: they open the
browser's print dialog, which would stall the session.

settings.spec.ts separates the two persistence models the page mixes
with no visual cue -- currency, rounding and base URL on the server,
theme in the browser -- and takes an extra field from definition to the
library's filter menu and back out again. pwa.spec.ts checks the
deployed manifest rather than the source file: served at the deploy
root, with a type browsers accept, all icons resolving, all URLs
relative.

The add-spool flow moves out of crud.spec.ts into a helper so each spec
creates its own data instead of leaning on what an earlier one left
behind, and filters pin assertions to that data -- the library is
paginated, so an unfiltered assertion about a specific row is a coin
toss on an instance with real data in it. Anything with instance-wide
reach is put back afterwards. Verified against both an empty database
and one holding ~50 seeded spools.

Claude-Session: https://claude.ai/code/session_01UB5KocsTBm9GL5x3Uuup5F
2026-07-30 21:00:24 +02:00

17 lines
435 B
JSON

{
"name": "spoolman-tests-frontend-v2",
"version": "0.0.0",
"private": true,
"description": "Playwright frontend integration tests for the Spoolman Svelte client (client_v2)",
"type": "module",
"scripts": {
"test": "playwright test",
"test:headed": "playwright test --headed",
"report": "playwright show-report"
},
"devDependencies": {
"@playwright/test": "^1.62.0",
"@types/node": "^22.20.1"
}
}