mirror of
https://github.com/Donkie/Spoolman.git
synced 2026-10-22 01:52:17 -05:00
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
97 lines
2.9 KiB
JSON
97 lines
2.9 KiB
JSON
{
|
|
"name": "spoolman-tests-frontend-v2",
|
|
"version": "0.0.0",
|
|
"lockfileVersion": 3,
|
|
"requires": true,
|
|
"packages": {
|
|
"": {
|
|
"name": "spoolman-tests-frontend-v2",
|
|
"version": "0.0.0",
|
|
"devDependencies": {
|
|
"@playwright/test": "^1.62.0",
|
|
"@types/node": "^22.20.1"
|
|
}
|
|
},
|
|
"node_modules/@playwright/test": {
|
|
"version": "1.62.0",
|
|
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.62.0.tgz",
|
|
"integrity": "sha512-9zOJ6ZQRAena31MpOH9VSzIz8Ou3YJ/wtY/eQm5T2uhfhG7/U3COrMS8xOtUrZrp9OgdmzEnIYODye3nY1VqzA==",
|
|
"dev": true,
|
|
"license": "Apache-2.0",
|
|
"dependencies": {
|
|
"playwright": "1.62.0"
|
|
},
|
|
"bin": {
|
|
"playwright": "cli.js"
|
|
},
|
|
"engines": {
|
|
"node": ">=20"
|
|
}
|
|
},
|
|
"node_modules/@types/node": {
|
|
"version": "22.20.1",
|
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.20.1.tgz",
|
|
"integrity": "sha512-EANqOCF9QFyra+4pfxUcX9STKJpCLjMbObVzljIJomAWSnuSIEAvyzEU53GaajbXJEgdh0iEcPL+DGvpUd4k1Q==",
|
|
"dev": true,
|
|
"license": "MIT",
|
|
"dependencies": {
|
|
"undici-types": "~6.21.0"
|
|
}
|
|
},
|
|
"node_modules/fsevents": {
|
|
"version": "2.3.2",
|
|
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
|
|
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
|
|
"dev": true,
|
|
"hasInstallScript": true,
|
|
"license": "MIT",
|
|
"optional": true,
|
|
"os": [
|
|
"darwin"
|
|
],
|
|
"engines": {
|
|
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
|
|
}
|
|
},
|
|
"node_modules/playwright": {
|
|
"version": "1.62.0",
|
|
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.62.0.tgz",
|
|
"integrity": "sha512-Z14dG305dgaLu6foB1TXQagFiW8JfSUIUaUuPaKQ6NtBPKF1P/qXcqfh6c6K/icPqdy37JmjbiBXf6JNg6Sylw==",
|
|
"dev": true,
|
|
"license": "Apache-2.0",
|
|
"dependencies": {
|
|
"playwright-core": "1.62.0"
|
|
},
|
|
"bin": {
|
|
"playwright": "cli.js"
|
|
},
|
|
"engines": {
|
|
"node": ">=20"
|
|
},
|
|
"optionalDependencies": {
|
|
"fsevents": "2.3.2"
|
|
}
|
|
},
|
|
"node_modules/playwright-core": {
|
|
"version": "1.62.0",
|
|
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.62.0.tgz",
|
|
"integrity": "sha512-nsNRyq0r2zsG8AcRHWknc9QRA5XCueC7gWMrs+Gx2tlZn9hcl8zudfh00lhJPY1DE7NmZ6bDsT9g2yey8mXljA==",
|
|
"dev": true,
|
|
"license": "Apache-2.0",
|
|
"bin": {
|
|
"playwright-core": "cli.js"
|
|
},
|
|
"engines": {
|
|
"node": ">=20"
|
|
}
|
|
},
|
|
"node_modules/undici-types": {
|
|
"version": "6.21.0",
|
|
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
|
|
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
|
|
"dev": true,
|
|
"license": "MIT"
|
|
}
|
|
}
|
|
}
|