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

Đang mở
#404 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
72/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
nextjs, playwright, react, typescript
Lĩnh vực
testing

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
1
Fork
1
Merge trung bình
6 giờ 56 phút
Pull request đã merge (30 ngày)
136

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của eddiejaoude/StackDash

Tất cả issue của eddiejaoude/StackDash

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.