Skip to content

Commit

Permalink
Bugfix/login test (#701)
Browse files Browse the repository at this point in the history
* Update login tests to use correct assertions

* Update Playwright Tests workflow
  • Loading branch information
NiallJoeMaher authored Jan 20, 2024
1 parent 5d142b6 commit a90ca18
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: Playwright Tests
on:
push:
branches: [develop]
pull_request_target:
branches: [develop]
types: [opened, synchronize, reopened, ready_for_review]
Expand Down
5 changes: 3 additions & 2 deletions e2e/login.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ test.afterEach(async ({ page }) => {
// Sign out the user after all tests are done
await page.goto("http://localhost:3000/api/auth/signout");
await page.getByRole("button", { name: "Sign out" }).click();
await expect(page.locator("#submitButton")).not.toBeVisible();
await expect(page.locator("#submitButton")).toBeHidden();
});

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

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

expect(page.getByLabel("Username or email address")).toBeTruthy();
expect(page.getByLabel("Password")).toBeTruthy();
});
});

0 comments on commit a90ca18

Please sign in to comment.