From b2b25549c30d9bcdc917fabd1c3a27524e022d9a Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Wed, 2 Nov 2022 16:27:52 +0530 Subject: [PATCH] feat(testing): Stability --- scripts/playwright/pages/Dashboard/WebhookForm/index.ts | 1 + scripts/playwright/tests/baseShare.spec.ts | 2 ++ scripts/playwright/tests/viewForm.spec.ts | 1 + 3 files changed, 4 insertions(+) diff --git a/scripts/playwright/pages/Dashboard/WebhookForm/index.ts b/scripts/playwright/pages/Dashboard/WebhookForm/index.ts index 7c026723d6..6aa4ec79df 100644 --- a/scripts/playwright/pages/Dashboard/WebhookForm/index.ts +++ b/scripts/playwright/pages/Dashboard/WebhookForm/index.ts @@ -87,6 +87,7 @@ export class WebhookFormPage extends BasePage { const modal = await this.get().locator(`.menu-filter-dropdown`).last(); await modal.locator(`button:has-text("Add Filter")`).click(); + // todo: Integrate this with Filter page object or atleast wait for the api response(this part is flaky but barely) await modal.locator(".nc-filter-field-select").click(); const modalField = await this.dashboard.rootPage.locator( ".nc-dropdown-toolbar-field-list:visible" diff --git a/scripts/playwright/tests/baseShare.spec.ts b/scripts/playwright/tests/baseShare.spec.ts index 6809ecbdda..ea5271a66a 100644 --- a/scripts/playwright/tests/baseShare.spec.ts +++ b/scripts/playwright/tests/baseShare.spec.ts @@ -64,6 +64,7 @@ test.describe("Shared base", () => { let url = await dashboard.settings.teams.getSharedBaseUrl(); await dashboard.settings.teams.closeInvite(); + await dashboard.rootPage.waitForTimeout(2000); // access shared base link await dashboard.signOut(); // todo: Move this to a page object @@ -85,6 +86,7 @@ test.describe("Shared base", () => { url = await dashboard.settings.teams.getSharedBaseUrl(); await dashboard.settings.teams.closeInvite(); + await dashboard.rootPage.waitForTimeout(2000); // access shared base link await dashboard.signOut(); // todo: Move this to a page object diff --git a/scripts/playwright/tests/viewForm.spec.ts b/scripts/playwright/tests/viewForm.spec.ts index 56dee00ebd..40cc08a255 100644 --- a/scripts/playwright/tests/viewForm.spec.ts +++ b/scripts/playwright/tests/viewForm.spec.ts @@ -4,6 +4,7 @@ import { SettingTab } from "../pages/Dashboard/Settings"; import setup from "../setup"; import { FormPage } from "../pages/Dashboard/Form"; +// todo: Move most of the ui actions to page object and await on the api response test.describe("Form view", () => { let dashboard: DashboardPage; let form: FormPage;