From 8b6f822e1e5ac60791805a2c8648708c56dff1f8 Mon Sep 17 00:00:00 2001 From: SheenaMalhotra182 Date: Thu, 21 Dec 2023 13:34:12 +0530 Subject: [PATCH] [ACS-6456] added return types, fixed typos --- e2e/playwright/actions/src/tests/share/share-file.spec.ts | 2 +- .../components/datetime-picker/datetime-picker.component.ts | 2 +- .../page-objects/components/dialogs/share-dialog.component.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/e2e/playwright/actions/src/tests/share/share-file.spec.ts b/e2e/playwright/actions/src/tests/share/share-file.spec.ts index 48dfad1219..e6e040b78e 100644 --- a/e2e/playwright/actions/src/tests/share/share-file.spec.ts +++ b/e2e/playwright/actions/src/tests/share/share-file.spec.ts @@ -87,7 +87,7 @@ test.describe('Share a file', () => { }); test.describe('when logged in', () => { - const expiryDateObj: Date = new Date(); + const expiryDateObj = new Date(); expiryDateObj.setFullYear(expiryDateObj.getFullYear() + 1); const expiryDate: any = expiryDateObj.toISOString().replace('Z', '+0000'); diff --git a/projects/aca-playwright-shared/src/page-objects/components/datetime-picker/datetime-picker.component.ts b/projects/aca-playwright-shared/src/page-objects/components/datetime-picker/datetime-picker.component.ts index 2af6a80110..60dc634754 100644 --- a/projects/aca-playwright-shared/src/page-objects/components/datetime-picker/datetime-picker.component.ts +++ b/projects/aca-playwright-shared/src/page-objects/components/datetime-picker/datetime-picker.component.ts @@ -46,7 +46,7 @@ export class DateTimePicker extends BaseComponent { const nextAvailableDay = new Date(); nextAvailableDay.setDate(today.getDate() + 2); if (nextAvailableDay.getMonth() !== today.getMonth()) { - await await this.nextMonthBtn.click(); + await this.nextMonthBtn.click(); } await this.selectDay(nextAvailableDay.getDate()); } diff --git a/projects/aca-playwright-shared/src/page-objects/components/dialogs/share-dialog.component.ts b/projects/aca-playwright-shared/src/page-objects/components/dialogs/share-dialog.component.ts index f8482d875a..fde0b404dc 100644 --- a/projects/aca-playwright-shared/src/page-objects/components/dialogs/share-dialog.component.ts +++ b/projects/aca-playwright-shared/src/page-objects/components/dialogs/share-dialog.component.ts @@ -50,7 +50,7 @@ export class ShareDialogComponent extends BaseComponent { getDialogLabel = () => this.getChild('label').innerText(); getErrorByText = (text: string): Locator => this.page.locator('mat-error', { hasText: text }); - async getLabels() { + async getLabels(): Promise> { return await this.page.$$eval('.adf-share-link__label', (elements) => elements.map((element) => element.textContent)); }