🧪 Test Hub
testing: Demo target v3.0.0 · built-in demo site
← →

Run #424 — DEMO-T13

failed
📄 Download report

queued 2026-09-25 00:23:08 · started 00:23:22 · finished 00:23:25 · duration 3s · target v2.1.0 · chromium · trigger: cli-adopted · batch: 7 tests (terminal)

What went wrong

1 of 1 test(s) failed: the public API keeps its promises -- 3 problems:
  - contract: field 'eta' is missing (the response has: booked_at, customer, delivered_at, destination, estimated_delivery, events, id, origin, pieces, price, service, status, status_label, weight_kg)
  - money: SPRING10 on a $117.62 subtotal is 10% (expected 11.762, received 23.52)
  - limits: 5 calls a minute, but 6 in a row answered 200,200,200,200,200,200 (expected 429, received 200)
Technical details (full error)
1 of 1 test(s) failed: the public API keeps its promises -- 3 problems:
  - contract: field 'eta' is missing (the response has: booked_at, customer, delivered_at, destination, estimated_delivery, events, id, origin, pieces, price, service, status, status_label, weight_kg)
  - money: SPRING10 on a $117.62 subtotal is 10% (expected 11.762, received 23.52)
  - limits: 5 calls a minute, but 6 in a row answered 200,200,200,200,200,200 (expected 429, received 200)

Step timings every page action is timed automatically

atsteptook
+0.02s ⏱ the public API keeps its promises 360 ms
+0.03s ⏱ auth: no key 20 ms
+0.03s GET freight/api/v1/shipments/AF-100001 15 ms
+0.05s ⏱ contract: a shipment 58 ms
+0.05s GET freight/api/v1/shipments/AF-100001 36 ms
+0.11s ⏱ money: SPRING10 24 ms
+0.11s POST freight/api/v1/quotes 20 ms
+0.13s ⏱ limits: six calls on the trial key 215 ms
+0.13s GET freight/api/v1/shipments/AF-100002 34 ms
+0.17s GET freight/api/v1/shipments/AF-100002 35 ms
+0.20s GET freight/api/v1/shipments/AF-100002 34 ms
+0.24s GET freight/api/v1/shipments/AF-100002 34 ms
+0.28s GET freight/api/v1/shipments/AF-100002 34 ms
+0.31s GET freight/api/v1/shipments/AF-100002 35 ms

Times are when each step began, on the replay's clock. Add your own phases with await test.step('label', async () => { … }).

Screenshots

No screenshots (use ctx.screenshot("name") in the test).

Artifacts

Run logrun.log
Playwright trace trace.zip open with: playwright show-trace trace.zip
Result JSONresult.json
Folderresults/DEMO-T13/20260925-002322-r424/

Full log

Read from the S3 bucket (the last 20 KB; the whole file is the Run log link above).

[ts-harness] @playwright/test project=chromium file=DEMO-T13__freight_api_typescript.spec.ts

Running 1 test using 1 worker

  ✘  1 [chromium] › DEMO-T13__freight_api_typescript.spec.ts:11:5 › the public API keeps its promises (360ms)


  1) [chromium] › DEMO-T13__freight_api_typescript.spec.ts:11:5 › the public API keeps its promises 

    Error: contract: field 'eta' is missing (the response has: booked_at, customer, delivered_at, destination, estimated_delivery, events, id, origin, pieces, price, service, status, status_label, weight_kg)

    expect(received).toHaveProperty(path)

    Expected path: "eta"
    Received path: []

    Received value: {"booked_at": "2026-09-22T06:00", "customer": "Lumen Optics", "delivered_at": null, "destination": "Frankfurt, Hessen, DE", "estimated_delivery": "2026-09-24", "events": [{"at": "2026-09-22T06:00", "code": "booked", "location": "Los Angeles, California, US", "text": "Booked with Acme Freight (express)"}, {"at": "2026-09-22T18:00", "code": "picked_up", "location": "Los Angeles, California, US", "text": "Picked up by courier"}, {"at": "2026-09-23T08:00", "code": "at_hub", "location": "Los Angeles, California, US", "text": "Arrived at LAX hub"}, {"at": "2026-09-23T18:00", "code": "in_transit", "location": "Los Angeles, California, US", "text": "Departed LAX for FRA"}], "id": "AF-100001", "origin": "Los Angeles, California, US", "pieces": 3, "price": {"amount": "717.54", "currency": "USD"}, "service": "express", "status": "in_transit", "status_label": "In transit", "weight_kg": 42.5}

      22 |       const has = Object.keys(body).sort().join(', ');
      23 |       for (const field of ['id', 'status', 'origin', 'destination', 'service', 'weight_kg', 'eta', 'events']) {
    > 24 |         expect.soft(body, `contract: field '${field}' is missing (the response has: ${has})`).toHaveProperty(field);
         |                                                                                               ^
      25 |       }
      26 |     }
      27 |   });
        at /opt/pw-testhub/data/tests/DEMO-T13__freight_api_typescript.spec.ts:24:95
        at /opt/pw-testhub/data/tests/DEMO-T13__freight_api_typescript.spec.ts:17:3

    Error: money: SPRING10 on a $117.62 subtotal is 10%

    expect(received).toBeCloseTo(expected, precision)

    Expected: 11.762
    Received: 23.52

    Expected precision:    2
    Expected difference: < 0.005
    Received difference:   11.758

      37 |       const q = await r.json();
      38 |       expect.soft(Number(q.discount), `money: SPRING10 on a $${q.subtotal} subtotal is 10%`)
    > 39 |         .toBeCloseTo(Number(q.subtotal) * 0.10, 2);
         |          ^
      40 |     }
      41 |   });
      42 |
        at /opt/pw-testhub/data/tests/DEMO-T13__freight_api_typescript.spec.ts:39:10
        at /opt/pw-testhub/data/tests/DEMO-T13__freight_api_typescript.spec.ts:29:3

    Error: limits: 5 calls a minute, but 6 in a row answered 200,200,200,200,200,200

    expect(received).toBe(expected) // Object.is equality

    Expected: 429
    Received: 200

      49 |       codes.push(last.status());
      50 |     }
    > 51 |     expect.soft(codes[codes.length - 1], `limits: 5 calls a minute, but 6 in a row answered ${codes}`).toBe(429);
         |                                                                                                        ^
      52 |     if (codes[codes.length - 1] === 429) {
      53 |       expect.soft(last.headers()['retry-after'], 'a 429 must say when to retry').toBeTruthy();
      54 |     }
        at /opt/pw-testhub/data/tests/DEMO-T13__freight_api_typescript.spec.ts:51:104
        at /opt/pw-testhub/data/tests/DEMO-T13__freight_api_typescript.spec.ts:43:3

    attachment #1: trace (application/zip) ─────────────────────────────────────────────────────────
    ../results/DEMO-T13/20260925-002322-r424/test-results/DEMO-T13__freight_api_type-42378-blic-API-keeps-its-promises-chromium/trace.zip
    Usage:

        npx playwright show-trace ../results/DEMO-T13/20260925-002322-r424/test-results/DEMO-T13__freight_api_type-42378-blic-API-keeps-its-promises-chromium/trace.zip

    ────────────────────────────────────────────────────────────────────────────────────────────────

  1 failed
    [chromium] › DEMO-T13__freight_api_typescript.spec.ts:11:5 › the public API keeps its promises ─
[ts-harness] activity reel: 0 change-frames extracted from the trace screencast