The submodule collapse was only half applied: .gitmodules was deleted but backend/ and frontend/ were still recorded as gitlinks, so none of their files were tracked. Replace the gitlinks with the real trees. Also untrack .env (it carried placeholder secrets) in favour of a tracked .env.example, drop the committed __pycache__, and narrow the blanket *.png ignore that would have swallowed design assets. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
36 lines
1.1 KiB
TypeScript
36 lines
1.1 KiB
TypeScript
import { expect, type Page } from "@playwright/test"
|
|
|
|
export async function signUpNewUser(
|
|
page: Page,
|
|
name: string,
|
|
email: string,
|
|
password: string,
|
|
) {
|
|
await page.goto("/signup")
|
|
|
|
await page.getByTestId("full-name-input").fill(name)
|
|
await page.getByTestId("email-input").fill(email)
|
|
await page.getByTestId("password-input").fill(password)
|
|
await page.getByTestId("confirm-password-input").fill(password)
|
|
await page.getByRole("button", { name: "Sign Up" }).click()
|
|
await page.goto("/login")
|
|
}
|
|
|
|
export async function logInUser(page: Page, email: string, password: string) {
|
|
await page.goto("/login")
|
|
|
|
await page.getByTestId("email-input").fill(email)
|
|
await page.getByTestId("password-input").fill(password)
|
|
await page.getByRole("button", { name: "Log In" }).click()
|
|
await page.waitForURL("/")
|
|
await expect(
|
|
page.getByText("Welcome back, nice to see you again!"),
|
|
).toBeVisible()
|
|
}
|
|
|
|
export async function logOutUser(page: Page) {
|
|
await page.getByTestId("user-menu").click()
|
|
await page.getByRole("menuitem", { name: "Log out" }).click()
|
|
await page.goto("/login")
|
|
}
|