-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
141 changed files
with
35,068 additions
and
17,011 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,3 +39,5 @@ next-env.d.ts | |
/playwright-report/ | ||
/blob-report/ | ||
/playwright/.cache/ | ||
|
||
playwright/.auth |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { | ||
test as setup, | ||
expect, | ||
test, | ||
APIRequestContext, | ||
} from "@playwright/test"; | ||
import { randomUUID } from "node:crypto"; | ||
import { expectText, signup } from "./helpers"; | ||
|
||
const authFile = "playwright/.auth/user.json"; | ||
|
||
test.beforeEach(async ({ page }) => {}); | ||
|
||
setup("authenticate", async ({ page, request }) => { | ||
// log the user in | ||
const email = `login-test+${randomUUID()}@openearth.org`; | ||
const password = "Test123!"; | ||
await signup(request, email, password, password); | ||
|
||
await page.goto("/en/auth/login"); | ||
|
||
await expectText(page, "Log In to City Catalyst"); | ||
await page.locator('input[name="email"]').fill(email); | ||
await page.locator('input[name="password"]').fill(password); | ||
await page.locator('button[type="submit"]').click(); | ||
|
||
// TODO how to ensure that session route was called? | ||
await page.waitForResponse("/api/auth/session"); | ||
|
||
await expect(page).toHaveURL("/en/onboarding/"); | ||
|
||
await page.context().storageState({ path: authFile }); | ||
}); |
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.