-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: improve design of auth pages (#592)
- Loading branch information
Showing
11 changed files
with
520 additions
and
508 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,55 @@ | ||
import { test, expect } from "@playwright/test" | ||
import { test, expect } from "@playwright/test"; | ||
|
||
import { deleteOrg, populateLogs } from "./utils/db" | ||
import { deleteOrg, populateLogs } from "./utils/db"; | ||
|
||
const authFile = "e2e/.auth/user.json" | ||
const authFile = "e2e/.auth/user.json"; | ||
|
||
test.beforeAll(async () => { | ||
// Sometimes the teardown isn't called, so we need to clean up the database before running the tests | ||
await deleteOrg() | ||
}) | ||
await deleteOrg(); | ||
}); | ||
|
||
test("signup flow", async ({ page }) => { | ||
await page.goto("/") | ||
await page.goto("/"); | ||
|
||
await page.getByRole("link", { name: "Sign Up" }).click() | ||
await page.getByRole("link", { name: "Sign Up" }).click(); | ||
|
||
await page.waitForURL("**/signup") | ||
await page.waitForURL("**/signup"); | ||
|
||
await page.getByPlaceholder("Your email").click() | ||
await page.getByPlaceholder("Your email").fill("test@lunary.ai") | ||
await page.getByPlaceholder("Your email").click(); | ||
await page.getByPlaceholder("Your email").fill("test@lunary.ai"); | ||
|
||
await page.getByPlaceholder("Your full name").click() | ||
await page.getByPlaceholder("Your full name").fill("test test") | ||
await page.getByPlaceholder("Your full name").click(); | ||
await page.getByPlaceholder("Your full name").fill("test test"); | ||
|
||
await page.getByPlaceholder("Your password").click() | ||
await page.getByPlaceholder("Your password").fill("testtest") | ||
await page.getByPlaceholder("Pick a password").click(); | ||
await page.getByPlaceholder("Pick a password").fill("testtest"); | ||
|
||
await page.getByRole("button", { name: "Continue →" }).click() | ||
await page.getByTestId("continue-button").click(); | ||
|
||
await page.getByPlaceholder("Your project name").click() | ||
await page.getByPlaceholder("Your project name").fill("TESTPROJECT") | ||
await page.getByPlaceholder("Your project name").click(); | ||
await page.getByPlaceholder("Your project name").fill("TESTPROJECT"); | ||
|
||
await page.getByPlaceholder("Organization name").click() | ||
await page.getByPlaceholder("Organization name").fill("TESTORG") | ||
await page.getByPlaceholder("Organization name").click(); | ||
await page.getByPlaceholder("Organization name").fill("TESTORG"); | ||
|
||
await page.getByLabel("6-49").check() | ||
// await page.getByLabel("6-49").check(); | ||
|
||
await page.getByRole("button", { name: "Create account" }).click() | ||
await page.getByTestId("finish-button").click(); | ||
|
||
await page.waitForNavigation() | ||
await page.waitForNavigation(); | ||
|
||
await expect(page.getByText("Are you free in the next days")).toBeVisible() | ||
// await expect(page.getByText("Are you free in the next days")).toBeVisible(); | ||
|
||
await page.getByRole("button", { name: "Skip to Dashboard" }).click() | ||
await page.getByTestId("open-dashboard-button").click(); | ||
|
||
await page.waitForURL("**/analytics") | ||
await page.waitForURL("**/analytics"); | ||
|
||
await expect( | ||
page.getByRole("heading", { name: "Waiting for data..." }), | ||
).toBeVisible() | ||
).toBeVisible(); | ||
|
||
await page.context().storageState({ path: authFile }) | ||
await page.context().storageState({ path: authFile }); | ||
|
||
await populateLogs() | ||
}) | ||
await populateLogs(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.