From 15d161c3124d1e9a12ed09bab1cc7704070047fc Mon Sep 17 00:00:00 2001 From: Chris Farhood Date: Tue, 5 May 2026 12:21:22 +0000 Subject: [PATCH 1/5] fix(e2e): use pnpm-capable workflow branch with namespace param --- .github/workflows/e2e.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 4ee85a4..fef1a13 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -18,6 +18,6 @@ jobs: e2e: uses: privilegedescalation/.github/.github/workflows/plugin-e2e.yaml@hugh/add-pnpm-support-plugin-e2e with: - node-version: '22' + node-version: "22" headlamp-version: v0.40.1 e2e-namespace: headlamp-dev -- 2.52.0 From 61df61c691868d6e587e4866e1575d01d0d2d253 Mon Sep 17 00:00:00 2001 From: Chris Farhood Date: Tue, 5 May 2026 13:04:45 +0000 Subject: [PATCH 2/5] 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 }); }); }); -- 2.52.0 From 0d9f9d859a35cae5650b244d8dc62a04ae951f41 Mon Sep 17 00:00:00 2001 From: Chris Farhood Date: Tue, 5 May 2026 13:56:35 +0000 Subject: [PATCH 3/5] fix(e2e): use .first() to handle strict mode violations (PRI-699) Similar to the kube-vip fix, /overview/i and /storage class/i can match multiple headings. Using .first() to avoid strict mode violations. --- e2e/rook.spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/e2e/rook.spec.ts b/e2e/rook.spec.ts index cdf26f6..1b3d556 100644 --- a/e2e/rook.spec.ts +++ b/e2e/rook.spec.ts @@ -24,14 +24,14 @@ test.describe('Rook plugin smoke tests', () => { await page.waitForLoadState('networkidle'); await expect(page).toHaveURL(/rook-ceph/); - await expect(page.getByRole('heading', { name: /overview/i })).toBeVisible(); + await expect(page.getByRole('heading', { name: /overview/i }).first()).toBeVisible(); }); test('overview page renders content', async ({ page }) => { await page.goto('/c/main/rook-ceph'); await waitForSidebar(page); - await expect(page.getByRole('heading', { name: /overview/i })).toBeVisible({ + await expect(page.getByRole('heading', { name: /overview/i }).first()).toBeVisible({ timeout: 15_000, }); @@ -54,13 +54,13 @@ test.describe('Rook plugin smoke tests', () => { await page.waitForLoadState('networkidle'); await expect(page).toHaveURL(/rook-ceph\/storage-classes/); - await expect(page.getByRole('heading', { name: /storage class/i })).toBeVisible({ timeout: 15_000 }); + await expect(page.getByRole('heading', { name: /storage class/i }).first()).toBeVisible({ timeout: 15_000 }); }); 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(() => {}); + await page.waitForSelector('table, [class*="PluginList"], [class*="plugin"]', { timeout: 10_000 }).catch(() => {}); const pluginEntry = page.locator('text=/rook/i').first(); await expect(pluginEntry).toBeVisible({ timeout: 30_000 }); -- 2.52.0 From 13347ab9c18c3d30935cd92e7433f4fc31010a65 Mon Sep 17 00:00:00 2001 From: Chris Farhood Date: Tue, 5 May 2026 14:02:34 +0000 Subject: [PATCH 4/5] fix(e2e): prevent stale sidebar reference in storage-classes navigation test Re-acquire sidebar reference after clicking Rook button to avoid stale locator capturing wrong sidebar state during transition. PR #56 follow-up for PRI-699. --- 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 1b3d556..7f77477 100644 --- a/e2e/rook.spec.ts +++ b/e2e/rook.spec.ts @@ -45,11 +45,15 @@ test.describe('Rook plugin smoke tests', () => { const sidebar = page.getByRole('navigation', { name: 'Navigation' }); const rookBtn = sidebar.getByRole('button', { name: /rook/i }); + await expect(rookBtn).toBeVisible(); await rookBtn.click(); await page.waitForLoadState('networkidle'); - const storageClassesLink = sidebar.getByRole('link', { name: /storage classes/i }); - await expect(storageClassesLink).toBeVisible({ timeout: 10_000 }); + const sidebarAfterClick = page.getByRole('navigation', { name: 'Navigation' }); + await expect(sidebarAfterClick).toBeVisible(); + + const storageClassesLink = sidebarAfterClick.getByRole('link', { name: /storage classes/i }); + await storageClassesLink.waitFor({ state: 'visible', timeout: 15_000 }); await storageClassesLink.click(); await page.waitForLoadState('networkidle'); -- 2.52.0 From ac8c2499a23b7616578790e285974751ae1df3e5 Mon Sep 17 00:00:00 2001 From: Chris Farhood Date: Tue, 5 May 2026 17:43:52 +0000 Subject: [PATCH 5/5] fix(e2e): reference @main workflow after .github merge Co-Authored-By: Paperclip --- .github/workflows/e2e.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index fef1a13..0363889 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -16,7 +16,7 @@ concurrency: jobs: e2e: - uses: privilegedescalation/.github/.github/workflows/plugin-e2e.yaml@hugh/add-pnpm-support-plugin-e2e + uses: privilegedescalation/.github/.github/workflows/plugin-e2e.yaml@main with: node-version: "22" headlamp-version: v0.40.1 -- 2.52.0