From e9d293a5d06480461638a6336a59c3274c272d69 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Wed, 11 Oct 2023 06:25:53 +0000 Subject: [PATCH] refactor: path correction --- tests/playwright/pages/Dashboard/TreeView.ts | 2 +- tests/playwright/pages/Dashboard/common/Cell/index.ts | 4 ++-- tests/playwright/tests/db/features/undo-redo.spec.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/playwright/pages/Dashboard/TreeView.ts b/tests/playwright/pages/Dashboard/TreeView.ts index 2df72149b4..71db1e245b 100644 --- a/tests/playwright/pages/Dashboard/TreeView.ts +++ b/tests/playwright/pages/Dashboard/TreeView.ts @@ -109,7 +109,7 @@ export class TreeViewPage extends BasePage { }, }), httpMethodsToMatch: ['GET'], - requestUrlPathToMatch: `/api/v1/db/auth/noco/`, + requestUrlPathToMatch: `/api/v1/db/data/noco`, responseJsonMatcher: json => json.pageInfo, }); await this.dashboard.waitForTabRender({ title, mode }); diff --git a/tests/playwright/pages/Dashboard/common/Cell/index.ts b/tests/playwright/pages/Dashboard/common/Cell/index.ts index 799a481093..c24c5da97e 100644 --- a/tests/playwright/pages/Dashboard/common/Cell/index.ts +++ b/tests/playwright/pages/Dashboard/common/Cell/index.ts @@ -90,7 +90,7 @@ export class CellPageObject extends BasePage { // await this.get({ index, columnHeader }).hover(); await this.waitForResponse({ uiAction: () => this.get({ index, columnHeader }).locator('.nc-datatype-link').click(), - requestUrlPathToMatch: '/api/v1/db/auth/noco/', + requestUrlPathToMatch: '/api/v1/db/data/noco', httpMethodsToMatch: ['GET'], }); } @@ -371,7 +371,7 @@ export class CellPageObject extends BasePage { await this.waitForResponse({ uiAction: () => this.rootPage.locator(`[data-testid="nc-child-list-item"]`).last().click({ force: true, timeout: 3000 }), - requestUrlPathToMatch: '/api/v1/db/auth/noco/', + requestUrlPathToMatch: '/api/v1/db/data/noco', httpMethodsToMatch: ['GET'], }); diff --git a/tests/playwright/tests/db/features/undo-redo.spec.ts b/tests/playwright/tests/db/features/undo-redo.spec.ts index 7296699b2a..bb0e805b86 100644 --- a/tests/playwright/tests/db/features/undo-redo.spec.ts +++ b/tests/playwright/tests/db/features/undo-redo.spec.ts @@ -32,7 +32,7 @@ async function undo({ page, dashboard }: { page: Page; dashboard: DashboardPage await dashboard.grid.waitForResponse({ uiAction: async () => await page.keyboard.press(isMac ? 'Meta+z' : 'Control+z'), httpMethodsToMatch: ['GET'], - requestUrlPathToMatch: `/api/v1/db/auth/noco/`, + requestUrlPathToMatch: `/api/v1/db/data/noco`, responseJsonMatcher: json => json.pageInfo, }); } else { @@ -593,7 +593,7 @@ test.describe('Undo Redo - LTAR', () => { await dashboard.grid.waitForResponse({ uiAction: async () => await page.keyboard.press(isMac ? 'Meta+z' : 'Control+z'), httpMethodsToMatch: ['GET'], - requestUrlPathToMatch: `/api/v1/db/auth/noco/`, + requestUrlPathToMatch: `/api/v1/db/data/noco`, responseJsonMatcher: json => json.pageInfo, }); await verifyRecords(values);