From b0d84c63ba828aba5b4816ae93ee455e802e9ce8 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Fri, 3 May 2024 06:45:41 +0000 Subject: [PATCH] test: misc flakes --- tests/playwright/pages/Dashboard/BulkUpdate/index.ts | 2 +- tests/playwright/pages/Dashboard/ExpandedForm/index.ts | 3 +++ tests/playwright/pages/Dashboard/common/Toolbar/Filter.ts | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/playwright/pages/Dashboard/BulkUpdate/index.ts b/tests/playwright/pages/Dashboard/BulkUpdate/index.ts index f48865a894..4eb7b3e48e 100644 --- a/tests/playwright/pages/Dashboard/BulkUpdate/index.ts +++ b/tests/playwright/pages/Dashboard/BulkUpdate/index.ts @@ -183,7 +183,7 @@ export class BulkUpdatePage extends BasePage { uiAction: saveRowAction, requestUrlPathToMatch: 'api/v1/db/data/noco/', httpMethodsToMatch: ['GET'], - responseJsonMatcher: json => json['pageInfo'], + // responseJsonMatcher: json => json['pageInfo'], }); } diff --git a/tests/playwright/pages/Dashboard/ExpandedForm/index.ts b/tests/playwright/pages/Dashboard/ExpandedForm/index.ts index dad5affa5c..5b3758b5fa 100644 --- a/tests/playwright/pages/Dashboard/ExpandedForm/index.ts +++ b/tests/playwright/pages/Dashboard/ExpandedForm/index.ts @@ -127,8 +127,11 @@ export class ExpandedFormPage extends BasePage { await this.verifyToast({ message: `updated successfully.` }); await this.rootPage.locator('[data-testid="grid-load-spinner"]').waitFor({ state: 'hidden' }); + // removing focus from toast + await this.rootPage.waitForTimeout(1000); await this.rootPage.locator('.nc-modal').click(); + await this.rootPage.waitForTimeout(1000); await this.get().locator('.nc-expanded-form-header').locator('.nc-expand-form-close-btn').click(); await this.get().waitFor({ state: 'hidden' }); } diff --git a/tests/playwright/pages/Dashboard/common/Toolbar/Filter.ts b/tests/playwright/pages/Dashboard/common/Toolbar/Filter.ts index 8670da0a08..6bd3274a3e 100644 --- a/tests/playwright/pages/Dashboard/common/Toolbar/Filter.ts +++ b/tests/playwright/pages/Dashboard/common/Toolbar/Filter.ts @@ -131,7 +131,7 @@ export class ToolbarFilterPage extends BasePage { skipWaitingResponse = true; const selectedField = await getTextExcludeIconText( - this.rootPage.locator('.nc-filter-field-select .ant-select-selection-item') + this.rootPage.locator('.nc-filter-field-select .ant-select-selection-item').first() ); if (selectedField !== title) { await this.rootPage.locator('.nc-filter-field-select').last().click();