Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

🩹 Fix broken e2e tests

Luke Velladfc785f2d147
diff --git a/apps/web/tests/authentication.spec.ts b/apps/web/tests/authentication.spec.ts
index 49199680e..d32d80d91 100644
--- a/apps/web/tests/authentication.spec.ts
+++ b/apps/web/tests/authentication.spec.ts
@@ -46,7 +46,7 @@ test.describe.serial(() => {
.getByPlaceholder("[email protected]")
.type(testUserEmail);
- await page.getByText("Continue").click();
+ await page.getByRole("button", { name: "Continue" }).click();
// Make sure the user doesn't exist yet and that logging in is not possible
await expect(
@@ -64,7 +64,7 @@ test.describe.serial(() => {
.getByPlaceholder("[email protected]")
.type(testUserEmail);
- await page.click("text=Continue");
+ await page.getByRole("button", { name: "Continue" }).click();
const codeInput = page.getByPlaceholder("Enter your 6-digit code");
@@ -74,7 +74,7 @@ test.describe.serial(() => {
await codeInput.type(code);
- await page.getByText("Continue").click();
+ await page.getByRole("button", { name: "Continue" }).click();
await page.waitForURL("/polls");
});
@@ -91,7 +91,7 @@ test.describe.serial(() => {
.getByPlaceholder("[email protected]")
.type(testUserEmail);
- await page.click("text=Continue");
+ await page.getByRole("button", { name: "Continue" }).click();
await expect(
page.getByText("A user with that email already exists"),
@@ -111,7 +111,7 @@ test.describe.serial(() => {
.getByPlaceholder("[email protected]")
.type(testUserEmail);
- await page.getByText("Continue").click();
+ await page.getByRole("button", { name: "Continue" }).click();
const { email } = await mailServer.captureOne(testUserEmail, {
wait: 5000,
@@ -139,13 +139,13 @@ test.describe.serial(() => {
.getByPlaceholder("[email protected]")
.type(testUserEmail);
- await page.getByText("Continue").click();
+ await page.getByRole("button", { name: "Continue" }).click();
const code = await getCode();
await page.getByPlaceholder("Enter your 6-digit code").type(code);
- await page.getByText("Continue").click();
+ await page.getByRole("button", { name: "Continue" }).click();
await page.waitForURL("/polls");
});