8000 Make clickCreateUser wait for an actionable button in the user profile tests by ahus1 · Pull Request #54812 · keycloak/keycloak · GitHub
[go: up one dir, main page]

Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions js/apps/admin-ui/test/realm-settings/userprofile.ts
6F81
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,8 @@ export async function switchOffIfOn(page: Page, selector: string) {
export async function clickCreateUser(page: Page) {
const emptyAction = page.getByTestId("no-users-found-empty-action");
const addUser = page.getByTestId("add-user");
await expect(emptyAction.or(addUser).first()).toBeVisible({
timeout: 15_000,
});

if ((await emptyAction.count()) > 0 && (await emptyAction.isVisible())) {
await emptyAction.click();
return;
}

await addUser.click();
// The table briefly shows its empty state before the spinner appears, so don't decide on a single look.
await emptyAction.or(addUser).first().click({ timeout: 15_000 });
}

export async function fillEmailAndOptionalUsername(
Expand Down
Loading
0