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. 8
      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 }) {
(await this.pagination({ page })).click();
await this.waitForResponse({
uiAction: (await this.pagination({ page })).click(),
httpMethodsToMatch: ["GET"],

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

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

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

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

Loading…
Cancel
Save