Browse Source

fix: Improved test assertion

pull/6376/head
Muhammed Mustafa 11 months ago
parent
commit
c88495bee5
  1. 2
      tests/playwright/pages/Dashboard/Grid/index.ts
  2. 4
      tests/playwright/pages/Dashboard/common/Footbar/index.ts

2
tests/playwright/pages/Dashboard/Grid/index.ts

@ -64,7 +64,7 @@ export class GridPage extends BasePage {
async verifyCollaborativeMode() {
// add new row button
expect(await this.btn_addNewRow.count()).toBe(1);
await expect(this.btn_addNewRow).toHaveCount(1);
await this.toolbar.verifyCollaborativeMode();
await this.footbar.verifyCollaborativeMode();

4
tests/playwright/pages/Dashboard/common/Footbar/index.ts

@ -31,9 +31,9 @@ export class FootbarPage extends BasePage {
async verifyRoleAccess(param: { role: string }) {
const role = param.role.toLowerCase();
if (role === 'creator' || role === 'editor' || role === 'owner') {
expect(await this.btn_addNewRow.count()).toBe(1);
await expect(this.btn_addNewRow).toHaveCount(1);
} else {
expect(await this.btn_addNewRow.count()).toBe(0);
await expect(this.btn_addNewRow).toHaveCount(0);
}
}

Loading…
Cancel
Save