fix: Use correct sidebar locator based on actual HTML structure

- Change from generic nav/sidebar selectors to specific div.w-64.bg-card.border-r.border-border
- This matches the actual sidebar structure in the demo source code
- Should fix the remaining sidebar toggle test failure
This commit is contained in:
Peter Hanssens
2025-09-23 21:21:06 +10:00
parent 6c7cc45f25
commit dd97daa16b

View File

@@ -33,7 +33,7 @@ test.describe('Comprehensive Dashboard Demo E2E Tests', () => {
});
test('should have proper sidebar navigation', async () => {
const sidebar = page.locator('nav, .sidebar, [role="navigation"]').first();
const sidebar = page.locator('div.w-64.bg-card.border-r.border-border');
await expect(sidebar).toBeVisible();
// Check navigation links
@@ -214,7 +214,7 @@ test.describe('Comprehensive Dashboard Demo E2E Tests', () => {
await sidebarToggle.click();
// Check that sidebar is hidden/shown
const sidebar = page.locator('nav, .sidebar, [role="navigation"]').first();
const sidebar = page.locator('div.w-64.bg-card.border-r.border-border');
await expect(sidebar).toBeVisible();
});
});