Skip to content

Commit 3728f25

Browse files
committed
improve waiting strategy
1 parent c77fef5 commit 3728f25

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

e2e-tests/playwright/e2e/plugins/rbac/rbac.spec.ts

+7-2
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,14 @@ test.describe.serial("Test RBAC", () => {
271271
state: "visible",
272272
});
273273
let nextButton2: Locator;
274+
let matchNextButton2: Locator[];
275+
let attempts = 0;
274276
do {
275-
nextButton2 = page.getByTestId("nextButton-2");
276-
} while (nextButton2.all.length > 1);
277+
page.waitForTimeout(500);
278+
nextButton2 = page.locator('[data-testid="nextButton-2"]');
279+
matchNextButton2 = await nextButton2.all();
280+
attempts++;
281+
} while (matchNextButton2.length > 1 && attempts < 5);
277282
nextButton2.click();
278283
await uiHelper.clickButton("Save");
279284
await uiHelper.verifyText(

0 commit comments

Comments
 (0)