8000 Isolate E2E members and share observable Submission form helpers · Issue #541 · jra3/mulm · GitHub
[go: up one dir, main page]

Skip to content
8000

Isolate E2E members and share observable Submission form helpers #541

Closed

Description

@jra3

Problem

e2e/helpers/testData.ts supplies shared TEST_USER/TEST_ADMIN accounts, and its cleanup deletes all Submissions for the shared member. playwright.config.ts enables parallel files locally. Serial mode inside one spec does not prevent another file deleting the first file's data.

Plant and coral specs duplicate form workflows and fixed sleeps (e2e/plant-submissions.spec.ts, e2e/coral-submissions.spec.ts). The review found 79 waitForTimeout call sites across E2E TypeScript. These waits neither establish readiness nor explain what failed. Helpers also hard-code db/database.db, independently of the server under test.

Proposed change

  1. Introduce Playwright fixtures that allocate run/test-unique members and committee members, record their created resources, and clean up only those resources. Keep immutable reference Species separate from mutable test-owned Submissions.
  2. Give the test server and database helpers one explicit disposable database configuration. Do not clean a development database or reuse an unrelated running server for mutation tests. Keep remote/staging workflows separate.
  3. Extend existing auth/Tom Select helpers with domain actions such as opening a Submission form, selecting Species type, waiting for the HTMX replacement, choosing a Name, and saving a draft. Use locator assertions, response completion plus resulting DOM assertions, or a specific initialization condition rather than networkidle plus a sleep.
  4. Share the repeated plant/coral interaction sequence, optionally with table-driven shared cases, while retaining Program-specific field assertions and independently useful test names.
  5. Start with plant/coral and the helpers they share; remove fixed waits elsewhere when migrating a concrete workflow, not through blind replacement.

Acceptance criteria and tests

  • Plant and coral suites can execute together with at least two workers without cross-test deletion or shared mutable members.
  • Teardown removes only test-owned resources and leaves another active test's Submissions intact.
  • Both the server and setup/cleanup use the same disposable database; an unrelated existing server cannot be selected silently.
  • Migrated flows contain no fixed readiness sleeps and fail at the unmet observable condition.
  • Program-specific form visibility, draft, and submit assertions retain their meaning.
  • Run the affected E2E specs with two workers and a short repeat run, retain traces on failure, and document local/CI fixture usage. Run helper tests and typecheck.

Related and non-goals

Supports #13. #476's staging fixture command has a different lifecycle and safety boundary. This does not require a browser rewrite, new frontend framework, or deleting meaningful Program-specific coverage.

Review baseline

Source review at 78e0f1b2ff157e289c237d533f1406302d95118e. Repository typechecking and the focused specialty-award/level-progress tests passed during the review; these are not reproductions of the new failure scenarios above. Full database and E2E suites were not run.

Related proposals from this review

Activity

  1. added
    enhancementNew feature or request
    testingTesting, test coverage, and quality assurance
    priority:mediumMedium priority - important but not urgent
    ready-for-agentFully specified, ready for an AFK agent
    on Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestpriority:mediumMedium priority - important but not urgentready-for-agentFully specified, ready for an AFK agenttestingTesting, test coverage, and quality assurance

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0