added missing await, increase test stability (#39381)

* added missing await, increase test stability

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* use different user to make test atomic

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

---------

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
This commit is contained in:
Erik Jan de Wit 2025-05-01 12:49:10 +02:00 committed by GitHub
parent ef807f9a80
commit 9142978c70
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -120,12 +120,19 @@ test.describe("User creation", () => {
test.describe("Existing users", () => {
const placeHolder = "Search user";
const existingUserId = `existing_user-${uuid()}`;
const existingUserId2 = `existing_user2-${uuid()}`;
test.beforeAll(() =>
adminClient.createUser({
realm: realmName,
username: existingUserId,
}),
Promise.all([
adminClient.createUser({
realm: realmName,
username: existingUserId,
}),
adminClient.createUser({
realm: realmName,
username: existingUserId2,
}),
]),
);
test("Search existing user test", async ({ page }) => {
@ -182,7 +189,7 @@ test.describe("User creation", () => {
});
test("User attributes with multiple values test", async ({ page }) => {
await clickTableRowItem(page, existingUserId);
await clickTableRowItem(page, existingUserId2);
await goToAttributesTab(page);
await fillAttributeData(page, "key-multiple", "value1", attributesName);