feat: online ordering settings (services, hours, preparation, slots) and the order app e2e (platform-v2 3S, S.4)

- connect_orders.ordering setting; GET/PUT /api/connect/fees/ordering (validated:
  services, hours per day incl. past midnight, preparation, slot minutes, days ahead,
  ASAP); pushed to the cloud with the menu (snapshot `ordering`).
- Manager: the Online ordering page gains "Services and hours" (OrderingSettings.jsx; logic
  in feesLogic.js, unit-tested); nav label "Online ordering".
- tests/e2e/order_app.mjs: a real cloud + the built order app in a phone-sized browser:
  takeaway and delivery placed, priced by the cloud (fee by area, minimum refused), the
  site moves the delivery to delivered and the page follows; a rejection with its reason;
  Greek. In run-all, with the order app's unit tests.
- Tests: backend +1 (406), manager unit +1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 13:39:13 +02:00
co-authored by Claude Opus 5.5
parent df27133af9
commit 8ea44d71aa
12 changed files with 507 additions and 11 deletions
+4 -1
View File
@@ -2,7 +2,8 @@
// node run-all.mjs everything (Android included)
// node run-all.mjs --no-android skip the emulator suite
import { spawnSync } from 'node:child_process'
import { BACKEND, CS, E2E, PYTHON, WAITER } from './lib/env.mjs'
import path from 'node:path'
import { BACKEND, CS, E2E, PYTHON, REPO, WAITER } from './lib/env.mjs'
const shell = process.platform === 'win32'
const suites = [
@@ -16,12 +17,14 @@ const suites = [
['lint: manager_dashboard (v2 code)', 'npm', ['run', 'lint', '--silent', '-w', 'manager-dashboard'], CS],
['unit: terminal (node --test)', 'npm', ['test', '--silent', '-w', 'terminal'], CS],
['lint: terminal', 'npm', ['run', 'lint', '--silent', '-w', 'terminal'], CS],
['unit: order-app (node --test)', 'npm', ['test', '--silent'], path.join(REPO, 'cloud-service', 'connect_frontend', 'order-app')],
['install.sh', 'node', ['install.mjs'], E2E],
['license (cloud + site)', PYTHON, ['license_e2e.py'], E2E],
['browser', 'node', ['browser.mjs'], E2E],
['ui (@xenia/ui + @xenia/i18n)', 'node', ['ui.mjs'], E2E],
['manager (login, bootstrap, approvals)', 'node', ['manager.mjs'], E2E],
['terminal (pairing, sign-in, states)', 'node', ['terminal.mjs'], E2E],
['order app (cloud: takeaway + delivery)', 'node', ['order_app.mjs'], E2E],
['stack (compose: terminal :8082, LAN only)', 'node', ['stack.mjs'], E2E],
]
if (!process.argv.includes('--no-android')) suites.push(['android (emulator)', 'node', ['android.mjs'], E2E])