Skip to content

test: extend load coverage + add responsive e2e spec - #38

Merged
upgradedev merged 2 commits into
mainfrom
test/load-and-responsive-coverage
Jul 29, 2026
Merged

test: extend load coverage + add responsive e2e spec#38
upgradedev merged 2 commits into
mainfrom
test/load-and-responsive-coverage

Conversation

@upgradedev

Copy link
Copy Markdown
Owner

Summary

Closes two measured gaps in the test pyramid. Purely additive: no existing
test or source file is modified.

  • Load coverage (tests/integration/test_load.py): the existing
    test_concurrent_pipeline_generation_load only exercises the synchronous,
    direct-pipeline path. Adds two tests that drive the real FastAPI app
    through the endpoints added this week:

    • test_concurrent_async_job_submission_load: 20 concurrent
      POST /reels/jobs submissions (5 workers), each polled to a terminal
      state. Asserts every submission returns 202, every job_id is unique,
      and every job reaches done.
    • test_concurrent_multitenant_isolation_under_load: 4 tenants + guest
      creating reels concurrently (20 total ops, 5 workers). Asserts strict
      per-tenant isolation holds under real concurrency via GET /me/library
      (no cross-tenant or guest bleed), not just sequentially.

    Tokens for the multitenancy test are minted with
    test_api_multitenancy.py's own bearer_for fixture (imported directly,
    not reinvented). Each concurrent submission uses its own fresh
    TestClient(api.app) instance so the concurrency under test is the ASGI
    app + shared storage, not the test harness itself.

  • Responsive e2e (frontend/e2e/responsive.spec.ts, new file, mirrors
    ClaimScene's file of the same name): no horizontal overflow at
    375/768/1280px through the full wizard, primary CTAs meet the 44px
    tap-target minimum on mobile, the occasion cards collapse to a single
    column on mobile (2/3 columns at tablet/desktop), and the result step's
    player/provenance layout collapses to a single column below desktop width.
    Auto-discovered by the existing e2e CI job (npx playwright test,
    testDir: "./e2e") - no config changes needed.

Test plan

  • CI green on all jobs (python, e2e, readiness, pen-test, frontend, web,
    lighthouse, demo-video, codeql x2, secret-scan)
  • New tests actually exercise the intended concurrency/layout behavior,
    not just pass trivially

Efthimios Fousekis added 2 commits July 29, 2026 10:44
…occasion cards

ruff failed the python job on tests/integration/test_load.py: importing the
bearer_for fixture into the module that also names it as a parameter is F811,
and that import also broke the block ordering (I001). Moving the re-export into
a new tests/integration/conftest.py lets pytest discover the fixture with no
import at the use site, which removes both errors without touching the module
that defines it.

The responsive e2e counted occasion radios once, which can land mid entrance
animation and see only part of them. Verified against the live app that the
picker really renders six radios in one radiogroup, so the assertion was right
and the timing was not: it now scopes to the radiogroup and polls the count.
@upgradedev
upgradedev merged commit a07c0a3 into main Jul 29, 2026
12 checks passed
@upgradedev
upgradedev deleted the test/load-and-responsive-coverage branch July 29, 2026 11:36
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