Skip to content

v3: rewrite apiMock fixture to match new useSlots / useLemonadeHealth hook shape #236

@thinmintdev

Description

@thinmintdev

Context

Pre-existing γ-suite failure carried in PR #209 (and re-inherited by PR #235 that merges v3 to main).

When the Phase B1 API hooks landed in #209 (useSlots, useLemonadeHealth, …), the Phase B2 Playwright suite's ui/tests/e2e/fixtures/apiMock was NOT updated to return data in the new hook-expected shape. Result: when specs hit /api/slots etc., the fixture returns data the components don't render, so locators like .view .sec h2 filtered by 'NPU' never appear.

21 specs fail across 8 files:

  • backends-v3, dashboard-v3, firstrun-v3, hardware-v3, logs-v3, models-v3, settings-v3, slots-v3

What's needed

  1. Audit each Phase B1 hook (ui/src/api/hooks/*.ts) — document the shape it expects from each /api/* endpoint.
  2. Update ui/tests/e2e/fixtures/apiMock.ts to return data matching those shapes (drawing from the existing HAL0_DATA seed where possible, or from src/hal0/api/routes/*.py response models for canonical truth).
  3. Re-run npx playwright test locally. All 21 failing specs should pass.
  4. Confirm CI green on a follow-up PR.

Out of scope

Why this wasn't fixed in #209 or #235

#209 was the API-hooks PR itself and didn't carry the test update. #235 merges v3 to main and was deliberately scoped to the v3 cherry-picks + 2 LXC-validated defensive guards — the test fix is its own 1–3hr task and was deferred to keep the merge minimal.

The actual dashboard works fine on the hal0 LXC (manually verified at https://hal0.thinmint.dev/). This is a test-harness gap only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions