Browse Source

test: select options

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/5363/head
Raju Udava 2 years ago
parent
commit
c09325ffd2
  1. 10
      tests/playwright/pages/Dashboard/Grid/Column/SelectOptionColumn.ts

10
tests/playwright/pages/Dashboard/Grid/Column/SelectOptionColumn.ts

@ -60,7 +60,7 @@ export class SelectOptionColumnPageObject extends BasePage {
async deleteOption({ columnTitle, index }: { index: number; columnTitle: string }) { async deleteOption({ columnTitle, index }: { index: number; columnTitle: string }) {
await this.column.openEdit({ title: columnTitle }); await this.column.openEdit({ title: columnTitle });
await this.column.get().locator(`svg[data-testid="select-column-option-remove-${index}"]`).click(); await this.column.get().locator(`[data-testid="select-column-option-remove-${index}"]`).click();
await expect(this.column.get().getByTestId(`select-column-option-${index}`)).toHaveClass(/removed/); await expect(this.column.get().getByTestId(`select-column-option-${index}`)).toHaveClass(/removed/);
@ -70,11 +70,11 @@ export class SelectOptionColumnPageObject extends BasePage {
async deleteOptionWithUndo({ columnTitle, index }: { index: number; columnTitle: string }) { async deleteOptionWithUndo({ columnTitle, index }: { index: number; columnTitle: string }) {
await this.column.openEdit({ title: columnTitle }); await this.column.openEdit({ title: columnTitle });
await this.column.get().locator(`svg[data-testid="select-column-option-remove-${index}"]`).click(); await this.column.get().locator(`[data-testid="select-column-option-remove-${index}"]`).click();
await expect(this.column.get().getByTestId(`select-column-option-${index}`)).toHaveClass(/removed/); await expect(this.column.get().getByTestId(`select-column-option-${index}`)).toHaveClass(/removed/);
await this.column.get().locator(`svg[data-testid="select-column-option-remove-undo-${index}"]`).click(); await this.column.get().locator(`[data-testid="select-column-option-remove-undo-${index}"]`).click();
await expect(this.column.get().getByTestId(`select-column-option-${index}`)).not.toHaveClass(/removed/); await expect(this.column.get().getByTestId(`select-column-option-${index}`)).not.toHaveClass(/removed/);
@ -95,8 +95,8 @@ export class SelectOptionColumnPageObject extends BasePage {
await this.column.rootPage.waitForTimeout(150); await this.column.rootPage.waitForTimeout(150);
await this.column.rootPage.dragAndDrop( await this.column.rootPage.dragAndDrop(
`svg[data-testid="select-option-column-handle-icon-${sourceOption}"]`, `[data-testid="select-option-column-handle-icon-${sourceOption}"]`,
`svg[data-testid="select-option-column-handle-icon-${destinationOption}"]`, `[data-testid="select-option-column-handle-icon-${destinationOption}"]`,
{ {
force: true, force: true,
} }

Loading…
Cancel
Save