-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
Description
E2E Test Stabilization: Fix 76 Failing Tests
Priority
P2 - Test infrastructure - 10-15 hours
Problem
76 E2E tests are currently failing on staging branch (pre-existing failures, not related to recent code changes). This prevents the E2E test suite from being a reliable gate for CI/CD.
Test Results: 92 passing, 76 failing, 15 skipped (37.9 min runtime)
Root Causes
1. Element Visibility Issues (Most Common)
- Symptom: element is outside of the viewport
- Cause: Elements not scrolled into view before interaction
- Affected: Session History, Ralph/Lisa modes, Worktree panels
2. Timeout Issues (Second Most Common)
- Symptom: Timeout 30000ms exceeded
- Cause: Modals/panels not opening within timeout
- Affected: Session History modal, Mark as Unread, Voice settings
3. Locator Issues
- Symptom: Element not found or multiple matches
- Cause: Incorrect or ambiguous selectors
- Affected: Toggle buttons, dropdowns
Implementation Plan
Phase 1: Add Viewport Helpers (2-3 hours)
Create tests/e2e/helpers/viewport.ts with:
- scrollIntoViewAndClick(locator)
- waitForModal(window, modalTitle)
Phase 2: Fix Modal Opening Tests (3-4 hours)
- Update openSessionHistoryModal() with longer timeouts
- Add scroll-into-view before clicking buttons
- Wait for modal visibility explicitly
Phase 3: Fix Toggle/Dropdown Tests (2-3 hours)
- Improve toggle button locators (use data-testid)
- Add explicit waits for dropdown expansion
- Scroll panels into view before interaction
Phase 4: Fix Miscellaneous (2-3 hours)
- Layout tests: Update window control expectations
- Screenshot tests: Add proper waits
- Voice server: Fix IPC expectations or skip
Phase 5: Make Tests Faster (1-2 hours)
- Enable parallel execution (workers: 2-4)
- Reduce unnecessary waitForTimeout calls
- Use more specific locators
- Skip screenshot generation in CI
Files to Modify
- tests/e2e/helpers/ (new helpers)
- tests/e2e/*.spec.ts (update tests)
- playwright.config.ts (parallelization)
Acceptance Criteria
- All 188 E2E tests passing (0 failures)
- Test suite runtime under 20 minutes
- No flaky tests (run 3x successfully)
- CI can use E2E tests as gate
Reactions are currently unavailable