Browse Source

feat(testing): Cleanup and disabled webhook test

pull/3848/head
Muhammed Mustafa 2 years ago
parent
commit
9c25f0f665
  1. 1
      scripts/playwright/pages/Dashboard/ExpandedForm/index.ts
  2. 1
      scripts/playwright/pages/Dashboard/Import/Airtable.ts
  3. 2
      scripts/playwright/pages/Dashboard/common/Cell/index.ts
  4. 1
      scripts/playwright/pages/Dashboard/index.ts
  5. 6
      scripts/playwright/tests/baseShare.spec.ts
  6. 3
      scripts/playwright/tests/webhook.spec.ts

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

@ -101,7 +101,6 @@ export class ExpandedFormPage extends BasePage {
}
async validateRoleAccess(param: { role: string }) {
console.log(param.role);
if (param.role === "commenter" || param.role === "viewer") {
expect(
await this.get().locator('button:has-text("Save Row")')

1
scripts/playwright/pages/Dashboard/Import/Airtable.ts

@ -18,7 +18,6 @@ export class ImportAirtablePage extends BasePage {
}
async import({ key, baseId }: { key: string; baseId: string }) {
console.log(key, baseId);
await this.get().locator(`.nc-input-api-key >> input`).fill(key);
await this.get().locator(`.nc-input-shared-base`).fill(baseId);
await this.importButton.click();

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

@ -175,8 +175,6 @@ export class CellPageObject extends BasePage {
}
async verifyRoleAccess(param: { role: string }) {
console.log("verifyRoleAccess", param);
// normal text cell
const cell = await this.get({ index: 0, columnHeader: "Country" });
// editable cell

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

@ -176,7 +176,6 @@ export class DashboardPage extends BasePage {
let menu = await this.rootPage
.locator(`.nc-new-project-menu`)
.textContent();
console.log(title, menu);
expect(title).toContain(param.json.title.myProject);
expect(menu).toContain(param.json.title.newProj);
await this.rootPage

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

@ -11,7 +11,6 @@ test.describe("Shared base", () => {
let loginPage: LoginPage;
async function roleTest(role: string) {
console.log("project menu");
await dashboard.validateProjectMenu({
role: role.toLowerCase(),
mode: "shareBase",
@ -19,29 +18,24 @@ test.describe("Shared base", () => {
await dashboard.treeView.openTable({ title: "Country", mode: "shareBase" });
console.log("shareBase: view sidebar");
await dashboard.viewSidebar.validateRoleAccess({
role: role.toLowerCase(),
});
console.log("shareBase: toolbar");
await toolbar.validateRoleAccess({
role: role.toLowerCase(),
mode: "shareBase",
});
console.log("shareBase: tree view");
await dashboard.treeView.validateRoleAccess({
role: role.toLowerCase(),
});
console.log("shareBase: grid");
await dashboard.grid.validateRoleAccess({
role: role.toLowerCase(),
});
await dashboard.grid.openExpandedRow({ index: 0 });
console.log("shareBase: expanded row");
await dashboard.expandedForm.validateRoleAccess({
role: role.toLowerCase(),
});

3
scripts/playwright/tests/webhook.spec.ts

@ -23,12 +23,11 @@ async function verifyHookTrigger(count: number, value: string, request) {
if (count) {
response = await request.get(hookPath + "/last");
console.log(await response.json());
expect((await response.json()).Title).toBe(value);
}
}
test.describe("Webhook", () => {
test.describe.skip("Webhook", () => {
let dashboard: DashboardPage, toolbar: ToolbarPage, webhook: WebhookFormPage;
let context: any;

Loading…
Cancel
Save