Skip to content

Commit

Permalink
feat(system-e2e): Add test for admin delegations (#17536)
Browse files Browse the repository at this point in the history
* fix scopes for find all

* remove unused test
  • Loading branch information
GunnlaugurG authored Jan 23, 2025
1 parent 27c57ef commit 93980d0
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { BrowserContext, expect, test } from '@playwright/test'

import { urls } from '../../../../support/urls'
import { session } from '../../../../support/session'

test.use({ baseURL: urls.islandisBaseUrl })

test.describe('Admin portal - admin delegations', () => {
let context: BrowserContext

test.describe('As admin with write access', () => {
test.beforeAll(async ({ browser }) => {
context = await session({
browser,
homeUrl: `/stjornbord`,
phoneNumber: '0102399',
idsLoginOn: true,
})
})
test.afterAll(async () => {
await context.close()
})

test('should see "Add" button', async () => {
const page = await context.newPage()
await page.goto('/stjornbord/delegation-admin')
await expect(page.getByText('Skrá nýtt umboð')).toBeVisible()
})
})
})
1 change: 1 addition & 0 deletions libs/portals/admin/delegation-admin/src/screens/Root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const Root = () => {
height={'full'}
>
<Button
dataTestId="create-delegation-button"
onClick={() => navigate(DelegationAdminPaths.CreateDelegation)}
size="small"
>
Expand Down

0 comments on commit 93980d0

Please sign in to comment.