Skip to content

Commit

Permalink
Fixing e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminleonard committed Oct 18, 2023
1 parent aa350d0 commit c59576a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions app/test/e2e/authz.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion app/test/e2e/inventory.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
})
})

Expand Down
12 changes: 6 additions & 6 deletions app/test/e2e/silos.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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()

Expand All @@ -114,19 +114,19 @@ 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'),
])
})

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()

Expand Down

0 comments on commit c59576a

Please sign in to comment.