Browse Source

feat(testing): Improved stabilty

pull/3848/head
Muhammed Mustafa 2 years ago
parent
commit
5706197382
  1. 1
      scripts/playwright/pages/Dashboard/Grid/index.ts
  2. 10
      scripts/playwright/pages/Dashboard/common/Cell/index.ts
  3. 4
      scripts/playwright/tests/rolesPreview.spec.ts

1
scripts/playwright/pages/Dashboard/Grid/index.ts

@ -225,7 +225,6 @@ export class GridPage extends BasePage {
} }
async clickPagination({ page }: { page: string }) { async clickPagination({ page }: { page: string }) {
(await this.pagination({ page })).click();
await this.waitForResponse({ await this.waitForResponse({
uiAction: (await this.pagination({ page })).click(), uiAction: (await this.pagination({ page })).click(),
httpMethodsToMatch: ["GET"], httpMethodsToMatch: ["GET"],

10
scripts/playwright/pages/Dashboard/common/Cell/index.ts

@ -84,9 +84,13 @@ export class CellPageObject extends BasePage {
columnHeader: string; columnHeader: string;
}) { }) {
await this.get({ index, columnHeader }).hover(); await this.get({ index, columnHeader }).hover();
await this.get({ index, columnHeader }) await this.waitForResponse({
.locator(".nc-action-icon >> nth=0") uiAction: this.get({ index, columnHeader })
.click(); .locator(".nc-action-icon >> nth=0")
.click(),
requestUrlPathToMatch: '/api/v1/db/data/noco/',
httpMethodsToMatch: ['GET'],
})
} }
async inCellAdd({ async inCellAdd({

4
scripts/playwright/tests/rolesPreview.spec.ts

@ -11,6 +11,8 @@ import {
let roles = ["Editor", "Commenter", "Viewer"]; let roles = ["Editor", "Commenter", "Viewer"];
test.describe("Preview Mode", () => { test.describe("Preview Mode", () => {
test.setTimeout(150000);
let dashboard: DashboardPage; let dashboard: DashboardPage;
let toolbar: ToolbarPage; let toolbar: ToolbarPage;
let settings: SettingsPage; let settings: SettingsPage;
@ -24,7 +26,7 @@ test.describe("Preview Mode", () => {
settings = dashboard.settings; settings = dashboard.settings;
}); });
test("Test case name", async () => { test("Preview Mode", async () => {
// close 'Team & Auth' tab // close 'Team & Auth' tab
await dashboard.closeTab({ title: "Team & Auth" }); await dashboard.closeTab({ title: "Team & Auth" });

Loading…
Cancel
Save