diff --git a/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts b/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts index 219d03ba2c..924060afcc 100644 --- a/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts +++ b/tests/playwright/pages/Dashboard/common/Cell/SelectOptionCell.ts @@ -118,7 +118,7 @@ export class SelectOptionCellPageObject extends BasePage { index, columnHeader, option, - multiSelect, + multiSelect = false, }: { index: number; columnHeader: string; @@ -134,10 +134,18 @@ export class SelectOptionCellPageObject extends BasePage { await selectCell.locator('.ant-select-selection-search-input').type(option); - await selectCell.locator('.ant-select-selection-search-input').press('Enter'); + // await selectCell.locator('.ant-select-selection-search-input').press('Enter'); + + // Wait for update api call + const saveRowAction = () => selectCell.locator('.ant-select-selection-search-input').press('Enter'); + await this.waitForResponse({ + uiAction: saveRowAction, + requestUrlPathToMatch: 'api/v1/db/data/noco/', + httpMethodsToMatch: ['PATCH'], + responseJsonMatcher: resJson => String(resJson?.[columnHeader]).includes(String(option)), + }); if (multiSelect) await selectCell.locator('.ant-select-selection-search-input').press('Escape'); - // todo: wait for update api call } async verifySelectedOptions({ diff --git a/tests/playwright/pages/Dashboard/common/Toolbar/index.ts b/tests/playwright/pages/Dashboard/common/Toolbar/index.ts index 6f756f21f1..afcaa3e824 100644 --- a/tests/playwright/pages/Dashboard/common/Toolbar/index.ts +++ b/tests/playwright/pages/Dashboard/common/Toolbar/index.ts @@ -66,6 +66,7 @@ export class ToolbarPage extends BasePage { // Wait for the menu to close if (menuOpen) await this.fields.get().waitFor({ state: 'hidden' }); + else await this.fields.get().waitFor({ state: 'visible' }); } async clickFindRowByScanButton() { diff --git a/tests/playwright/tests/db/undo-redo.spec.ts b/tests/playwright/tests/db/undo-redo.spec.ts index c798910d7a..0665df93c4 100644 --- a/tests/playwright/tests/db/undo-redo.spec.ts +++ b/tests/playwright/tests/db/undo-redo.spec.ts @@ -178,6 +178,10 @@ test.describe('Undo Redo', () => { await dashboard.closeTab({ title: 'Team & Auth' }); await dashboard.treeView.openTable({ title: 'numberBased' }); + // hack: wait for grid to load + // https://github.com/nocodb/nocodb/actions/runs/5025773509/jobs/9013176970 + await page.waitForTimeout(1000); + await verifyFieldsOrder(['Number', 'Decimal', 'Currency']); // Hide Decimal