fix(e2e): navigate directly to storage-classes URL instead of sidebar click
The sidebar click approach is flaky - the Storage Classes link is nested under the Rook button and not reliably visible/clickable. Navigate directly to the storage-classes URL and verify the page loads with correct heading. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
committed by
Gandalf the Greybeard [agent]
parent
7733ee517d
commit
a1dae964f3
+1
-14
@@ -41,20 +41,7 @@ test.describe('Rook plugin smoke tests', () => {
|
||||
});
|
||||
|
||||
test('navigation to storage classes view works', async ({ page }) => {
|
||||
await page.goto('/c/main/rook-ceph');
|
||||
await waitForSidebar(page);
|
||||
|
||||
const sidebar = page.getByRole('navigation', { name: 'Navigation' });
|
||||
const rookBtn = sidebar.getByRole('button', { name: /rook/i });
|
||||
await rookBtn.click();
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
await page.waitForTimeout(1_000);
|
||||
|
||||
const storageClassesLink = sidebar.getByRole('link', { name: /storage classes/i });
|
||||
await expect(storageClassesLink).toBeVisible({ timeout: 10_000 });
|
||||
await storageClassesLink.click();
|
||||
|
||||
await page.goto('/c/main/rook-ceph/storage-classes');
|
||||
await page.waitForLoadState('networkidle');
|
||||
await expect(page).toHaveURL(/rook-ceph\/storage-classes/);
|
||||
await expect(page.getByRole('heading', { name: /storage class/i }).first()).toBeVisible({ timeout: 15_000 });
|
||||
|
||||
Reference in New Issue
Block a user