fix(e2e): add waitForSidebar before clicking Rook button + 1s wait after
Add waitForSidebar() call before clicking Rook button to ensure sidebar is fully loaded. Add 1s explicit wait after clicking Rook button to allow sidebar animation to complete before searching for nested Storage Classes link. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
committed by
Gandalf the Greybeard [agent]
parent
c70bef73d6
commit
7733ee517d
+4
-1
@@ -42,12 +42,15 @@ test.describe('Rook plugin smoke tests', () => {
|
|||||||
|
|
||||||
test('navigation to storage classes view works', async ({ page }) => {
|
test('navigation to storage classes view works', async ({ page }) => {
|
||||||
await page.goto('/c/main/rook-ceph');
|
await page.goto('/c/main/rook-ceph');
|
||||||
const sidebar = page.getByRole('navigation', { name: 'Navigation' });
|
await waitForSidebar(page);
|
||||||
|
|
||||||
|
const sidebar = page.getByRole('navigation', { name: 'Navigation' });
|
||||||
const rookBtn = sidebar.getByRole('button', { name: /rook/i });
|
const rookBtn = sidebar.getByRole('button', { name: /rook/i });
|
||||||
await rookBtn.click();
|
await rookBtn.click();
|
||||||
await page.waitForLoadState('networkidle');
|
await page.waitForLoadState('networkidle');
|
||||||
|
|
||||||
|
await page.waitForTimeout(1_000);
|
||||||
|
|
||||||
const storageClassesLink = sidebar.getByRole('link', { name: /storage classes/i });
|
const storageClassesLink = sidebar.getByRole('link', { name: /storage classes/i });
|
||||||
await expect(storageClassesLink).toBeVisible({ timeout: 10_000 });
|
await expect(storageClassesLink).toBeVisible({ timeout: 10_000 });
|
||||||
await storageClassesLink.click();
|
await storageClassesLink.click();
|
||||||
|
|||||||
Reference in New Issue
Block a user