diff --git a/scripts/playwright/pages/Dashboard/ExpandedForm/index.ts b/scripts/playwright/pages/Dashboard/ExpandedForm/index.ts index d0e5c4e941..49e7b79a9b 100644 --- a/scripts/playwright/pages/Dashboard/ExpandedForm/index.ts +++ b/scripts/playwright/pages/Dashboard/ExpandedForm/index.ts @@ -59,17 +59,24 @@ export class ExpandedFormPage extends BasePage { waitForRowsData = true, }: { waitForRowsData?: boolean; - }) { - await this.get().locator('button:has-text("Save Row")').click(); + } = {}) { + const saveRowAction = this.get().locator('button:has-text("Save Row")').click(); if(waitForRowsData) { await this.waitForResponse({ - uiAction: this.get().press("Escape"), + uiAction: saveRowAction, requestUrlPathToMatch: 'api/v1/db/data/noco/', httpMethodsToMatch: ['GET'], responseJsonMatcher: (json) => json['pageInfo'], }); + } else { + await this.waitForResponse({ + uiAction: saveRowAction, + requestUrlPathToMatch: 'api/v1/db/data/noco/', + httpMethodsToMatch: ['POST'], + }); } + await this.get().press("Escape"); await this.get().waitFor({ state: "hidden" }); await this.toastWait({ message: `updated successfully.` }); await this.rootPage diff --git a/scripts/playwright/pages/Dashboard/Settings/index.ts b/scripts/playwright/pages/Dashboard/Settings/index.ts index baa1fc2e45..acb1be15dd 100644 --- a/scripts/playwright/pages/Dashboard/Settings/index.ts +++ b/scripts/playwright/pages/Dashboard/Settings/index.ts @@ -65,5 +65,6 @@ export class SettingsPage extends BasePage { async close() { await this.get().locator('[pw-data="settings-modal-close-button"]').click(); + await this.get().waitFor({ state: "hidden" }); } }