fix: Revert "feat: Update UI of signup / login pages (#16710)" (#16801)

* Revert "feat: Update UI of signup / login pages (#16710)"

This reverts commit b879aeef09.

* revert
This commit is contained in:
Benny Joo authored and GitHub committed 2024-09-24 20:07:37 +00:00
1 parent 77af36e2af
commit 17ff01af75
6 files changed
+227 -326

No files matched your search

@@ -297,8 +297,7 @@ test.describe("Organization", () => {
await test.step("Signing up with the previous username of the migrated user - shouldn't be allowed", async () => {
await page.goto("/signup");
await expect(page.locator("text=Create your account")).toBeVisible();
await expect(page.locator('[data-testid="continue-with-email-button"]')).toBeVisible();
await page.locator('[data-testid="continue-with-email-button"]').click();
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
await page.locator('input[name="username"]').fill(existingUser.username!);
await page
+3 -35
View File
@@ -10,27 +10,7 @@ import { expectInvitationEmailToBeReceived } from "./team/expects";
test.describe.configure({ mode: "parallel" });
test.describe("Signup Main Page Test", async () => {
test.beforeEach(async ({ features }) => {
features.reset();
});
test("Continue with email button must exist / work", async ({ page }) => {
await page.goto("/signup");
await expect(page.locator("text=Create your account")).toBeVisible();
await expect(page.locator('[data-testid="continue-with-email-button"]')).toBeVisible();
await page.locator('[data-testid="continue-with-email-button"]').click();
});
test("Continue with google button must exist / work", async ({ page }) => {
await page.goto("/signup");
await expect(page.locator('[data-testid="continue-with-google-button"]')).toBeVisible();
await page.locator('[data-testid="continue-with-google-button"]').click();
await page.waitForURL("/auth/sso/google");
});
});
test.describe("Email Signup Flow Test", async () => {
test.describe("Signup Flow Test", async () => {
test.beforeEach(async ({ features }) => {
features.reset(); // This resets to the inital state not an empt yarray
});
@@ -46,8 +26,6 @@ test.describe("Email Signup Flow Test", async () => {
await page.goto("/signup");
await expect(page.locator("text=Create your account")).toBeVisible();
await expect(page.locator('[data-testid="continue-with-email-button"]')).toBeVisible();
await page.locator('[data-testid="continue-with-email-button"]').click();
const alertMessage = "Username or email is already taken";
@@ -74,9 +52,8 @@ test.describe("Email Signup Flow Test", async () => {
});
await page.goto("/signup");
await expect(page.locator("text=Create your account")).toBeVisible();
await expect(page.locator('[data-testid="continue-with-email-button"]')).toBeVisible();
await page.locator('[data-testid="continue-with-email-button"]').click();
const alertMessage = "Username or email is already taken";
@@ -108,8 +85,6 @@ test.describe("Email Signup Flow Test", async () => {
// Signup with premium username name
await page.goto("/signup");
await expect(page.locator("text=Create your account")).toBeVisible();
await expect(page.locator('[data-testid="continue-with-email-button"]')).toBeVisible();
await page.locator('[data-testid="continue-with-email-button"]').click();
// Fill form
await page.locator('input[name="username"]').fill("rock");
@@ -138,8 +113,6 @@ test.describe("Email Signup Flow Test", async () => {
await page.goto("/signup");
await expect(page.locator("text=Create your account")).toBeVisible();
await expect(page.locator('[data-testid="continue-with-email-button"]')).toBeVisible();
await page.locator('[data-testid="continue-with-email-button"]').click();
// Fill form
await page.locator('input[name="username"]').fill(userToCreate.username);
@@ -159,8 +132,6 @@ test.describe("Email Signup Flow Test", async () => {
const signupUrlWithParams = "/signup?username=rick-jones&email=rick-jones%40example.com";
await page.goto(signupUrlWithParams);
await expect(page.locator("text=Create your account")).toBeVisible();
await expect(page.locator('[data-testid="continue-with-email-button"]')).toBeVisible();
await page.locator('[data-testid="continue-with-email-button"]').click();
// Fill form
const usernameInput = page.locator('input[name="username"]');
@@ -242,8 +213,6 @@ test.describe("Email Signup Flow Test", async () => {
await page.goto("/signup");
await expect(page.locator("text=Create your account")).toBeVisible();
await expect(page.locator('[data-testid="continue-with-email-button"]')).toBeVisible();
await page.locator('[data-testid="continue-with-email-button"]').click();
// Fill form
await page.locator('input[name="username"]').fill(userToCreate.username);
@@ -314,8 +283,7 @@ test.describe("Email Signup Flow Test", async () => {
const url = new URL(newPage.url());
expect(url.pathname).toBe("/signup");
await expect(page.locator('[data-testid="continue-with-email-button"]')).toBeVisible();
await page.locator('[data-testid="continue-with-email-button"]').click();
// Check required fields
await newPage.locator("input[name=password]").fill(`P4ssw0rd!`);
await newPage.locator("button[type=submit]").click();