- Settings: tabs in the address (?tab=), Fiscal only with the fiscal app, Appearance only with the waiter app - General: version / update / license / state / uptime, the local network (address by hand or found, the pairing QR), what is set up, export / import of the catalogue and the tables (a wrong file refused, two confirmations), support lock - Sign-in & security: idle lock / sign-out (seconds..hours, warning when sign-out comes first), recovery codes - Operation: role permissions, waiters' own shifts and takings, card payments, tables and orders, courses (add, rename, colour, order), quick notes, table flags (emoji, colour, white/black text, on/off), quick messages, send the QR menu now - Appearance: the waiter app's table-card colours per state, light and dark, flash, colour picker with opacity, reset - Fiscal: on/off, driver, folders with a reachability check, clerk / card terminal numbers, receipt end lines, VAT groups - Development: pretend printing - dropped: the v1 'automatic store schedule' switches (kept in the browser only, nothing read them) and the second time-zone card - backend: JSON settings must be JSON (validation.setting_value); fiscal folders are plain paths (were typed json) - venue colour data in sections/venueColours.js (guard DATA); store/tableColourStore and Settings/tabs deleted - tests: settings.test.mjs (5), test_settings_json.py, e2e manager.mjs 'settings v2' (12 checks) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
12 lines
841 B
Python
12 lines
841 B
Python
"""Settings (plan step 6.14a): a JSON setting must be JSON (a broken one would break the apps that
|
|
read it: courses, quick notes, the waiter app's table colours); the fiscal folders are plain paths."""
|
|
|
|
|
|
def test_json_settings_are_checked(client, make_user, login):
|
|
h = login(make_user(role="owner"))
|
|
assert client.put("/api/settings/orders.courses", headers=h, json={"value": '[{"id":1,"name":"Main","color":"#ef4444"}]'}).status_code == 200
|
|
r = client.put("/api/settings/orders.courses", headers=h, json={"value": "[{broken"})
|
|
assert r.status_code == 422 and "validation.setting_value" in r.text
|
|
assert client.put("/api/settings/fiscal.out_folder", headers=h, json={"value": "/mnt/fiscal/in"}).status_code == 200
|
|
assert client.put("/api/settings/fiscal.in_folder", headers=h, json={"value": ""}).status_code == 200
|