Skip to content

test(e2e): drafts.spec.ts acknowledgment assertion is ambiguous and can pass before the act #112

Closed

Description

@TusanHomichi

Problem or outcome

web/e2e/drafts.spec.ts:451 checks getByText('Taylor Trainee acknowledged receipt', { exact: false }) after Taylor acknowledges version 2. The same page's Version history already shows version 1's acknowledgment, "Taylor Trainee acknowledged receipt with a response (…)", so the locator:

  • usually matches that version-1 note and passes before the version-2 acknowledgment is recorded, which proves nothing about the act;
  • fails with a strict-mode violation when both lines are rendered at the moment it checks.

Observed in a local full proof on 09f0e15 (PR #111, which doesn't touch web/), at 2026-10-15 00:05 UTC: strict mode violation: getByText('Taylor Trainee acknowledged receipt') resolved to 2 elements. Element 1 was version 2's line in the Acknowledgment panel; element 2 was version 1's note in Version history.

Scope

  • Scope the assertion to the Acknowledgment panel, so it waits for this version's acknowledgment and matches exactly one element.

Acceptance criteria

  • The assertion targets the Acknowledgment panel and passes. With the click removed, it fails, as a negative control.

Execution record

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions