Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(system-e2e): Add test for admin delegations #17536

Merged
merged 2 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading