test: role access validation

Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
This commit is contained in:
Raju Udava
2022-10-22 15:49:54 +05:30
committed by Muhammed Mustafa
parent a044482c26
commit f2496e39da
13 changed files with 498 additions and 40 deletions

View File

@@ -162,4 +162,12 @@ export class ViewSidebarPage extends BasePage {
.click();
await this.toastWait({ message: "View created successfully" });
}
async validateRoleAccess(param: { role: string }) {
let count = param.role === "creator" ? 1 : 0;
expect(await this.createGridButton.count()).toBe(count);
expect(await this.createGalleryButton.count()).toBe(count);
expect(await this.createFormButton.count()).toBe(count);
expect(await this.createKanbanButton.count()).toBe(count);
}
}