-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bankid frontend tester og fjerning/refaktor av org-tilgang service-de…
…v og tilgang-frontend (#3615) * Lagt til mer logging for bankid innlogging dersom prosessen feiler * Skrevet Playwright test for innlogging av bankid bruker * Oppdatert dependencies og fjernet ubrukt testcafe config * Mulighet til å hente maskinporten client gjennom swagger * Støtter azure på person-org-tilgang-service * Lagt til oversikt-frontend i inbound rules * Slettet overflødig organisasjon-tilgang-frontend * Fjernet dev versjon av person-organisasjon-tilgang-service
- Loading branch information
Showing
65 changed files
with
131 additions
and
6,059 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,13 +6,28 @@ export const gjeldendeProfilMock = { | |
type: 'Testbruker', | ||
} | ||
|
||
export const gjeldendeBrukerMock = { | ||
export const gjeldendeAzureBrukerMock = { | ||
brukerId: '1234-5678-12', | ||
brukernavn: 'BeASt, BugTerminator', | ||
brukertype: 'BASIC', | ||
brukertype: 'AZURE', | ||
epost: '[email protected]', | ||
} | ||
|
||
export const gjeldendeBankidBrukerMock = { | ||
brukerId: '12345678912', | ||
brukernavn: 'BeASt, BugTerminator', | ||
brukertype: 'BANKID', | ||
} | ||
|
||
export const personOrgTilgangMock = [ | ||
{ | ||
navn: 'testytest', | ||
organisasjonsnummer: '12345678', | ||
organisasjonsfrom: 'BEDR', | ||
gyldigTil: '2100-10-10T10:10:10.100Z', | ||
}, | ||
] | ||
|
||
export const personFragmentSearchMock = [ | ||
{ | ||
ident: '12345678912', | ||
|
@@ -54,7 +69,7 @@ export const brukerMalerMock = { | |
id: 1, | ||
malNavn: 'Teste Playwright', | ||
bestilling: malBestilling, | ||
bruker: gjeldendeBrukerMock, | ||
bruker: gjeldendeAzureBrukerMock, | ||
}, | ||
], | ||
}, | ||
|
@@ -65,7 +80,7 @@ export const brukerMalerEndretMock = [ | |
id: 1, | ||
malNavn: 'Nytt navn på mal', | ||
bestilling: malBestilling, | ||
bruker: gjeldendeBrukerMock, | ||
bruker: gjeldendeAzureBrukerMock, | ||
}, | ||
] | ||
|
||
|
@@ -75,7 +90,7 @@ export const uferdigBestillingMock = { | |
antallLevert: 0, | ||
ferdig: false, | ||
sistOppdatert: '2023-04-21T10:38:10.11282', | ||
bruker: gjeldendeBrukerMock, | ||
bruker: gjeldendeAzureBrukerMock, | ||
gruppeId: 2, | ||
stoppet: false, | ||
bestilling: { | ||
|
@@ -1317,7 +1332,7 @@ export const backendBestillingerMock = [ | |
antallLevert: 1, | ||
ferdig: true, | ||
sistOppdatert: '2022-01-01T11:59:25.998969', | ||
bruker: gjeldendeBrukerMock, | ||
bruker: gjeldendeAzureBrukerMock, | ||
gruppeId: 1, | ||
stoppet: false, | ||
environments: ['q1'], | ||
|
@@ -2008,7 +2023,7 @@ export const backendBestillingerMock = [ | |
antallLevert: 1, | ||
ferdig: true, | ||
sistOppdatert: '2022-01-01T15:45:39.696068', | ||
bruker: gjeldendeBrukerMock, | ||
bruker: gjeldendeAzureBrukerMock, | ||
gruppeId: 1, | ||
stoppet: false, | ||
environments: [''], | ||
|
@@ -2057,7 +2072,7 @@ export const backendBestillingerMock = [ | |
antallLevert: 1, | ||
ferdig: true, | ||
sistOppdatert: '2022-01-01T15:45:39.696068', | ||
bruker: gjeldendeBrukerMock, | ||
bruker: gjeldendeAzureBrukerMock, | ||
gruppeId: 1, | ||
stoppet: false, | ||
environments: [''], | ||
|
@@ -2086,8 +2101,8 @@ export const nyGruppeMock = { | |
id: 2, | ||
navn: 'Playwright testing', | ||
hensikt: 'Saftig testing med Playwright..', | ||
opprettetAv: gjeldendeBrukerMock, | ||
sistEndretAv: gjeldendeBrukerMock, | ||
opprettetAv: gjeldendeAzureBrukerMock, | ||
sistEndretAv: gjeldendeAzureBrukerMock, | ||
datoEndret: '1990-01-12', | ||
antallIdenter: 0, | ||
antallIBruk: 0, | ||
|
@@ -2102,8 +2117,8 @@ export const eksisterendeGruppeMock = { | |
id: 1, | ||
navn: 'Testytest', | ||
hensikt: 'Testing av testytest', | ||
opprettetAv: gjeldendeBrukerMock, | ||
sistEndretAv: gjeldendeBrukerMock, | ||
opprettetAv: gjeldendeAzureBrukerMock, | ||
sistEndretAv: gjeldendeAzureBrukerMock, | ||
datoEndret: '1980-01-12', | ||
antallIdenter: 1, | ||
antallBestillinger: 3, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
apps/dolly-frontend/src/main/js/playwright/tests/Bankid.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { expect, test } from '#/globalSetup' | ||
import { TestComponentSelectors } from '#/mocks/Selectors' | ||
import { gjeldendeBankidBrukerMock, personOrgTilgangMock } from '#/mocks/BasicMocks' | ||
|
||
test.describe('Bankid testing', () => { | ||
test('passes', async ({ page }) => { | ||
await page.route(new RegExp(/current/), async (route) => { | ||
await route.fulfill({ | ||
status: 200, | ||
body: JSON.stringify(gjeldendeBankidBrukerMock), | ||
headers: { 'content-type': 'application/json' }, | ||
}) | ||
}) | ||
await page.route(new RegExp(/testnav-person-organisasjon-tilgang-service/), async (route) => { | ||
await route.fulfill({ | ||
status: 200, | ||
body: JSON.stringify(personOrgTilgangMock), | ||
headers: { 'content-type': 'application/json' }, | ||
}) | ||
}) | ||
await page.goto('login') | ||
await page.getByTestId(TestComponentSelectors.BUTTON_LOGIN_BANKID).click() | ||
await page.goto('bruker') | ||
await page.getByTestId(TestComponentSelectors.BUTTON_VELG_ORG_BRUKER).click() | ||
|
||
await expect(page).toHaveURL(/\/gruppe/) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.