fix(web): six e2e tests fail since the header live indicator lists connections

Aperta
#404 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
nextjs, playwright, react, typescript
Ambito
testing

Direzione di ricerca

Start by reading the header indicator in src/components/app/arrivals.tsx (around lines 290 and 359) and the badge in src/components/connections/connection-status-badge.tsx:43 to see why the hidden tooltip duplicates page text. Then fix each lookup at e2e/connections.spec.ts:123,254,539, e2e/digitalocean.spec.ts:17 and e2e/posthog.spec.ts:14, scoping them to main content or role/name so they still fail if the page text disappears; the infinite .live-ready animation in src/app/globals.css:430 is what stalls the helper at e2e/year-in-review.spec.ts:16. Run the four specs through safe-e2e.sh, then the full PW_PROJECT=instance-wide suite; done means all six pass and no instance-wide specs are skipped.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: ci area: web bug priority: P2 size: S

Context

Since #395 (1ec5fdd, Closes #392) put the connected connections in the header live indicator, six Chromium end-to-end tests fail on main. Because they are in the chromium project, Playwright then skips the four instance-wide specs (simulated-providers, alert-email, simulated-sentry, demo-event), so a full run on main covers 292 of 302 tests.

Found while running the full local gate for the #377 epic pull request. Each failure was rerun on its own with the guarded runner (safe-e2e.sh <dir> 3197 -c <throwaway config> <spec:line>...) on main at 1ec5fdd and on 377-timeline-polish at 373203e (which contains 1ec5fdd). All six fail the same way on both:

[chromium] e2e/connections.spec.ts:123  getByText('No connections yet') strict mode violation: resolved to 2 elements:
    1) <p>No connections yet. Add one on the Connections pa…</p>
    2) <h2 ...>No connections yet</h2>
[chromium] e2e/connections.spec.ts:254  getByText('Status: Needs attention').first()  Expected: visible  Received: hidden
[chromium] e2e/connections.spec.ts:539  getByText('Status: Active').first()           Expected: visible  Received: hidden
[chromium] e2e/digitalocean.spec.ts:17  getByText('Example team').first()             Expected: visible  Received: hidden
[chromium] e2e/posthog.spec.ts:14       getByText('Example organization').first()     Expected: visible  Received: hidden
[chromium] e2e/year-in-review.spec.ts:22  Test timeout of 30000ms exceeded.
    > 16 | await page.evaluate(() => Promise.all(document.getAnimations().map((animation) => animation.finished)));

Causes, from the code on main:

  • src/components/app/arrivals.tsx renders LiveConnectionsList inside the header indicator's tooltip on every workspace page. It prints No connections yet. Add one on the Connections page. (line 359) and each connection with its status badge, whose screen reader text is Status: <label> (src/components/connections/connection-status-badge.tsx:43), plus the connection and account names. The tooltip is in the DOM but hidden, and it comes before the page content, so getByText(...) is ambiguous and getByText(...).first() picks the hidden copy.
  • src/app/globals.css:430 gives .live-ready (the live dot, arrivals.tsx:290) animation: live-ready 2.4s ease-out infinite. An infinite animation's finished promise never resolves, so the year in review spec's "wait for every animation" helper (e2e/year-in-review.spec.ts:16) waits until the test times out. The spec does not use reduced motion, which is the only state that stops the animation.

GitHub Actions has produced no run since 2026-11-06, so CI did not catch this on #395.

Plan

  1. Scope the five text lookups to the page content rather than the whole document (for example page.getByRole("main")), or select the elements by role and accessible name, so the header tooltip cannot match. Do not change the tooltip copy to dodge the selectors.
  2. Make the year in review helper wait only for animations that can finish (skip those whose effect timing has iterations: Infinity), or scope it to the slide element it scans.
  3. Run the six tests, then the full suite, so the instance-wide specs run again.

Acceptance criteria

  • The six tests above pass on a local run with the header live indicator showing connections and showing none.
  • A full run of playwright test --project=instance-wide (chromium as its dependency) reports no skipped instance-wide specs.
  • No assertion is loosened: each lookup still fails if the page itself stops showing the text.

Files and areas

  • e2e/connections.spec.ts, e2e/digitalocean.spec.ts, e2e/posthog.spec.ts, e2e/year-in-review.spec.ts.
  • Non-goals: changing the live indicator's behavior or copy (#392), and the GitHub Actions outage.

Verification

/Users/eddie/Downloads/brain/scripts/safe-e2e.sh <worktree> <port> -c <config> e2e/connections.spec.ts e2e/digitalocean.spec.ts e2e/posthog.spec.ts e2e/year-in-review.spec.ts passes, then the full suite with PW_PROJECT=instance-wide.

Model: anthropic/claude-opus-5-5 | Reasoning effort: not exposed by harness

Lingua principale
TypeScript
Stelle
1
Fork
1
Merge medio
6h 56m
PR unite (30g)
136

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di eddiejaoude/StackDash

Tutte le issue di eddiejaoude/StackDash

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.