Compare commits

...

1 Commits

Author SHA1 Message Date
Chris Farhood bd834175d4 fix(e2e): use button role for storage classes sidebar link in rook plugin
The storage classes sidebar entry is a button, not a link. Using getByRole('link')
caused the test to fail with 'element not found'. Switch to getByRole('button')
which matches the actual Headlamp sidebar structure.

Also increased timeout from 10s to 15s for consistency with other waits.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-05 15:35:59 +00:00
+6 -2
View File
@@ -44,8 +44,12 @@ test.describe('Rook plugin smoke tests', () => {
await page.goto('/c/main/rook-ceph'); await page.goto('/c/main/rook-ceph');
const sidebar = page.getByRole('navigation', { name: 'Navigation' }); const sidebar = page.getByRole('navigation', { name: 'Navigation' });
const storageClassesLink = sidebar.getByRole('link', { name: /storage classes/i }); const rookBtn = sidebar.getByRole('button', { name: /rook/i });
await expect(storageClassesLink).toBeVisible({ timeout: 10_000 }); await rookBtn.click();
await page.waitForLoadState('networkidle');
const storageClassesLink = sidebar.getByRole('button', { name: /storage classes/i });
await expect(storageClassesLink).toBeVisible({ timeout: 15_000 });
await storageClassesLink.click(); await storageClassesLink.click();
await page.waitForLoadState('networkidle'); await page.waitForLoadState('networkidle');