Skip to content

test(e2e): fix flaky/ambiguous locators and wallet-gated create-form tests - #1027

Merged
Austinaminu2 merged 1 commit into
FlowwStar:mainfrom
Genghis-codes:fix/genghis-codes-batch
Oct 18, 2026
Merged

Austinaminu2 merged 1 commit into
FlowwStar:mainfrom
Genghis-codes:fix/genghis-codes-batch

Conversation

@Genghis-codes

Copy link
Copy Markdown
Contributor

Summary

Fixes 4 E2E test issues in the Playwright suite:

  • E2E: make analytics.spec.ts independent of the current date #908 — analytics.spec.ts's mock-data-based assertions depended on
    which calendar day the suite ran, since the seeded streams in
    lib/mock-data.ts use offsets relative to Date.now(). Froze the clock
    with Playwright's page.clock.install() in the shared withWallet
    helper so the 30-day/all-time counts are deterministic.
  • E2E: fix strict-mode locators in visual.spec.ts form and cancel-dialog tests #907 — visual.spec.ts's "filled form screenshot" and "cancel dialog
    screenshot" tests used text= locators that matched more than one
    element (the submit button text also appears as the breadcrumb label;
    the cancel trigger button and the dialog title share the same copy).
    Replaced with getByRole('heading'/'button', { name }).
  • E2E: replace ambiguous text=Dashboard locators with role-based ones #905 — locator('text=Dashboard') matched the navbar link, the
    mobile nav link, and (on the dashboard page) the page's own <h1>, or
    (on the stream detail page) both the navbar link and the page's own
    back-to-dashboard link. Replaced with a role-based heading locator for
    the dashboard page and a main-landmark-scoped link locator for the
    stream detail page's back button.
  • E2E: create-form tests in contract-integration.spec.ts need a connected wallet #903 — The create-form tests in contract-integration.spec.ts
    (should show create form with recipient field, should handle token selection, should have accessible form labels) visited /app/create
    without a connected wallet. Since the form is wrapped in
    RequireWallet, they only ever saw the connect prompt. Added the same
    withWallet mock-xBull helper accessibility.spec.ts already uses, and
    call it before navigating in these three tests.

Test plan

  • CI Playwright run on chromium-desktop

Closes #908
Closes #907
Closes #905
Closes #903

🤖 Generated with Claude Code

- analytics.spec.ts: freeze the clock with page.clock so which mock
  streams fall inside the 30-day/all-time window no longer depends on
  the day the suite runs.
- visual.spec.ts: replace ambiguous text= locators (which matched both
  the submit button and the tx-preview dialog, or both the trigger
  button and the dialog title) with getByRole('heading'/'button', ...)
  so the filled-form and cancel-dialog screenshot tests get past the
  locator step without strict-mode violations.
- visual.spec.ts / contract-integration.spec.ts: replace
  locator('text=Dashboard'), which matched 2-4 elements (navbar link,
  mobile nav link, page heading, back-to-dashboard link), with a
  role-based heading locator on the dashboard page and a main-landmark
  scoped link locator on the stream detail page.
- contract-integration.spec.ts: connect the mock xBull wallet (same
  helper pattern as accessibility.spec.ts) before visiting /app/create
  in the create-form tests, since the form is wrapped in RequireWallet
  and renders only a connect prompt otherwise.

Closes FlowwStar#908
Closes FlowwStar#907
Closes FlowwStar#905
Closes FlowwStar#903

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@drips-wave

drips-wave Bot commented Oct 18, 2026

Copy link
Copy Markdown

@Genghis-codes Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Austinaminu2
Austinaminu2 merged commit 6689306 into FlowwStar:main Oct 18, 2026
1 of 7 checks passed

This branch had an error being deployed

1 failed deployment
staging — e523a9b3 Deployed Oct 18, 2026 by Genghis-codes via deploy-staging #349
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants