Browse Source

Merge pull request #8522 from nocodb/test/fix-multi-field-editor-test

test: disable fully parallel
pull/8544/head
Ramesh Mane 7 months ago committed by GitHub
parent
commit
3eed09041d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      tests/playwright/pages/Dashboard/Details/FieldsPage.ts
  2. 4
      tests/playwright/pages/Dashboard/WebhookForm/index.ts
  3. 20
      tests/playwright/pages/Dashboard/common/Topbar/index.ts
  4. 3
      tests/playwright/tests/db/features/erd.spec.ts
  5. 4
      tests/playwright/tests/db/features/webhook.spec.ts

6
tests/playwright/pages/Dashboard/Details/FieldsPage.ts

@ -240,11 +240,11 @@ export class FieldsPage extends BasePage {
async saveChanges() { async saveChanges() {
await this.waitForResponse({ await this.waitForResponse({
uiAction: async () => await this.saveChangesButton.click(), uiAction: async () => await this.saveChangesButton.click(),
requestUrlPathToMatch: 'api/v1/db/meta/views/', requestUrlPathToMatch: 'api/v1/db/meta/tables/',
httpMethodsToMatch: ['GET'], httpMethodsToMatch: ['GET'],
responseJsonMatcher: json => json['list'], responseJsonMatcher: json => json['hash'],
}); });
await this.rootPage.waitForTimeout(200); await this.rootPage.waitForTimeout(1000);
} }
getField({ title }: { title: string }) { getField({ title }: { title: string }) {

4
tests/playwright/pages/Dashboard/WebhookForm/index.ts

@ -116,8 +116,8 @@ export class WebhookFormPage extends BasePage {
await this.verifyToast({ message: 'Webhook tested successfully' }); await this.verifyToast({ message: 'Webhook tested successfully' });
} }
async delete({ index }: { index: number }) { async delete({ index, wfr = true }: { index: number; wfr?: boolean }) {
await this.dashboard.grid.topbar.openDetailedTab(); await this.dashboard.grid.topbar.openDetailedTab({ waitForResponse: wfr });
await this.dashboard.details.clickWebhooksTab(); await this.dashboard.details.clickWebhooksTab();
await this.dashboard.details.webhook.deleteHook({ index }); await this.dashboard.details.webhook.deleteHook({ index });
await this.rootPage.locator('div.ant-modal.active').locator('button:has-text("Delete")').click(); await this.rootPage.locator('div.ant-modal.active').locator('button:has-text("Delete")').click();

20
tests/playwright/pages/Dashboard/common/Topbar/index.ts

@ -69,13 +69,27 @@ export class TopbarPage extends BasePage {
return await this.getClipboardText(); return await this.getClipboardText();
} }
async openDetailedTab() { async openDetailedTab({ waitForResponse = true } = {}) {
await this.btn_details.click(); if (waitForResponse) {
await this.waitForResponse({
uiAction: async () => await this.btn_details.click(),
requestUrlPathToMatch: 'api/v1/db/meta/tables/',
httpMethodsToMatch: ['GET'],
responseJsonMatcher: json => json['hash'],
});
} else {
await this.btn_details.click();
}
await this.rootPage.waitForTimeout(500); await this.rootPage.waitForTimeout(500);
} }
async openDataTab() { async openDataTab() {
await this.btn_data.click(); await this.waitForResponse({
uiAction: async () => await this.btn_data.click(),
requestUrlPathToMatch: 'api/v1/db/data/noco/',
httpMethodsToMatch: ['GET'],
responseJsonMatcher: json => json['list'],
});
await this.rootPage.waitForTimeout(500); await this.rootPage.waitForTimeout(500);
} }

3
tests/playwright/tests/db/features/erd.spec.ts

@ -225,7 +225,6 @@ test.describe('Erd', () => {
await dashboard.grid.column.create({ title: 'test_column' }); await dashboard.grid.column.create({ title: 'test_column' });
// Verify // Verify
await dashboard.grid.topbar.btn_details.click();
await openErdOfATable('Country'); await openErdOfATable('Country');
await erd.verifyNode({ await erd.verifyNode({
@ -245,7 +244,6 @@ test.describe('Erd', () => {
}); });
// Verify // Verify
await dashboard.grid.topbar.btn_details.click();
await openErdOfATable('Country'); await openErdOfATable('Country');
await erd.verifyNode({ await erd.verifyNode({
@ -258,7 +256,6 @@ test.describe('Erd', () => {
await dashboard.grid.topbar.btn_data.click(); await dashboard.grid.topbar.btn_data.click();
// Delete column // Delete column
await dashboard.grid.column.delete({ title: 'new_test_column' }); await dashboard.grid.column.delete({ title: 'new_test_column' });
await dashboard.grid.topbar.btn_details.click();
await openErdOfATable('Country'); await openErdOfATable('Country');
await erd.clickShowColumnNames(); await erd.clickShowColumnNames();

4
tests/playwright/tests/db/features/webhook.spec.ts

@ -304,8 +304,8 @@ test.describe.serial('Webhook', () => {
// - verify no trigger after delete // - verify no trigger after delete
await webhook.delete({ index: 0 }); await webhook.delete({ index: 0 });
await webhook.delete({ index: 0 }); await webhook.delete({ index: 0, wfr: false });
await webhook.delete({ index: 0 }); await webhook.delete({ index: 0, wfr: false });
await dashboard.grid.topbar.openDataTab(); await dashboard.grid.topbar.openDataTab();
await clearServerData({ request }); await clearServerData({ request });

Loading…
Cancel
Save