test: write tests for role management (#1396)

This commit is contained in:
QAComet
2023-11-06 02:35:20 -07:00
committed by GitHub
parent 5fb48ed54b
commit 1581b5ac0a
21 changed files with 899 additions and 13 deletions

View File

@@ -0,0 +1,19 @@
export class DeleteRoleModal {
screenshotPath = '/admin/delete-role-modal';
/**
* @param {import('@playwright/test').Page} page
*/
constructor (page) {
this.page = page;
this.modal = page.getByTestId('delete-role-modal');
this.cancelButton = this.modal.getByTestId('confirmation-cancel-button');
this.deleteButton = this.modal.getByTestId('confirmation-confirm-button');
}
async close () {
await this.page.click('body', {
position: { x: 10, y: 10 }
});
}
}