$ cd App/java-httpserver && ./run.sh test
Compiling ...
Profitina Laundry - Java track - tests
Server on http://127.0.0.1:36011, database copy /tmp/.../laundry.db, clock fixed at 2026-09-30 21:00:00

PASS  UNIT-1  BR-1 price and BR-3 express surcharge
PASS  UNIT-2  BR-14 next id
PASS  UNIT-3  BR-7 promised hours for all 12 services
PASS  UNIT-4  Money and date formats (U-1, AC-7.3)
PASS  UNIT-5  BR-12 role derivation
PASS  UNIT-6  HTML escaping helper (S-3)
PASS  UNIT-7  JSON writer and reader round trip
PASS  UNIT-8  PBKDF2 test vector of database/README.md section 6
PASS  TC-1.1  Owner logs in; dashboard shows Hendra Wijaya (owner)
PASS  TC-1.2  Wrong password (wrong case) is refused
PASS  TC-1.3  Unknown e-mail gives exactly the same answer
PASS  TC-1.4  An employee without password_hash cannot log in
PASS  TC-1.5  Without a session: page -> /login, API -> 401
PASS  TC-1.6  Washer: reports, POST services, POST bills -> 403; menu only Dashboard and Queue
PASS  TC-1.7  After logout the old cookie gives 401
PASS  TC-1.8  Session id renewed at login; cookie HttpOnly and SameSite=Lax
PASS  TC-1.9  5 wrong passwords, then the correct one -> refused (429)
PASS  TC-1.10  Role derivation for all 14 employees
PASS  TC-1.11  Only login and hashing code use password_hash; responses never contain it
PASS  TC-2.1  Customer list: page 1 of 13, 20 per page, sorted by name
PASS  TC-2.2  Search wijaya / WIJAYA -> 8 customers, C0228 ... C0082
PASS  TC-2.3  Search by phone (with spaces / digits) or id -> C0151
PASS  TC-2.4  Search zzzz -> No customer found + Register new customer
PASS  TC-2.5  Create Rina Kusuma -> C0257, enrolled now, credit 0, password *****, hash NULL
PASS  TC-2.6  Invalid customer: 4 field errors, values kept, nothing saved
PASS  TC-2.7  Edit C0151 address: id and enrolled unchanged
PASS  TC-2.8  Delete C0094 (62 bills) -> 409, row still there
PASS  TC-2.9  Delete new C0257: cashier 403, supervisor 204
PASS  TC-2.10  Customer C0094: 62 bills, Rp 3.079.000, most recent B2919
PASS  TC-3.1  Price list without login: 12 services
PASS  TC-3.2  Cashier cannot change prices; no edit buttons
PASS  TC-3.3  Owner: S0001 -> 8500; B2938 keeps 40000; a new 5 kg bill costs 42500
PASS  TC-3.4  Invalid prices and an empty description -> 422
PASS  TC-3.5  Delete S0001 -> 409 'S0001 is used by 1,368 bills'
PASS  TC-3.6  Create 'Carpet (per m2)' 12000 -> S0013
PASS  TC-4.1  kasir5 creates C0151 S0001 x5 rack A03 -> B2954, O03, E0012, 40000, queued
PASS  TC-4.2  A payment sent by the client is ignored
PASS  TC-4.3  unit 0, -2, 4.3, 1000, abc -> 422, nothing saved
PASS  TC-4.4  Rack A01 at O03 is in use (B2944) -> 422; A03 works
PASS  TC-4.5  Express S0002 x3 -> 36000
PASS  TC-4.6  pay_now cash 20000 -> 1 payment, balance 20000
PASS  TC-4.7  Error in the payment part -> nothing saved (one transaction)
PASS  TC-4.8  Unknown customer C9999 / service S0099 -> 422
PASS  TC-4.9  Lowest free rack at O03 is A03
PASS  TC-4.web  New-bill FORM: server price, flash 'Bill B2954 saved', Print receipt
PASS  TC-5.1  Washer cuci5 marks B2941 finished
PASS  TC-5.2  Finish B2938 again -> 409 'B2938 is already finished'
PASS  TC-5.3  Hand over B2938 with balance 40000 -> 409 'Balance Rp 40.000 open'
PASS  TC-5.4  Pay 40000 QRIS, then hand over B2938; rack A05 is free
PASS  TC-5.5  Hand over B2941 with allow_unpaid -> in receivables (collected)
PASS  TC-5.6  History of B0014
PASS  TC-5.7  spv3 cancels B2944 -> departed, finished NULL, payment 0, log cancelled; C11 ok
PASS  TC-5.8  Cancel B2952 (paid) -> 409; B2938 (finished) -> 409; cashier -> 403
PASS  TC-5.9  Complaint on B2919 by the owner; on B2941 (queued) -> 409
PASS  TC-5.10  Two simultaneous 'finish B2940' -> exactly one succeeds
PASS  TC-5.11  Queue O02 at 'now': 9 in process (6 overdue, oldest B2909 100.9 h), 6 ready
PASS  TC-5.12  Supervisor spv2 (O02) cannot finish B2941 (O03) -> 403
PASS  TC-6.1  B2938: cash 40000 -> payment 3320, reference NULL, balance 0
PASS  TC-6.2  B2938: 50000 -> 422 'The balance is only Rp 40.000'
PASS  TC-6.3  QRIS without reference; cash with reference -> 422
PASS  TC-6.4  C0089 (deposit 109000): S0001 x4 = 32000 paid by credit -> DEPOSIT, credit 77000
PASS  TC-6.5  Credit 120000 for C0089 (deposit 109000) -> 422, deposit unchanged
PASS  TC-6.6  Payment on a cancelled bill -> 409
PASS  TC-6.7  B0006: 18000 + 18000 cash, paid 36000, balance 0
PASS  TC-6.8  Amounts 0, -5, 1000.5 -> 422
PASS  TC-6.web  Cash with 'cash given': change shown, only the amount stored
PASS  TC-7.1  Receipt B2938: official logo and all the required lines
PASS  TC-7.2  Receipt has no address, e-mail or birthdate of the customer
PASS  TC-7.3  Print layout (automated part: CSS rules; the paper test is manual)
PASS  TC-7.4  Receipt of a cancelled bill shows CANCELLED
PASS  TC-8.1  Owner dashboard 2026-09-30: the tiles of AC-8.1
PASS  TC-8.2  Month figures: 3.953.000 + 3.851.000 + 4.109.000 = 11.913.000
PASS  TC-8.3  Top services: S0001 123, S0002 35, S0003 35
PASS  TC-8.4  Washer cuci1: only the O01 queue tiles, no 'Rp' on the page
PASS  TC-8.5  Cashier kasir1: only the O01 tile
PASS  TC-9.1  Monthly report 2025-10-01..2026-09-30
PASS  TC-9.2  Outlets report
PASS  TC-9.3  Services report: S0001 first, 1368 bills, 8531 units, 67632000, 46.9 %
PASS  TC-9.4  Employees report: E0004 788 / 39768000; E0006 649 finished
PASS  TC-9.5  Receivables: 38 bills, the first 6 collected, B0340 first
PASS  TC-9.6  CSV of the monthly report
PASS  TC-9.7  Cashier opens reports -> 403
PASS  TC-9.8  Every report number equals queries.sql Q03, Q05-Q07, Q09, Q10, Q16
PASS  TC-10.1  B2938 + 0896-0000-1482 -> Ready for pickup, 5 kg, Rp 40.000 ...
PASS  TC-10.2  b2938 + '0896 0000 1482' / '089600001482' -> the same
PASS  TC-10.3  Phone of another customer -> 'No bill found for this number and phone'
PASS  TC-10.4  Unknown bill B9999 -> exactly the same answer as TC-10.3
PASS  TC-10.5  No name, address or e-mail in the status answers
PASS  TC-10.6  11 checks in one minute from one IP -> the 11th is 429
PASS  TC-10.7  B2944 (queued) -> In process, expected ready by 2 Oct 2026 07:31
PASS  TC-11.1  L1 endpoints: status, JSON type and the api.md example values
PASS  TC-11.2  GET /api/bills?outlet=O03&status=queued: total 5, B2940 (18000) then B2941
PASS  TC-11.3  POST without / with a wrong X-CSRF-Token -> 403 csrf_failed
PASS  TC-11.4  Every error has error.code and error.message
PASS  TC-11.6  per_page=1000 is capped at 100
PASS  TC-11.7  Types: money is a number, times are 'YYYY-MM-DD HH:MM:SS'
PASS  TC-11.5  No API response of this whole run contains a password or password_hash
PASS  TC-NF-01  Server-side validation without the browser (web form)
PASS  TC-NF-02  SQL injection attempts change nothing
PASS  TC-NF-03  A customer named <script>alert(1)</script> is shown as text
PASS  TC-NF-04  New-bill form without token or with another session's token -> 403
PASS  TC-NF-05  Set a password (UC-16): PBKDF2 600000, 90 chars, new salt each time
PASS  TC-NF-06  Role table of api.md 1.2 for every role
PASS  TC-NF-07  Database gone: friendly 500 without SQL, stack trace or path
SKIP  TC-NF-08  Data minimisation review  (covered by TC-7.2, TC-10.5 (field list checked there))
SKIP  TC-NF-09  MySQL: TC-1.1, 2.2, 4.1, 8.1, 9.1 on MySQL  (run separately with --mysql, see VERIFIED.md)
SKIP  TC-NF-10  Clean-machine setup by a new student  (manual)
PASS  TC-NF-11  Performance: dashboard, queue, monthly < 1 s; every queries.sql query < 200 ms
SKIP  TC-NF-12  360 px phone layout  (manual (needs a browser); CSS has the 700 px breakpoint and stacked tables)
PASS  TC-NF-13  Times are WIB wall-clock text without T or fractions
PASS  TC-DB-1/2  After a day of work through the app: FK check, integrity check, 32 business-rule checks = 0

RESULT: 107 passed, 0 failed, 4 not automated/skipped  (22.8 s)
