From b817a7ee6ae7130bb67dbc5897244e8264feecc4 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Fri, 28 Jun 2024 12:24:06 +0000 Subject: [PATCH 1/5] fix: increase wait for kanban show-all --- tests/playwright/pages/Dashboard/common/Toolbar/Fields.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/playwright/pages/Dashboard/common/Toolbar/Fields.ts b/tests/playwright/pages/Dashboard/common/Toolbar/Fields.ts index 06356e965f..4ad2af24b9 100644 --- a/tests/playwright/pages/Dashboard/common/Toolbar/Fields.ts +++ b/tests/playwright/pages/Dashboard/common/Toolbar/Fields.ts @@ -93,7 +93,7 @@ export class ToolbarFieldsPage extends BasePage { uiAction: () => this.get().locator(`.nc-fields-show-all-fields`).click(), requestUrlPathToMatch: isLocallySaved ? '/api/v1/db/public/' : '/api/v1/db/data/noco/', httpMethodsToMatch: ['GET'], - timeout: 10000, + timeout: 30000, // for Kanban, show all fields can take a long time }); await this.toolbar.clickFields(); } From dd99060f0423f2f4f01edae5173afc8cc2a200a0 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Fri, 28 Jun 2024 12:24:06 +0000 Subject: [PATCH 2/5] test: use API to prep beforeEach work --- .../tests/db/columns/columnMultiSelect.spec.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tests/playwright/tests/db/columns/columnMultiSelect.spec.ts b/tests/playwright/tests/db/columns/columnMultiSelect.spec.ts index 1b81f11289..f737a52518 100644 --- a/tests/playwright/tests/db/columns/columnMultiSelect.spec.ts +++ b/tests/playwright/tests/db/columns/columnMultiSelect.spec.ts @@ -244,6 +244,8 @@ test.describe('Multi select - filters', () => { options: ['foo', 'bar', 'baz'], }); + const selectOptions = ['', 'foo', 'bar', 'baz', 'foo,bar', 'foo,bar,baz']; + try { const tables = await api.dbTable.list(context.base.id); const rowAttributes = []; @@ -251,6 +253,7 @@ test.describe('Multi select - filters', () => { const row = { Id: i + 1, Title: `${i + 1}`, + MultiSelect: selectOptions[i], }; rowAttributes.push(row); } @@ -263,15 +266,6 @@ test.describe('Multi select - filters', () => { // page reload await page.reload(); - - await grid.cell.selectOption.select({ index: 1, columnHeader: 'MultiSelect', option: 'foo', multiSelect: true }); - await grid.cell.selectOption.select({ index: 2, columnHeader: 'MultiSelect', option: 'bar', multiSelect: true }); - await grid.cell.selectOption.select({ index: 3, columnHeader: 'MultiSelect', option: 'baz', multiSelect: true }); - await grid.cell.selectOption.select({ index: 4, columnHeader: 'MultiSelect', option: 'foo', multiSelect: true }); - await grid.cell.selectOption.select({ index: 4, columnHeader: 'MultiSelect', option: 'bar', multiSelect: true }); - await grid.cell.selectOption.select({ index: 5, columnHeader: 'MultiSelect', option: 'foo', multiSelect: true }); - await grid.cell.selectOption.select({ index: 5, columnHeader: 'MultiSelect', option: 'bar', multiSelect: true }); - await grid.cell.selectOption.select({ index: 5, columnHeader: 'MultiSelect', option: 'baz', multiSelect: true }); }); test.afterEach(async () => { From 954e1b919e89216c7b5282dae0045312c3fcd41f Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Fri, 28 Jun 2024 12:24:06 +0000 Subject: [PATCH 3/5] fix: column ops- scroll into view before insert --- tests/playwright/pages/Dashboard/Grid/Column/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/playwright/pages/Dashboard/Grid/Column/index.ts b/tests/playwright/pages/Dashboard/Grid/Column/index.ts index 64d08946ba..ea7ef1f0c1 100644 --- a/tests/playwright/pages/Dashboard/Grid/Column/index.ts +++ b/tests/playwright/pages/Dashboard/Grid/Column/index.ts @@ -94,15 +94,15 @@ export class ColumnPageObject extends BasePage { ltarView?: string; }) { if (insertBeforeColumnTitle) { + await this.grid.get().locator(`th[data-title="${insertBeforeColumnTitle}"]`).scrollIntoViewIfNeeded(); await this.grid.get().locator(`th[data-title="${insertBeforeColumnTitle}"] .nc-ui-dt-dropdown`).click(); - if (isDisplayValue) { await expect(this.rootPage.locator('li[role="menuitem"]:has-text("Insert Before")')).toHaveCount(0); return; } - await this.rootPage.locator('li[role="menuitem"]:has-text("Insert Before"):visible').click(); } else if (insertAfterColumnTitle) { + await this.grid.get().locator(`th[data-title="${insertAfterColumnTitle}"]`).scrollIntoViewIfNeeded(); await this.grid.get().locator(`th[data-title="${insertAfterColumnTitle}"] .nc-ui-dt-dropdown`).click(); await this.rootPage.locator('li[role="menuitem"]:has-text("Insert After"):visible').click(); } else { From 53a048636495cb920ece52e40d05a755e4b440a2 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Fri, 28 Jun 2024 12:24:07 +0000 Subject: [PATCH 4/5] test: ensure submit message configured is saved --- tests/playwright/tests/db/views/viewForm.spec.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/playwright/tests/db/views/viewForm.spec.ts b/tests/playwright/tests/db/views/viewForm.spec.ts index e242d1e21f..745602d896 100644 --- a/tests/playwright/tests/db/views/viewForm.spec.ts +++ b/tests/playwright/tests/db/views/viewForm.spec.ts @@ -934,6 +934,9 @@ test.describe('Form view: field validation', () => { message: 'Thank you for submitting the form', }); + // wait to ensure configured message is saved + await dashboard.rootPage.waitForTimeout(1000); + await dashboard.rootPage.goto(surveyLink); // fix me! kludge@hub; page wasn't getting loaded from previous step await dashboard.rootPage.reload(); From f580d2cb723363ba1f1fc8dabc3177f8c98aba96 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Fri, 28 Jun 2024 12:24:07 +0000 Subject: [PATCH 5/5] chore: OSS specific change --- packages/nc-gui/lang/en.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/nc-gui/lang/en.json b/packages/nc-gui/lang/en.json index a8917fd1cc..f0b11ad747 100644 --- a/packages/nc-gui/lang/en.json +++ b/packages/nc-gui/lang/en.json @@ -1084,6 +1084,7 @@ }, "toggleMobileMode": "Toggle Mobile Mode", "startCommenting": "Start commenting!", + "noCommentsYet": "No comments yet!", "clearForm": "Clear Form", "addFieldFromFormView": "Add Field", "selectAllFields": "Select all fields",