From bd834175d40a2dc296a94126dcbc03b0d2575ce8 Mon Sep 17 00:00:00 2001 From: Chris Farhood Date: Tue, 5 May 2026 15:35:59 +0000 Subject: [PATCH] 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 --- e2e/rook.spec.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/e2e/rook.spec.ts b/e2e/rook.spec.ts index bb6f15d..d3efa53 100644 --- a/e2e/rook.spec.ts +++ b/e2e/rook.spec.ts @@ -44,8 +44,12 @@ test.describe('Rook plugin smoke tests', () => { await page.goto('/c/main/rook-ceph'); const sidebar = page.getByRole('navigation', { name: 'Navigation' }); - const storageClassesLink = sidebar.getByRole('link', { name: /storage classes/i }); - await expect(storageClassesLink).toBeVisible({ timeout: 10_000 }); + const rookBtn = sidebar.getByRole('button', { name: /rook/i }); + 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 page.waitForLoadState('networkidle'); -- 2.52.0