From 61f6a84eaa35a29c42e9dc2909171504e1d9f46f Mon Sep 17 00:00:00 2001 From: mildred Date: Thu, 28 Mar 2024 23:12:39 +0100 Subject: [PATCH] adding missing await --- src/page-objects/COMM_LoginPage.ts | 1 - src/page-objects/US_CredentialRequestPage.ts | 1 - tests/00-COMM-loginFunctionality.spec.ts | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/page-objects/COMM_LoginPage.ts b/src/page-objects/COMM_LoginPage.ts index f62d94c..1b22a34 100644 --- a/src/page-objects/COMM_LoginPage.ts +++ b/src/page-objects/COMM_LoginPage.ts @@ -42,7 +42,6 @@ export class LogInPage { } async errorMessageIsValid() { - try { await this.page.locator('.well.well-small.text-error').waitFor({ state: 'visible', timeout: 5000 }); // If the error message is found and visible, retrieve its text content diff --git a/src/page-objects/US_CredentialRequestPage.ts b/src/page-objects/US_CredentialRequestPage.ts index 4616837..3729c95 100644 --- a/src/page-objects/US_CredentialRequestPage.ts +++ b/src/page-objects/US_CredentialRequestPage.ts @@ -92,7 +92,6 @@ export class CredentialRequestPage { async requestCredential(did: string, credential: string) { try { - console.log("DId", did); (await this.getDropdownDid()).selectOption({ label: did }); (await this.getDropdownCredential()).selectOption({ label: credential }); (await this.clickRequestButton()); diff --git a/tests/00-COMM-loginFunctionality.spec.ts b/tests/00-COMM-loginFunctionality.spec.ts index 1fc2277..d430953 100644 --- a/tests/00-COMM-loginFunctionality.spec.ts +++ b/tests/00-COMM-loginFunctionality.spec.ts @@ -11,7 +11,7 @@ test.describe('Admin login functionality', () => { const loginPage = new LogInPage(page) await loginPage.visit(URL_IDHUB); await loginPage.login(ADMIN_EMAIL, KO_ADMIN_K) - expect(loginPage.errorMessageIsValid()).toBeTruthy(); + expect(await loginPage.errorMessageIsValid()).toBeTruthy(); }) test('Navigate to Forgot password page from login page', async ({ page }) => { const loginPage = new LogInPage(page)