Browse Source

test: duplicate column modal

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/6953/head
mertmit 8 months ago
parent
commit
eb7e7a8cc8
  1. 4
      tests/playwright/pages/Dashboard/Grid/Column/index.ts
  2. 2
      tests/playwright/tests/db/columns/columnMenuOperations.spec.ts

4
tests/playwright/pages/Dashboard/Grid/Column/index.ts

@ -319,10 +319,12 @@ export class ColumnPageObject extends BasePage {
await this.rootPage.locator('.nc-more-options').click();
}
async duplicateColumn({ title, expectedTitle = `${title}_copy` }: { title: string; expectedTitle?: string }) {
async duplicateColumn({ title, expectedTitle = `${title} copy` }: { title: string; expectedTitle?: string }) {
await this.grid.get().locator(`th[data-title="${title}"] .nc-ui-dt-dropdown`).click();
await this.rootPage.locator('li[role="menuitem"]:has-text("Duplicate"):visible').click();
await this.rootPage.locator('.nc-modal-column-duplicate .nc-button:has-text("Confirm"):visible').click();
// await this.verifyToast({ message: 'Column duplicated successfully' });
await this.grid.get().locator(`th[data-title="${expectedTitle}"]`).waitFor({ state: 'visible' });
}

2
tests/playwright/tests/db/columns/columnMenuOperations.spec.ts

@ -70,7 +70,7 @@ test.describe('Column menu operations', () => {
});
await dashboard.grid.column.duplicateColumn({
title,
expectedTitle: `${title}_copy_1`,
expectedTitle: `${title} copy_1`,
});
}
await dashboard.closeTab({ title: 'Film' });

Loading…
Cancel
Save