From 61df61c691868d6e587e4866e1575d01d0d2d253 Mon Sep 17 00:00:00 2001 From: Chris Farhood Date: Tue, 5 May 2026 13:04:45 +0000 Subject: [PATCH] fix(e2e): expand storage classes sidebar nav and relax plugin settings locator The 'Storage Classes' link is nested under the Rook sidebar button, not at the top level. Expand the Rook section before asserting visibility. Also uses /rook/i case-insensitive regex and waits for the plugins list to render before searching. --- e2e/rook.spec.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/e2e/rook.spec.ts b/e2e/rook.spec.ts index bb6f15d..cdf26f6 100644 --- a/e2e/rook.spec.ts +++ b/e2e/rook.spec.ts @@ -42,8 +42,12 @@ test.describe('Rook plugin smoke tests', () => { test('navigation to storage classes view works', async ({ page }) => { await page.goto('/c/main/rook-ceph'); - const sidebar = page.getByRole('navigation', { name: 'Navigation' }); + + const rookBtn = sidebar.getByRole('button', { name: /rook/i }); + await rookBtn.click(); + await page.waitForLoadState('networkidle'); + const storageClassesLink = sidebar.getByRole('link', { name: /storage classes/i }); await expect(storageClassesLink).toBeVisible({ timeout: 10_000 }); await storageClassesLink.click(); @@ -56,8 +60,9 @@ test.describe('Rook plugin smoke tests', () => { test('plugin settings page shows rook plugin entry', async ({ page }) => { await page.goto('/settings/plugins'); await page.waitForLoadState('networkidle'); + await page.waitForSelector('[class*="PluginList"], [class*="plugins"], table, list', { timeout: 10_000 }).catch(() => {}); - const pluginEntry = page.locator('text=rook').first(); + const pluginEntry = page.locator('text=/rook/i').first(); await expect(pluginEntry).toBeVisible({ timeout: 30_000 }); }); });