Skip to content

Commit

Permalink
updates test
Browse files Browse the repository at this point in the history
  • Loading branch information
D-Antonelli committed Aug 19, 2024
1 parent 93f87fe commit f7f7cea
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions playwright/signin-page.spec.ts
Original file line number Diff line number Diff line change
@@ -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`);
Expand All @@ -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");
});
});

0 comments on commit f7f7cea

Please sign in to comment.