mirror of
https://github.com/vector-im/element-call.git
synced 2026-01-18 02:32:27 +00:00
use .toBeVisible instead of continueButton.isVisible
This commit is contained in:
@@ -95,11 +95,14 @@ async function registerUser(
|
||||
await page.getByRole("textbox", { name: "Confirm password" }).fill(PASSWORD);
|
||||
await page.getByRole("button", { name: "Register" }).click();
|
||||
const continueButton = page.getByRole("button", { name: "Continue" });
|
||||
if (await continueButton.isVisible().catch(() => false)) {
|
||||
try {
|
||||
await expect(continueButton).toBeVisible({ timeout: 5000 });
|
||||
await page
|
||||
.getByRole("textbox", { name: "Password", exact: true })
|
||||
.fill(PASSWORD);
|
||||
await continueButton.click();
|
||||
} catch {
|
||||
// continueButton not visible, continue as normal
|
||||
}
|
||||
await expect(
|
||||
page.getByRole("heading", { name: `Welcome ${username}` }),
|
||||
|
||||
Reference in New Issue
Block a user