Browse Source

fix: disable network validation fix: scroll into elem before click

nc-agg/tests
DarkPhoenix2704 5 months ago
parent
commit
6e6649655b
  1. 10
      tests/playwright/pages/Dashboard/Grid/AggregationBar.ts
  2. 3
      tests/playwright/tests/db/features/column-aggregation.spec.ts

10
tests/playwright/pages/Dashboard/Grid/AggregationBar.ts

@ -27,13 +27,17 @@ export class AggregaionBarPage extends BasePage {
const overlay = this.rootPage.locator(`.nc-aggregation-${column_name}-overlay`);
const clickAggregation = (agg: string) => {
return overlay.getByTestId(`nc-aggregation-${agg}`).click();
const clickAggregation = async (agg: string) => {
const clickElem = overlay.getByTestId(`nc-aggregation-${agg}`);
await clickElem.scrollIntoViewIfNeeded();
return clickElem.click();
};
if (!skipNetworkValidation) {
await this.waitForResponse({
uiAction: () => clickAggregation(aggregation),
uiAction: async () => await clickAggregation(aggregation),
httpMethodsToMatch: ['GET'],
requestUrlPathToMatch: '/api/v2/tables/',
});

3
tests/playwright/tests/db/features/column-aggregation.spec.ts

@ -742,6 +742,7 @@ test.describe('Field Aggregation', () => {
await aggregationBar.updateAggregation({
column_name: colName,
aggregation: y[0],
skipNetworkValidation: true,
});
await aggregationBar.verifyAggregation({
@ -768,6 +769,7 @@ test.describe('Field Aggregation', () => {
await sharedPage.grid.aggregationBar.updateAggregation({
column_name: colName,
aggregation: y[0],
skipNetworkValidation: true,
});
await sharedPage.grid.aggregationBar.verifyAggregation({
@ -988,6 +990,7 @@ test.describe('Column Aggregations - Links', () => {
await aggregationBar.updateAggregation({
column_name: colName,
aggregation: y[0],
skipNetworkValidation: true,
});
await aggregationBar.verifyAggregation({

Loading…
Cancel
Save