(page: Page, email: string, password: string)
| 17 | } |
| 18 | |
| 19 | export async function logInUser(page: Page, email: string, password: string) { |
| 20 | await page.goto("/login") |
| 21 | |
| 22 | await page.getByTestId("email-input").fill(email) |
| 23 | await page.getByTestId("password-input").fill(password) |
| 24 | await page.getByRole("button", { name: "Log In" }).click() |
| 25 | await page.waitForURL("/") |
| 26 | await expect( |
| 27 | page.getByText("Welcome back, nice to see you again!"), |
| 28 | ).toBeVisible() |
| 29 | } |
| 30 | |
| 31 | export async function logOutUser(page: Page) { |
| 32 | await page.getByTestId("user-menu").click() |
no outgoing calls
no test coverage detected