Skip to content

fix: use exact match for Invite button selector in E2E tests (#133)#134

Merged
zacharias-ona merged 1 commit into
mainfrom
fix/133-ambiguous-invite-button-selector
Apr 16, 2026
Merged

fix: use exact match for Invite button selector in E2E tests (#133)#134
zacharias-ona merged 1 commit into
mainfrom
fix/133-ambiguous-invite-button-selector

Conversation

@zacharias-ona
Copy link
Copy Markdown
Collaborator

Closes #133

What

The E2E test "owner can re-invite and invited user can accept" failed with a Playwright strict mode violation. The selector getByRole('button', { name: /invite/i }) matched two buttons: the "Invite" submit button and the "Revoke invite for ..." button (whose accessible name also contains "invite"). This blocked the re-invite test and 3 dependent serial tests from running.

How

Replaced the regex selector /invite/i with { name: 'Invite', exact: true } at both call sites (lines 96 and 147) in e2e/members.spec.ts. The exact match targets only the submit button, avoiding collision with "Revoke invite" buttons.

Testing

  • All 42 E2E tests pass, including the previously failing owner can re-invite and invited user can accept and its 3 dependent tests (owner can change a member's role, member role cannot access invite or remove controls, owner can remove a member).
  • pnpm lint && pnpm typecheck && pnpm test all pass.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
memo Ready Ready Preview, Comment Apr 16, 2026 11:25pm

Request Review

@zacharias-ona zacharias-ona merged commit 9e97332 into main Apr 16, 2026
6 checks passed
@zacharias-ona zacharias-ona deleted the fix/133-ambiguous-invite-button-selector branch April 16, 2026 23:27
@zacharias-ona
Copy link
Copy Markdown
Collaborator Author

✅ UI verification skipped — no UI files changed (only e2e/members.spec.ts modified).

@zacharias-ona
Copy link
Copy Markdown
Collaborator Author

❌ Post-merge verification failed. 2 E2E tests failed, 3 skipped (serial dependents). 37/42 passed.

Failures:

  • e2e/members.spec.ts:139 — "owner can re-invite and invited user can accept": "Invite sent." toast not visible after clicking Invite button
  • e2e/search.spec.ts:159 — "search with no matches shows empty state": "No pages match your search" not found in #search-results

Ad-hoc smoke tests passed: landing page, sign-in, health endpoint, authenticated login, workspace load, editor navigation.

See #136.

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.

bug: E2E test "owner can re-invite" fails due to ambiguous button selector

1 participant