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>
This commit is contained in:
committed by
Gandalf the Greybeard [agent]
parent
775904df12
commit
bd834175d4
+6
-2
@@ -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');
|
||||||
|
|||||||
Reference in New Issue
Block a user