From 7fae62f0ad3414cc108d63cf0a4d7c8f69433ad4 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Thu, 25 Apr 2024 05:55:18 +0000 Subject: [PATCH 1/2] test: fix undo redo cal timeout --- .../Dashboard/Calendar/CalendarWeekDateTime.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/playwright/pages/Dashboard/Calendar/CalendarWeekDateTime.ts b/tests/playwright/pages/Dashboard/Calendar/CalendarWeekDateTime.ts index ee146186e7..f8ec7cf31d 100644 --- a/tests/playwright/pages/Dashboard/Calendar/CalendarWeekDateTime.ts +++ b/tests/playwright/pages/Dashboard/Calendar/CalendarWeekDateTime.ts @@ -48,12 +48,18 @@ export class CalendarWeekDateTimePage extends BasePage { const day = this.get().getByTestId('nc-calendar-week-day').nth(dayIndex); const hour = day.getByTestId('nc-calendar-week-hour').nth(hourIndex); - await hour.click({ - force: true, - position: { - x: -1, - y: -1, - }, + + await this.waitForResponse({ + uiAction: () => + hour.click({ + force: true, + position: { + x: -1, + y: -1, + }, + }), + requestUrlPathToMatch: '/api/v1/db/data/noco', + httpMethodsToMatch: ['GET'], }); } } From a6aff612b9a3a307300a4f35f415213a2259baa5 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Thu, 25 Apr 2024 05:55:18 +0000 Subject: [PATCH 2/2] fix: group-by flaky test --- tests/playwright/pages/Dashboard/common/Toolbar/Groupby.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/playwright/pages/Dashboard/common/Toolbar/Groupby.ts b/tests/playwright/pages/Dashboard/common/Toolbar/Groupby.ts index e6e7f73e55..c47ae79cc5 100644 --- a/tests/playwright/pages/Dashboard/common/Toolbar/Groupby.ts +++ b/tests/playwright/pages/Dashboard/common/Toolbar/Groupby.ts @@ -49,6 +49,7 @@ export class ToolbarGroupByPage extends BasePage { .locator(`div[label="${title}"]`) .last() .click(); + await this.rootPage.locator('.nc-sort-dir-select').nth(index).waitFor({ state: 'visible' }); await this.rootPage.locator('.nc-sort-dir-select').nth(index).click(); await this.rootPage .locator('.nc-dropdown-sort-dir')