From 1da620222fb3c8ba4baf1fb715ef608be7729ed9 Mon Sep 17 00:00:00 2001 From: Sneha Sirure Date: Wed, 11 Dec 2024 13:28:08 +0100 Subject: [PATCH 1/3] Made small changes to fix failing playwright tests --- playwright/pages/profile/delegationPage.ts | 2 +- playwright/playwright.config.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/playwright/pages/profile/delegationPage.ts b/playwright/pages/profile/delegationPage.ts index 96b5d3dbd..ea922c994 100644 --- a/playwright/pages/profile/delegationPage.ts +++ b/playwright/pages/profile/delegationPage.ts @@ -250,7 +250,7 @@ export class instantiateResource { } // Close form if the button is available - await this.page.getByTestId('form-close-button').click(); + await this.page.getByLabel('Lukk skjema').click(); await this.page.goto(process.env.BASE_URL + '/ui/profile'); } } catch (error) { diff --git a/playwright/playwright.config.ts b/playwright/playwright.config.ts index 047147b89..456f0957e 100644 --- a/playwright/playwright.config.ts +++ b/playwright/playwright.config.ts @@ -16,7 +16,7 @@ dotenv.config({ // eslint-disable-next-line @typescript-eslint/no-unused-vars const config: PlaywrightTestConfig = { testMatch: ['playwright/e2eTests/*.spec.ts'], - timeout: 30 * 1000, //30 seconds default timeout + timeout: 60 * 1000, //30 seconds default timeout use: { headless: true, // screenshot: 'only-on-failure', From 28fc96744efec153ef81cd2f59a3181a6bbbe10f Mon Sep 17 00:00:00 2001 From: Sneha Sirure Date: Wed, 8 Jan 2025 14:53:35 +0100 Subject: [PATCH 2/3] Made small change to fix one tt02 failing test --- playwright/e2eTests/api-delegering.spec.ts | 4 ++-- playwright/pages/profile/apidelegeringPage.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/playwright/e2eTests/api-delegering.spec.ts b/playwright/e2eTests/api-delegering.spec.ts index b3cfb4f55..23665c65c 100644 --- a/playwright/e2eTests/api-delegering.spec.ts +++ b/playwright/e2eTests/api-delegering.spec.ts @@ -190,9 +190,9 @@ test.describe('API-Delegations to organization user', () => { await apiDelegations.applyButton.click(); const apiNames = [ - 'AuthorizedParties: Mainunit to Organization Maskinporten Schema for utviklingstester', + 'Maskinporten Schema - AM - K6', + 'Automation Test Delegation Scheme', 'Automation Regression', - 'AuthorizedParties: Subunit to Organization Maskinporten Schema for utviklingstester', ]; await apiDelegations.selectApiAccess(apiNames); diff --git a/playwright/pages/profile/apidelegeringPage.ts b/playwright/pages/profile/apidelegeringPage.ts index 4e4958236..d7c577b9f 100644 --- a/playwright/pages/profile/apidelegeringPage.ts +++ b/playwright/pages/profile/apidelegeringPage.ts @@ -256,7 +256,7 @@ export class apiDelegation { for (const apiName of apiNames) { await this.page .getByRole('button', { name: `Legg til ${apiName}` }) - .last() + .first() .click(); } From 82ee938867f0f5b8f58c198280e2ede8724a5adb Mon Sep 17 00:00:00 2001 From: Sneha Sirure Date: Wed, 8 Jan 2025 15:04:52 +0100 Subject: [PATCH 3/3] =?UTF-8?q?Disabler=20testene=20fra=20=C3=A5=20kj?= =?UTF-8?q?=C3=B8re=20i=20AT23=20og=20AT22?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-at.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-at.yml b/.github/workflows/deploy-at.yml index e1879a76b..0ab06ff29 100644 --- a/.github/workflows/deploy-at.yml +++ b/.github/workflows/deploy-at.yml @@ -34,7 +34,7 @@ jobs: strategy: fail-fast: false matrix: - environment: [AT22, AT23, AT24] + environment: [AT24] with: environment: ${{ matrix.environment }}