Browse Source

test: pw fix for select related dropdown

pull/7398/head
Raju Udava 11 months ago
parent
commit
3dadebb567
  1. 30
      tests/playwright/pages/Dashboard/common/Toolbar/Filter.ts

30
tests/playwright/pages/Dashboard/common/Toolbar/Filter.ts

@ -288,14 +288,8 @@ export class ToolbarFilterPage extends BasePage {
.click(); .click();
break; break;
case UITypes.MultiSelect: case UITypes.MultiSelect:
await this.get() await this.get().locator('.nc-filter-value-select').waitFor();
.locator('.nc-filter-value-select') await this.get().locator('.nc-filter-value-select').click();
.click({
position: {
x: 1,
y: 1,
},
});
// eslint-disable-next-line no-case-declarations // eslint-disable-next-line no-case-declarations
const v = value.split(','); const v = value.split(',');
for (let i = 0; i < v.length; i++) { for (let i = 0; i < v.length; i++) {
@ -306,14 +300,8 @@ export class ToolbarFilterPage extends BasePage {
} }
break; break;
case UITypes.SingleSelect: case UITypes.SingleSelect:
await this.get() await this.get().locator('.nc-filter-value-select').waitFor();
.locator('.nc-filter-value-select') await this.get().locator('.nc-filter-value-select').click();
.click({
position: {
x: 1,
y: 1,
},
});
// check if value was an array // check if value was an array
// eslint-disable-next-line no-case-declarations // eslint-disable-next-line no-case-declarations
const val = value.split(','); const val = value.split(',');
@ -333,14 +321,8 @@ export class ToolbarFilterPage extends BasePage {
break; break;
case UITypes.User: case UITypes.User:
if (!['is blank', 'is not blank'].includes(operation)) { if (!['is blank', 'is not blank'].includes(operation)) {
await this.get() await this.get().locator('.nc-filter-value-select').waitFor();
.locator('.nc-filter-value-select') await this.get().locator('.nc-filter-value-select').click();
.click({
position: {
x: 1,
y: 1,
},
});
const v = value.split(','); const v = value.split(',');
for (let i = 0; i < v.length; i++) { for (let i = 0; i < v.length; i++) {

Loading…
Cancel
Save