|
|
@ -140,8 +140,8 @@ export class ToolbarFilterPage extends BasePage { |
|
|
|
.click(); |
|
|
|
.click(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
await this.waitForResponse({ |
|
|
|
await this.waitForResponse({ |
|
|
|
uiAction: () => |
|
|
|
uiAction: async () => |
|
|
|
this.rootPage |
|
|
|
await this.rootPage |
|
|
|
.locator('div.ant-select-dropdown.nc-dropdown-toolbar-field-list') |
|
|
|
.locator('div.ant-select-dropdown.nc-dropdown-toolbar-field-list') |
|
|
|
.locator(`div[label="${title}"]:visible`) |
|
|
|
.locator(`div[label="${title}"]:visible`) |
|
|
|
.click(), |
|
|
|
.click(), |
|
|
@ -164,8 +164,8 @@ export class ToolbarFilterPage extends BasePage { |
|
|
|
.click(); |
|
|
|
.click(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
await this.waitForResponse({ |
|
|
|
await this.waitForResponse({ |
|
|
|
uiAction: () => |
|
|
|
uiAction: async () => |
|
|
|
this.rootPage |
|
|
|
await this.rootPage |
|
|
|
.locator('.nc-dropdown-filter-comp-op') |
|
|
|
.locator('.nc-dropdown-filter-comp-op') |
|
|
|
.locator(`.ant-select-item:has-text("${operation}")`) |
|
|
|
.locator(`.ant-select-item:has-text("${operation}")`) |
|
|
|
.first() |
|
|
|
.first() |
|
|
@ -193,8 +193,8 @@ export class ToolbarFilterPage extends BasePage { |
|
|
|
.click(); |
|
|
|
.click(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
await this.waitForResponse({ |
|
|
|
await this.waitForResponse({ |
|
|
|
uiAction: () => |
|
|
|
uiAction: async () => |
|
|
|
this.rootPage |
|
|
|
await this.rootPage |
|
|
|
.locator('.nc-dropdown-filter-comp-sub-op') |
|
|
|
.locator('.nc-dropdown-filter-comp-sub-op') |
|
|
|
.locator(`.ant-select-item:has-text("${subOperation}")`) |
|
|
|
.locator(`.ant-select-item:has-text("${subOperation}")`) |
|
|
|
.first() |
|
|
|
.first() |
|
|
@ -239,7 +239,7 @@ export class ToolbarFilterPage extends BasePage { |
|
|
|
await this.rootPage.locator(`.ant-picker-cell-inner:has-text("${value}")`).click(); |
|
|
|
await this.rootPage.locator(`.ant-picker-cell-inner:has-text("${value}")`).click(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
await this.waitForResponse({ |
|
|
|
await this.waitForResponse({ |
|
|
|
uiAction: () => this.rootPage.locator(`.ant-picker-cell-inner:has-text("${value}")`).click(), |
|
|
|
uiAction: async () => await this.rootPage.locator(`.ant-picker-cell-inner:has-text("${value}")`).click(), |
|
|
|
httpMethodsToMatch: ['GET'], |
|
|
|
httpMethodsToMatch: ['GET'], |
|
|
|
requestUrlPathToMatch: locallySaved ? `/api/v1/db/public/` : `/api/v1/db/data/noco/`, |
|
|
|
requestUrlPathToMatch: locallySaved ? `/api/v1/db/public/` : `/api/v1/db/data/noco/`, |
|
|
|
}); |
|
|
|
}); |
|
|
@ -260,7 +260,7 @@ export class ToolbarFilterPage extends BasePage { |
|
|
|
await this.get().locator('.nc-filter-value-select').locator('input').fill(value); |
|
|
|
await this.get().locator('.nc-filter-value-select').locator('input').fill(value); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
await this.waitForResponse({ |
|
|
|
await this.waitForResponse({ |
|
|
|
uiAction: () => this.get().locator('.nc-filter-value-select').locator('input').fill(value), |
|
|
|
uiAction: async () => await this.get().locator('.nc-filter-value-select').locator('input').fill(value), |
|
|
|
httpMethodsToMatch: ['GET'], |
|
|
|
httpMethodsToMatch: ['GET'], |
|
|
|
requestUrlPathToMatch: locallySaved ? `/api/v1/db/public/` : `/api/v1/db/data/noco/`, |
|
|
|
requestUrlPathToMatch: locallySaved ? `/api/v1/db/public/` : `/api/v1/db/data/noco/`, |
|
|
|
}); |
|
|
|
}); |
|
|
@ -320,7 +320,7 @@ export class ToolbarFilterPage extends BasePage { |
|
|
|
await this.toolbar.clickFilter(); |
|
|
|
await this.toolbar.clickFilter(); |
|
|
|
if (networkValidation) { |
|
|
|
if (networkValidation) { |
|
|
|
await this.waitForResponse({ |
|
|
|
await this.waitForResponse({ |
|
|
|
uiAction: () => this.get().locator('.nc-filter-item-remove-btn').click(), |
|
|
|
uiAction: async () => await this.get().locator('.nc-filter-item-remove-btn').click(), |
|
|
|
httpMethodsToMatch: ['DELETE'], |
|
|
|
httpMethodsToMatch: ['DELETE'], |
|
|
|
requestUrlPathToMatch: '/api/v1/db/meta/filters/', |
|
|
|
requestUrlPathToMatch: '/api/v1/db/meta/filters/', |
|
|
|
}); |
|
|
|
}); |
|
|
@ -333,7 +333,7 @@ export class ToolbarFilterPage extends BasePage { |
|
|
|
async remove({ networkValidation = true }: { networkValidation?: boolean } = {}) { |
|
|
|
async remove({ networkValidation = true }: { networkValidation?: boolean } = {}) { |
|
|
|
if (networkValidation) { |
|
|
|
if (networkValidation) { |
|
|
|
await this.waitForResponse({ |
|
|
|
await this.waitForResponse({ |
|
|
|
uiAction: () => this.get().locator('.nc-filter-item-remove-btn').click(), |
|
|
|
uiAction: async () => await this.get().locator('.nc-filter-item-remove-btn').click(), |
|
|
|
httpMethodsToMatch: ['DELETE'], |
|
|
|
httpMethodsToMatch: ['DELETE'], |
|
|
|
requestUrlPathToMatch: '/api/v1/db/meta/filters/', |
|
|
|
requestUrlPathToMatch: '/api/v1/db/meta/filters/', |
|
|
|
}); |
|
|
|
}); |
|
|
|