Browse Source

Merge pull request #8888 from nocodb/nc-fix/kanban-flaky

Nc fix/kanban flaky
pull/8891/head
Ramesh Mane 6 months ago committed by GitHub
parent
commit
f33acdd1e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      packages/nc-gui/lang/en.json
  2. 4
      tests/playwright/pages/Dashboard/Grid/Column/index.ts
  3. 2
      tests/playwright/pages/Dashboard/common/Toolbar/Fields.ts
  4. 12
      tests/playwright/tests/db/columns/columnMultiSelect.spec.ts
  5. 3
      tests/playwright/tests/db/views/viewForm.spec.ts

1
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",

4
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 {

2
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();
}

12
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 () => {

3
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();

Loading…
Cancel
Save