test: improve searching for elements on users page
This commit is contained in:
@@ -43,6 +43,10 @@ export class AdminApplicationSettingsPage extends AuthenticatedPage {
|
||||
await this.saveButton.click();
|
||||
}
|
||||
|
||||
async expectOnlyOneSuccessSnackbarToBeVisible() {
|
||||
await expect(this.successSnackbar).toBeVisible();
|
||||
}
|
||||
|
||||
async expectSuccessSnackbarToBeVisible() {
|
||||
const snackbars = await this.successSnackbar.all();
|
||||
for (const snackbar of snackbars) {
|
||||
|
||||
@@ -27,6 +27,11 @@ export class AdminUsersPage extends AuthenticatedPage {
|
||||
await this.profileMenuButton.click();
|
||||
await this.adminMenuItem.click();
|
||||
await this.isMounted();
|
||||
await Promise.all([
|
||||
this.page.waitForResponse(
|
||||
(resp) => resp.url().includes('/admin/users') && resp.status() === 200
|
||||
),
|
||||
]);
|
||||
if (await this.usersLoader.isVisible()) {
|
||||
await this.usersLoader.waitFor({
|
||||
state: 'detached',
|
||||
|
||||
Reference in New Issue
Block a user