Browse Source

test: fix import test for sticky column change

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/5060/head
mertmit 2 years ago
parent
commit
a689628b14
  1. 4
      tests/playwright/pages/Dashboard/common/Toolbar/Fields.ts
  2. 2
      tests/playwright/quickTests/commonTest.ts

4
tests/playwright/pages/Dashboard/common/Toolbar/Fields.ts

@ -31,12 +31,12 @@ export class ToolbarFieldsPage extends BasePage {
await this.toolbar.clickFields();
}
async verify({ title, checked }: { title: string; checked: boolean }) {
async verify({ title, checked }: { title: string; checked?: boolean }) {
const checkbox = this.get().locator(`[data-testid="nc-fields-menu-${title}"]`).locator('input[type="checkbox"]');
if (checked) {
await expect(checkbox).toBeChecked();
} else {
} else if (checked === false) {
await expect(checkbox).not.toBeChecked();
}
}

2
tests/playwright/quickTests/commonTest.ts

@ -208,7 +208,7 @@ const quickVerify = async ({
// Verify Fields
await dashboard.grid.toolbar.clickFields();
await dashboard.grid.toolbar.fields.verify({ title: 'Name', checked: true });
await dashboard.grid.toolbar.fields.verify({ title: 'Name' });
await dashboard.grid.toolbar.fields.verify({ title: 'Notes', checked: true });
await dashboard.grid.toolbar.fields.verify({ title: 'Attachments', checked: false });
await dashboard.grid.toolbar.fields.verify({ title: 'Status', checked: true });

Loading…
Cancel
Save