fix(e2e): Fix 12 failing E2E tests - DataTable reactivity and selector issues
- Fix DataTable reactivity: use $derived with getters for data/columns props - Fix auth.spec.js: open user dropdown before clicking Logout button - Fix dashboard.spec.ts: scope selectors to layout-content, use exact matches - Fix layout.spec.ts: clear localStorage before breakpoint tests, wait for focus - Fix projects/team-members.spec.ts: wait for table rows to be visible Root causes: 1. DataTable options object captured initial empty array, not reactive updates 2. Selectors matched multiple elements (sidebar, user menu, main content) 3. Dropdown menus need to be opened before clicking items 4. Keyboard shortcuts need element focus All 94 tests now pass (47 chromium + 47 firefox)
This commit is contained in:
@@ -21,8 +21,8 @@ test.describe('Projects Page', () => {
|
||||
});
|
||||
|
||||
test('search filters projects', async ({ page }) => {
|
||||
// Wait for data to load
|
||||
await page.waitForTimeout(500);
|
||||
// Wait for the table to render (not loading state)
|
||||
await expect(page.locator('table tbody tr').first()).toBeVisible({ timeout: 5000 });
|
||||
|
||||
// Get initial row count
|
||||
const initialRows = await page.locator('table tbody tr').count();
|
||||
@@ -38,8 +38,8 @@ test.describe('Projects Page', () => {
|
||||
});
|
||||
|
||||
test('status filter works', async ({ page }) => {
|
||||
// Wait for data to load
|
||||
await page.waitForTimeout(500);
|
||||
// Wait for the table to render (not loading state)
|
||||
await expect(page.locator('table tbody tr').first()).toBeVisible({ timeout: 5000 });
|
||||
|
||||
// Get initial row count
|
||||
const initialRows = await page.locator('table tbody tr').count();
|
||||
|
||||
Reference in New Issue
Block a user