Browse Source

test: add wait logic for checkbox read

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
pull/5903/head
Raju Udava 1 year ago
parent
commit
a0bab6da7b
  1. 3
      tests/playwright/pages/Account/Settings.ts
  2. 6
      tests/playwright/pages/Dashboard/common/Cell/CheckboxCell.ts

3
tests/playwright/pages/Account/Settings.ts

@ -33,7 +33,8 @@ export class AccountSettingsPage extends BasePage {
}
async getInviteOnlyCheckboxValue() {
return this.get().locator(`.nc-invite-only-signup-checkbox`).isChecked();
await this.get().locator(`.nc-invite-only-signup-checkbox`).waitFor({ state: 'visible' });
return this.get().locator(`.nc-invite-only-signup-checkbox`).isChecked({ timeout: 1000 });
}
async checkInviteOnlySignupCheckbox(value: boolean) {

6
tests/playwright/pages/Dashboard/common/Cell/CheckboxCell.ts

@ -18,9 +18,9 @@ export class CheckboxCellPageObject extends BasePage {
return await this.get({ index, columnHeader }).locator('.nc-cell').click();
}
async isChecked({ index, columnHeader }: { index?: number; columnHeader: string }) {
return await this.get({ index, columnHeader }).locator('.nc-cell-hover-show').isVisible();
}
// async isChecked({ index, columnHeader }: { index?: number; columnHeader: string }) {
// return await this.get({ index, columnHeader }).locator('.nc-cell-hover-show').isVisible();
// }
async verifyChecked({ index, columnHeader }: { index?: number; columnHeader: string }) {
await expect(this.get({ index, columnHeader }).locator('.nc-cell-hover-show')).not.toBeVisible();

Loading…
Cancel
Save