Browse Source

feat(testing): Stability

pull/3848/head
Muhammed Mustafa 2 years ago
parent
commit
b2b25549c3
  1. 1
      scripts/playwright/pages/Dashboard/WebhookForm/index.ts
  2. 2
      scripts/playwright/tests/baseShare.spec.ts
  3. 1
      scripts/playwright/tests/viewForm.spec.ts

1
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(); const modal = await this.get().locator(`.menu-filter-dropdown`).last();
await modal.locator(`button:has-text("Add Filter")`).click(); 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(); await modal.locator(".nc-filter-field-select").click();
const modalField = await this.dashboard.rootPage.locator( const modalField = await this.dashboard.rootPage.locator(
".nc-dropdown-toolbar-field-list:visible" ".nc-dropdown-toolbar-field-list:visible"

2
scripts/playwright/tests/baseShare.spec.ts

@ -64,6 +64,7 @@ test.describe("Shared base", () => {
let url = await dashboard.settings.teams.getSharedBaseUrl(); let url = await dashboard.settings.teams.getSharedBaseUrl();
await dashboard.settings.teams.closeInvite(); await dashboard.settings.teams.closeInvite();
await dashboard.rootPage.waitForTimeout(2000);
// access shared base link // access shared base link
await dashboard.signOut(); await dashboard.signOut();
// todo: Move this to a page object // todo: Move this to a page object
@ -85,6 +86,7 @@ test.describe("Shared base", () => {
url = await dashboard.settings.teams.getSharedBaseUrl(); url = await dashboard.settings.teams.getSharedBaseUrl();
await dashboard.settings.teams.closeInvite(); await dashboard.settings.teams.closeInvite();
await dashboard.rootPage.waitForTimeout(2000);
// access shared base link // access shared base link
await dashboard.signOut(); await dashboard.signOut();
// todo: Move this to a page object // todo: Move this to a page object

1
scripts/playwright/tests/viewForm.spec.ts

@ -4,6 +4,7 @@ import { SettingTab } from "../pages/Dashboard/Settings";
import setup from "../setup"; import setup from "../setup";
import { FormPage } from "../pages/Dashboard/Form"; 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", () => { test.describe("Form view", () => {
let dashboard: DashboardPage; let dashboard: DashboardPage;
let form: FormPage; let form: FormPage;

Loading…
Cancel
Save