Skip to content

Commit 1d06894

Browse files
authored
Remove AT21 and AT24 environment references (#2418)
* Remove AT21 and AT24 environment references * Refactor environment variable usage in Playwright workflow
1 parent c812174 commit 1d06894

11 files changed

Lines changed: 16 additions & 84 deletions

File tree

.github/workflows/deploy-at.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
fail-fast: false
2424
matrix:
25-
environment: [AT22, AT23, AT24, YT01]
25+
environment: [AT22, AT23, YT01]
2626
uses: "./.github/workflows/template-deploy-container.yml"
2727
secrets: inherit
2828
with:

.github/workflows/template-playwright.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@ on:
1111
type: choice
1212
required: true
1313
options:
14-
- AT21
1514
- AT22
1615
- AT23
17-
- AT24
1816
- TT02
1917
description: Environment
2018

@@ -57,8 +55,10 @@ jobs:
5755
MASKINPORTEN_BEHALF_OF_JWK: ${{ secrets.MASKINPORTEN_BEHALF_OF_JWK }}
5856
AT23_REGISTER_SUBSCRIPTION_KEY: ${{ secrets.AT23_REGISTER_SUBSCRIPTION_KEY }}
5957
TT02_REGISTER_SUBSCRIPTION_KEY: ${{ secrets.TT02_REGISTER_SUBSCRIPTION_KEY }}
58+
ENVIRONMENT: ${{ inputs.environment }}
59+
PROJECT: ${{ inputs.project }}
6060
run: |
61-
yarn run env:${{ inputs.environment }} --project ${{ inputs.project }} --workers=4
61+
yarn run "env:${ENVIRONMENT}" --project "${PROJECT}" --workers=4
6262
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
6363
if: always()
6464
with:
@@ -77,11 +77,13 @@ jobs:
7777
- name: Upload HTML report to Azure
7878
uses: azure/cli@9f7ce6f37c31b777ec6c6b6d1dfe7db79f497956 # v2
7979
if: always()
80+
env:
81+
REPORT_NAME: ${{ inputs.environment }}
82+
RUN_ID: ${{ github.run_id }}
8083
with:
8184
azcliversion: latest
8285
inlineScript: |
83-
REPORT_NAME=${{ inputs.environment }} # e.g. AT24
84-
REPORT_ID=${{ github.run_id }}-${{ inputs.environment }} # unique per job run
86+
REPORT_ID="${RUN_ID}-${REPORT_NAME}" # unique per job run
8587
ACCOUNT_NAME=playwrightreporting
8688
8789
az storage blob upload-batch \

backend/src/Altinn.AccessManagement.UI/Altinn.AccessManagement.UI/appsettings.AT21.json

Lines changed: 0 additions & 19 deletions
This file was deleted.

backend/src/Altinn.AccessManagement.UI/Altinn.AccessManagement.UI/appsettings.AT24.json

Lines changed: 0 additions & 20 deletions
This file was deleted.

playwright/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Run the below command to run Playwright tests with the environment in headless m
99
```cmd
1010
yarn run env:AT22,
1111
yarn run env:AT23,
12-
yarn run env:AT24,
1312
yarn run env:TT02
1413
```
1514

@@ -20,7 +19,7 @@ Run the below command to run Playwright tests with the environment in headless m
2019
--repeat-each 20 --workers=1: (make sure a test is not flaky in combination with 1 worker to avoid test data complexity)
2120
--debug: step by step mode
2221
--grep "test name": match test name to only run specific test(s)
23-
- full example: yarn run env:AT24 --grep "Delegate api to an organization by selecting from API" --timeout 10000 --repeat-each 20 --workers=1
22+
- full example: yarn run env:AT23 --grep "Delegate api to an organization by selecting from API" --timeout 10000 --repeat-each 20 --workers=1
2423
```
2524

2625
Run the below command to run Playwright tests with the environment in UI mode
@@ -70,8 +69,8 @@ yarn run env:AT22 --grep "test name" --timeout 10000 --repeat-each 10 --workers=
7069
- Good stability - the tests must build trust.
7170
- Do cleanup via backend if possible.
7271
- Easy to understand, should create a better understanding of the functionality in the solution and easy to read reports for test run results.
73-
- Run the tests against only one of the at-environments(?). We should look at better definitions of the different AT environments (AT24)
74-
-- AT21 and AT22 = dev environments
72+
- Run the tests against only one of the at-environments(?). We should look at better definitions of the different AT environments
73+
-- AT22 = dev environment
7574
-- establish a better standard for what the different environments are used for
7675

7776
Test data - what do we need?

playwright/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
"packageManager": "yarn@4.18.0",
66
"main": "index.js",
77
"scripts": {
8-
"env:AT21": "cross-env environment=at21 npx playwright test",
98
"env:AT22": "cross-env environment=at22 npx playwright test",
109
"env:AT23": "cross-env environment=at23 npx playwright test",
11-
"env:AT24": "cross-env environment=at24 npx playwright test",
1210
"env:TT02": "cross-env environment=tt02 npx playwright test",
1311
"tenor": "npx tsx tenor/hentTestpersoner.ts",
1412
"tenor:virksomhet": "npx tsx tenor/hentVirksomhet.ts",

playwright/playwright.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ const config: PlaywrightTestConfig = {
3131
{
3232
open: 'on-failure',
3333
trace: 'on',
34-
outputDir: `playwright-report/${process.env.environment?.toUpperCase() ?? 'AT24'}`,
35-
outputFolder: `playwright-report/${process.env.environment?.toUpperCase() ?? 'AT24'}`,
34+
outputDir: `playwright-report/${process.env.environment?.toUpperCase() ?? 'AT23'}`,
35+
outputFolder: `playwright-report/${process.env.environment?.toUpperCase() ?? 'AT23'}`,
3636
},
3737
],
3838
],

playwright/tenor/hentBulk.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ function printHelp(): void {
118118
' -n, --antall <tall> Antall som hentes (default: 10)',
119119
' --kql <kql> Egendefinert KQL – for persons/orgs (overstyrer standardsøk)',
120120
' --json Skriv ut som JSON',
121-
' --env <miljø> Miljø for env-fil: tt02, at22, at23, at24 (default: tt02)',
121+
' --env <miljø> Miljø for env-fil: tt02, at22, at23 (default: tt02)',
122122
' -h, --help Vis denne hjelpeteksten',
123123
].join('\n'),
124124
);

playwright/tenor/hentTestpersoner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function printHelp(): void {
9292
' --kql <streng> Egendefinert KQL (default: bosatt + myndig)',
9393
' --navn Skriv ut navn (fornavn etternavn) ved siden av fnr',
9494
' --json Skriv ut full kildedata som JSON',
95-
' --env <miljø> Miljø for env-fil: tt02, at22, at23, at24 (default: tt02)',
95+
' --env <miljø> Miljø for env-fil: tt02, at22, at23 (default: tt02)',
9696
' -h, --help Vis denne hjelpeteksten',
9797
].join('\n'),
9898
);

playwright/tenor/hentVirksomhet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ function printHelp(): void {
110110
' -n, --antall <tall> Antall klienter som hentes (default: 5)',
111111
' -m, --maks-klienter <tall> Finn facilitator med færrest klienter, høyst <tall>',
112112
' --json Skriv ut full struktur som JSON',
113-
' --env <miljø> Miljø for env-fil: tt02, at22, at23, at24 (default: tt02)',
113+
' --env <miljø> Miljø for env-fil: tt02, at22, at23 (default: tt02)',
114114
' -h, --help Vis denne hjelpeteksten',
115115
].join('\n'),
116116
);

0 commit comments

Comments
 (0)