[TEST] 11 E2E tests still failing after fixes #19

Closed
opened 2026-02-19 00:30:50 +00:00 by santhoshj · 0 comments
Owner

Remaining E2E Test Failures

After test fixes, 11 tests still failing:

Failing Tests Summary

Test File Test Name Browsers Issue
auth.spec.js logout invalidates refresh token Chromium, Firefox Timeout (30s)
dashboard.spec.ts dashboard renders correctly Chromium, Firefox Element visibility
layout.spec.ts all key breakpoints render expected sidebar state Chromium, Firefox State mismatch
layout.spec.ts keyboard shortcut toggles sidebar Chromium, Firefox No state change
team-members.spec.ts search filters team members Chromium, Firefox Element visibility
projects.spec.ts search filters projects Chromium, Firefox Element visibility

Test 1: Auth - Logout Invalidates Refresh Token

Error: Test timeout of 30000ms exceeded

Likely Cause:

  • Logout API call hanging
  • Missing mock for logout endpoint
  • Async operation not completing

Test 2: Dashboard - Renders Correctly

Error: Element visibility failures

Likely Cause:

  • Page content not fully loaded before assertions
  • Timing issues with data rendering
  • Component hydration delays

Suggested Fix:

// Add explicit waits for content
await page.waitForSelector('h1', { timeout: 10000 });

Test 3: Layout - Key Breakpoints Sidebar State

Error: Expected "collapsed" but received "expanded"

Likely Cause:

  • Sidebar state initialization not respecting viewport
  • Responsive breakpoints not matching test expectations
  • LocalStorage state overriding viewport logic

Test 4: Layout - Keyboard Shortcut Toggles Sidebar

Error: Sidebar state not changing after Ctrl+\

Likely Cause:

  • Keyboard event listener not attached
  • Shortcut handler not updating store
  • Event bubbling/prevention issues

Test 5-6: Team Members/Projects - Search Filters

Error: Element not found / visibility issues

Likely Cause:

  • DataTable not rendering data properly
  • Search filtering not working correctly
  • Component hydration timing

Test Run Command

cd frontend
npm run test:e2e

Current Test Results

83 passed
11 failed
  1. Auth tests: Add proper API mocking or check logout endpoint
  2. Dashboard tests: Add explicit wait conditions
  3. Layout tests: Debug sidebar state management
  4. DataTable tests: Verify component renders data correctly
  5. All tests: Consider adding retry logic for flaky tests

Environment

  • Node.js: 20.x
  • Playwright: 1.40+
  • Browsers: Chromium, Firefox
## Remaining E2E Test Failures After test fixes, 11 tests still failing: ### Failing Tests Summary | Test File | Test Name | Browsers | Issue | |-----------|-----------|----------|-------| | `auth.spec.js` | logout invalidates refresh token | Chromium, Firefox | Timeout (30s) | | `dashboard.spec.ts` | dashboard renders correctly | Chromium, Firefox | Element visibility | | `layout.spec.ts` | all key breakpoints render expected sidebar state | Chromium, Firefox | State mismatch | | `layout.spec.ts` | keyboard shortcut toggles sidebar | Chromium, Firefox | No state change | | `team-members.spec.ts` | search filters team members | Chromium, Firefox | Element visibility | | `projects.spec.ts` | search filters projects | Chromium, Firefox | Element visibility | --- ### Test 1: Auth - Logout Invalidates Refresh Token **Error:** Test timeout of 30000ms exceeded **Likely Cause:** - Logout API call hanging - Missing mock for logout endpoint - Async operation not completing --- ### Test 2: Dashboard - Renders Correctly **Error:** Element visibility failures **Likely Cause:** - Page content not fully loaded before assertions - Timing issues with data rendering - Component hydration delays **Suggested Fix:** ```typescript // Add explicit waits for content await page.waitForSelector('h1', { timeout: 10000 }); ``` --- ### Test 3: Layout - Key Breakpoints Sidebar State **Error:** Expected "collapsed" but received "expanded" **Likely Cause:** - Sidebar state initialization not respecting viewport - Responsive breakpoints not matching test expectations - LocalStorage state overriding viewport logic --- ### Test 4: Layout - Keyboard Shortcut Toggles Sidebar **Error:** Sidebar state not changing after Ctrl+\\ **Likely Cause:** - Keyboard event listener not attached - Shortcut handler not updating store - Event bubbling/prevention issues --- ### Test 5-6: Team Members/Projects - Search Filters **Error:** Element not found / visibility issues **Likely Cause:** - DataTable not rendering data properly - Search filtering not working correctly - Component hydration timing --- ## Test Run Command ```bash cd frontend npm run test:e2e ``` ## Current Test Results ``` 83 passed 11 failed ``` ## Recommended Actions 1. **Auth tests:** Add proper API mocking or check logout endpoint 2. **Dashboard tests:** Add explicit wait conditions 3. **Layout tests:** Debug sidebar state management 4. **DataTable tests:** Verify component renders data correctly 5. **All tests:** Consider adding retry logic for flaky tests --- ## Environment - Node.js: 20.x - Playwright: 1.40+ - Browsers: Chromium, Firefox
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: santhoshj/headroom#19