Skip to content

Commit a90ca18

Browse files
Bugfix/login test (#701)
* Update login tests to use correct assertions * Update Playwright Tests workflow
1 parent 5d142b6 commit a90ca18

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

.github/workflows/playwright.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
name: Playwright Tests
22
on:
3-
push:
4-
branches: [develop]
53
pull_request_target:
64
branches: [develop]
75
types: [opened, synchronize, reopened, ready_for_review]

e2e/login.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ test.afterEach(async ({ page }) => {
44
// Sign out the user after all tests are done
55
await page.goto("http://localhost:3000/api/auth/signout");
66
await page.getByRole("button", { name: "Sign out" }).click();
7-
await expect(page.locator("#submitButton")).not.toBeVisible();
7+
await expect(page.locator("#submitButton")).toBeHidden();
88
});
99

1010
test.beforeEach(async ({ page }) => {
@@ -29,8 +29,9 @@ test.describe("Login Page", () => {
2929
await button.click();
3030
await page.waitForURL("https://github.com/**");
3131

32-
expect(page.getByLabel("Username or email address")).toBeTruthy();
32+
await page.waitForSelector("#login_field");
3333

34+
expect(page.getByLabel("Username or email address")).toBeTruthy();
3435
expect(page.getByLabel("Password")).toBeTruthy();
3536
});
3637
});

0 commit comments

Comments
 (0)