From c59576a2064727b462f1f4049d7d83d4373afde4 Mon Sep 17 00:00:00 2001 From: Benjamin Leonard Date: Wed, 18 Oct 2023 14:39:39 +0100 Subject: [PATCH] Fixing e2e tests --- app/test/e2e/authz.e2e.ts | 4 ++-- app/test/e2e/inventory.e2e.ts | 2 +- app/test/e2e/silos.e2e.ts | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/test/e2e/authz.e2e.ts b/app/test/e2e/authz.e2e.ts index 8f3c5a526..03122c077 100644 --- a/app/test/e2e/authz.e2e.ts +++ b/app/test/e2e/authz.e2e.ts @@ -10,7 +10,7 @@ import { expect, getDevUserPage, test } from './utils' test.describe('Silo/system picker', () => { test('appears for fleet viewer', async ({ page }) => { await page.goto('/projects') - await expect(page.getByRole('link', { name: 'SILO default-silo' })).toBeVisible() + await expect(page.getByRole('link', { name: 'SILO maze-war' })).toBeVisible() await expect( page.getByRole('button', { name: 'Switch between system and silo' }) ).toBeVisible() @@ -19,7 +19,7 @@ test.describe('Silo/system picker', () => { test('does not appear to for dev user', async ({ browser }) => { const page = await getDevUserPage(browser) await page.goto('/projects') - await expect(page.getByRole('link', { name: 'SILO default-silo' })).toBeVisible() + await expect(page.getByRole('link', { name: 'SILO maze-war' })).toBeVisible() await expect( page.getByRole('button', { name: 'Switch between system and silo' }) ).toBeHidden() diff --git a/app/test/e2e/inventory.e2e.ts b/app/test/e2e/inventory.e2e.ts index 6d14fe96b..a5704354f 100644 --- a/app/test/e2e/inventory.e2e.ts +++ b/app/test/e2e/inventory.e2e.ts @@ -31,7 +31,7 @@ test('Sled inventory page', async ({ page }) => { const instancesTable = page.getByRole('table') await expectRowVisible(instancesTable, { - name: 'default-silo / mock-projectdb1', + name: 'maze-war / mock-projectdb1', }) }) diff --git a/app/test/e2e/silos.e2e.ts b/app/test/e2e/silos.e2e.ts index 3aaca313c..8d8475f72 100644 --- a/app/test/e2e/silos.e2e.ts +++ b/app/test/e2e/silos.e2e.ts @@ -17,7 +17,7 @@ test('Create silo', async ({ page }) => { await expectVisible(page, ['role=heading[name*="Silos"]']) const table = page.locator('role=table') await expectRowVisible(table, { - name: 'default-silo', + name: 'maze-war', 'Identity mode': 'saml jit', // not easy to assert this until we can calculate accessible name instead of text content // discoverable: 'true', @@ -105,7 +105,7 @@ test('Create silo', async ({ page }) => { await page.goBack() // now delete it - await page.locator('role=button[name="Row actions"]').nth(1).click() + await page.locator('role=button[name="Row actions"]').nth(2).click() await page.click('role=menuitem[name="Delete"]') await page.getByRole('button', { name: 'Confirm' }).click() @@ -114,9 +114,9 @@ test('Create silo', async ({ page }) => { test('Default silo', async ({ page }) => { await page.goto('/system/silos') - await page.getByRole('link', { name: 'default-silo' }).click() + await page.getByRole('link', { name: 'myriad' }).click() - await expect(page.getByRole('heading', { name: 'default-silo' })).toBeVisible() + await expect(page.getByRole('heading', { name: 'myriad' })).toBeVisible() await expectNotVisible(page, [ page.getByText('Silo adminFleet admin'), page.getByText('Silo viewerFleet viewer'), @@ -124,9 +124,9 @@ test('Default silo', async ({ page }) => { }) test('Identity providers', async ({ page }) => { - await page.goto('/system/silos/default-silo') + await page.goto('/system/silos/maze-war') - await expectVisible(page, ['role=heading[name*=default-silo]']) + await expectVisible(page, ['role=heading[name*=maze-war]']) await page.getByRole('link', { name: 'mock-idp' }).click()