-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
im a fifth rate coder with a 4th rate dev setup
- Loading branch information
qweliant
committed
May 1, 2024
1 parent
0762036
commit 11805c3
Showing
4 changed files
with
68 additions
and
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,17 @@ import { expect, test } from "@playwright/test"; | |
const authFile = "playwright/.auth/user.json"; | ||
|
||
test("Assigning members to a pub", async ({ page }) => { | ||
// move a pub to to evaluate or just add it there in seed??? | ||
await page.goto("/c/unjournal/stages"); | ||
await page.getByRole("button", { name: "Create stage" }).click(); | ||
await page.getByRole("textbox", { name: "title" }).fill("Test stage"); | ||
await page.getByRole("button", { name: "Create" }).click(); | ||
await page.waitForURL("/c/unjournal/stages/test-stage"); | ||
await page.goto("/login"); | ||
await page.getByLabel("email").fill("[email protected]"); | ||
await page.getByRole("textbox", { name: "password" }).fill("pubpub-all"); | ||
await page.getByRole("button", { name: "Sign in" }).click(); | ||
// Wait until the page receives the cookies. | ||
// | ||
// Sometimes login flow sets cookies in the process of several redirects. | ||
// Wait for the final URL to ensure that the cookies are actually set. | ||
await page.waitForURL("/c/unjournal/stages"); | ||
await page.getByRole("button", { name: "Assign" }).click(); | ||
await page.getByRole("option", { name: "Jill Admin" }).click(); | ||
await page.getByText("Succes").waitFor({ state: "hidden" }); | ||
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