Skip to content

Grow e2e suite with 6 more user stories (8 -> 14 tests) - #88

Merged
stolau merged 1 commit into
mainfrom
e2e-six-user-stories
Jul 27, 2026
Merged

Grow e2e suite with 6 more user stories (8 -> 14 tests)#88
stolau merged 1 commit into
mainfrom
e2e-six-user-stories

Conversation

@stolau

@stolau stolau commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Summary

Follow-up on the previous e2e-growth PRs. Surveyed 7 candidate user stories for real,
currently-unproven-live gaps -- each a feature that shipped in a recent PR but was only ever
verified by a mocked-fetch unit test or a one-off manual Docker/Podman screenshot -- and
implemented all but the separate-host/CORS one, which is a different scale of effort (needs real
container builds or two CORS-enabled servers, not this single-Flask-process harness) and deserves
its own future pass rather than being bundled in here.

  • Delete a mask via its hashtag chip's own remove control, not just the on-image rect's delete
    button -- never driven live before.
  • Single view's Baseline tab is genuinely disabled with no baseline yet, mirroring the
    existing Approve-checkmark disabled-proof pattern.
  • Images actually fill their pane's width, a regression guard for the exact CSS bug
    (InteractiveImagePane's inline-block -> w-full) the redesign shipped and fixed. Worth
    calling out: my first draft asserted ">480px" in Dual view too and it correctly failed at a
    real, expected 446px (Dual view's per-pane width is capped below 480px by the page's own
    intentional max-w-5xl, regardless of browser width) -- catching my own wrong assumption before
    it shipped, not a product bug.
  • A mask category's deletion is refused while a snapshot is still tagged with it.
  • Bulk approve reports a genuine partial failure -- one candidate image's file is deleted
    directly from the shared data dir between processing and approving, so the backend's
    approve_snapshot genuinely 409s for that one snapshot, not a simulated failure.
  • A full flow against a second, self-contained Flask process with PPS_API_TOKEN set (own
    data dir, own port, own viewer-proxy server, torn down locally) -- confirms both that an
    unauthenticated request is genuinely rejected and that the viewer's Settings auth field unlocks
    the real flow live. Auth is deliberately never turned on on the shared backend the other 13
    tests reuse.

Test plan

  • All 14 tests run stably across 3 consecutive full runs
  • The three genuinely new techniques (width-regression guard, real-file-deletion failure
    trigger, Baseline-disabled proof) each mutation-tested against the real product code --
    reverted the relevant fix, confirmed the new test fails for the right reason, restored
  • npm run lint --workspaces clean
  • npm test --workspaces -- 3 client + 55 viewer, unaffected
  • backend ruff check + pytest -- 142/142, unaffected
  • examples/demo-app/CODEMAP.md updated

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01NrQeh9CXrigN1cvpJuyzy4

Presented 7 candidate live-coverage gaps (each a real feature shipped
in a recent PR, previously proven only by a mocked-fetch unit test or
a one-off manual Docker/Podman screenshot); picked all but the
separate-host/CORS one, which is a different scale of effort (needs
genuine container builds or two CORS-enabled servers, not this
single-Flask-process harness) and deserves its own future pass.

- Delete a mask via its hashtag chip's own remove control, not just
  the on-image rect's delete button -- never driven live before.
- Single view's Baseline tab is genuinely `disabled` with no baseline
  yet, mirroring the existing Approve-checkmark disabled-proof pattern
  -- jsdom can't render real interactivity, only a live browser can
  prove a DOM `disabled` property.
- Images actually fill their pane's width rather than shrinking to
  their 480px natural capture size -- a regression guard for the exact
  CSS bug (InteractiveImagePane's inline-block -> w-full fix) the
  redesign shipped and fixed, previously confirmed only by eye.
  Dual view's own per-pane width is capped below 480px by the page's
  intentional max-w-5xl regardless of browser width, so the strongest
  direct "wider than natural size" proof lives in Single view instead
  -- an assumption verified empirically (the first draft asserted
  >480px in Dual view too and correctly failed at a real, expected
  446px, catching my own wrong assumption before it shipped).
- A mask category's deletion is refused while a snapshot is still
  tagged with it.
- Bulk approve reports a genuine partial failure: one candidate
  image's file is deleted directly from the shared data dir between
  processing and approving, so the backend's approve_snapshot
  genuinely 409s for that one snapshot -- not a simulated failure.
- A full capture/approve/browse flow against a second, fully
  self-contained Flask process spawned with PPS_API_TOKEN set (own
  data dir, own port, own viewer-proxy server, torn down in a local
  finally block) -- confirms both that an unauthenticated request is
  genuinely rejected and that the viewer's Settings auth-token field
  unlocks the real flow live. Auth is deliberately never turned on on
  the shared backend the other 13 tests reuse, since that would break
  every one of their existing unauthenticated calls.

Verification: all 14 tests run stably across 3 consecutive full runs;
the three genuinely new techniques (the width-regression guard, the
real-file-deletion failure trigger, and the Baseline-disabled proof)
were each mutation-tested against the real product code -- reverted
the relevant fix, confirmed the new test fails for the right reason,
restored, confirmed green again. Full root-level lint/test/e2e/backend
suite green (3 client + 55 viewer + 14/14 e2e + 142 backend).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NrQeh9CXrigN1cvpJuyzy4
@stolau
stolau merged commit b32f76a into main Jul 27, 2026
5 checks passed
stolau pushed a commit that referenced this pull request Jul 27, 2026
…flict

Three PRs landed on main after this branch forked (#86 self-hosting,
#87 mask popup, #88 six more e2e stories), two of which touched the
same examples/demo-app/CODEMAP.md paragraph this branch also edited.
index.html and style.css merged cleanly with no conflict; CODEMAP.md's
prose needed manual reconciliation -- kept main's up-to-date "fourteen
tests" description and spliced this branch's .thumbs gallery sentence
back into the site/ bullet it belongs to.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NrQeh9CXrigN1cvpJuyzy4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant