From f7f7cea0015cf3bc76c3d8181992ec070fea9d79 Mon Sep 17 00:00:00 2001 From: D-Antonelli Date: Mon, 19 Aug 2024 14:04:54 +0100 Subject: [PATCH] updates test --- playwright/signin-page.spec.ts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/playwright/signin-page.spec.ts b/playwright/signin-page.spec.ts index 76dd1f7..2c8e673 100644 --- a/playwright/signin-page.spec.ts +++ b/playwright/signin-page.spec.ts @@ -1,5 +1,6 @@ import {test, expect} from "@playwright/test"; + test.describe("Sign-in Page", () => { test("should have the correct URL and social login buttons", async ({page}) => { await page.goto(`/api/auth/signin`); @@ -14,18 +15,5 @@ test.describe("Sign-in Page", () => { await expect(githubButton).toBeEnabled(); await expect(googleButton).toBeEnabled(); - // Optionally, click the buttons to ensure they trigger the expected behavior - await githubButton.click(); - // Assuming it redirects to GitHub's OAuth, we can check if the URL changes - await page.waitForTimeout(1000); // Wait for the page to potentially navigate - expect(page.url()).toContain("github.com"); - - // Go back to the sign-in page for Google test - await page.goto("http://localhost:3000/api/auth/signin"); - - await googleButton.click(); - // Assuming it redirects to Google's OAuth, we can check if the URL changes - await page.waitForTimeout(1000); // Wait for the page to potentially navigate - expect(page.url()).toContain("accounts.google.com"); }); });