Browse Source

refactor: path correction

pull/6644/head
Pranav C 11 months ago
parent
commit
e9d293a5d0
  1. 2
      tests/playwright/pages/Dashboard/TreeView.ts
  2. 4
      tests/playwright/pages/Dashboard/common/Cell/index.ts
  3. 4
      tests/playwright/tests/db/features/undo-redo.spec.ts

2
tests/playwright/pages/Dashboard/TreeView.ts

@ -109,7 +109,7 @@ export class TreeViewPage extends BasePage {
}, },
}), }),
httpMethodsToMatch: ['GET'], httpMethodsToMatch: ['GET'],
requestUrlPathToMatch: `/api/v1/db/auth/noco/`, requestUrlPathToMatch: `/api/v1/db/data/noco`,
responseJsonMatcher: json => json.pageInfo, responseJsonMatcher: json => json.pageInfo,
}); });
await this.dashboard.waitForTabRender({ title, mode }); await this.dashboard.waitForTabRender({ title, mode });

4
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.get({ index, columnHeader }).hover();
await this.waitForResponse({ await this.waitForResponse({
uiAction: () => this.get({ index, columnHeader }).locator('.nc-datatype-link').click(), uiAction: () => this.get({ index, columnHeader }).locator('.nc-datatype-link').click(),
requestUrlPathToMatch: '/api/v1/db/auth/noco/', requestUrlPathToMatch: '/api/v1/db/data/noco',
httpMethodsToMatch: ['GET'], httpMethodsToMatch: ['GET'],
}); });
} }
@ -371,7 +371,7 @@ export class CellPageObject extends BasePage {
await this.waitForResponse({ await this.waitForResponse({
uiAction: () => uiAction: () =>
this.rootPage.locator(`[data-testid="nc-child-list-item"]`).last().click({ force: true, timeout: 3000 }), 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'], httpMethodsToMatch: ['GET'],
}); });

4
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({ await dashboard.grid.waitForResponse({
uiAction: async () => await page.keyboard.press(isMac ? 'Meta+z' : 'Control+z'), uiAction: async () => await page.keyboard.press(isMac ? 'Meta+z' : 'Control+z'),
httpMethodsToMatch: ['GET'], httpMethodsToMatch: ['GET'],
requestUrlPathToMatch: `/api/v1/db/auth/noco/`, requestUrlPathToMatch: `/api/v1/db/data/noco`,
responseJsonMatcher: json => json.pageInfo, responseJsonMatcher: json => json.pageInfo,
}); });
} else { } else {
@ -593,7 +593,7 @@ test.describe('Undo Redo - LTAR', () => {
await dashboard.grid.waitForResponse({ await dashboard.grid.waitForResponse({
uiAction: async () => await page.keyboard.press(isMac ? 'Meta+z' : 'Control+z'), uiAction: async () => await page.keyboard.press(isMac ? 'Meta+z' : 'Control+z'),
httpMethodsToMatch: ['GET'], httpMethodsToMatch: ['GET'],
requestUrlPathToMatch: `/api/v1/db/auth/noco/`, requestUrlPathToMatch: `/api/v1/db/data/noco`,
responseJsonMatcher: json => json.pageInfo, responseJsonMatcher: json => json.pageInfo,
}); });
await verifyRecords(values); await verifyRecords(values);

Loading…
Cancel
Save