Skip to content

account-and-workspaces e2e flakes on a duplicated provider card #255

Closed

Description

@imshashank

Failed once on main (373ca37, run 31274006508), passed on re-run of the same commit, and passed on a branch containing that same commit. Pre-existing and intermittent, not a regression from anything merged around it.

What Playwright reported

Error: strict mode violation: getByTestId('provider-github').getByText('Connected')
resolved to 2 elements:
  2 × <span class="...text-success">Connected</span>
      - unexpected value "hidden"

apps/web/e2e/account-and-workspaces.spec.ts:85

What it is not

connected-accounts.tsx renders exactly one <Badge tone="success">Connected</Badge> per provider card, and describeProvider returns Account <id> when linked, so the description does not contain the word. Two identical badges means getByTestId('provider-github') matched two list items, not that one card held two badges.

Likely cause

One of the two is hidden, which is what a soft navigation looks like while the outgoing tree is still mounted: the test does page.goto('/settings/account/connections') and asserts immediately, with no wait for the previous view to unmount. Playwright resolves both trees and strict mode rejects the ambiguity.

That would also explain why it is rare and why a re-run passes.

Worth fixing regardless

Even if the duplication is transient, the assertion is too loose to be trustworthy: it passes or fails depending on which tree Playwright resolves first. Options, roughly in order of preference:

  1. wait for the connections view to settle before asserting, so only one tree is mounted
  2. scope to the visible card, e.g. getByTestId('provider-github').filter({ visible: true })
  3. give the badge its own test id and assert on that

Reproducing it reliably probably needs the e2e stack running in a loop, since it did not reproduce on demand.

Activity

  1. added
    bug
    help wanted
    p2 medium
    area: web
    ci
    size: small
    points: 2
    on Aug 8, 2026
  2. added a commit that references this issue on Aug 19, 2026
    b945462
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

    area: webbugcihelp wantedp2 mediumpoints: 2size: small

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions