diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 839c0c44..046c1709 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -1,7 +1,5 @@ name: Playwright Tests on: - push: - branches: [develop] pull_request_target: branches: [develop] types: [opened, synchronize, reopened, ready_for_review] diff --git a/e2e/login.spec.ts b/e2e/login.spec.ts index 6bb4fc39..02f15395 100644 --- a/e2e/login.spec.ts +++ b/e2e/login.spec.ts @@ -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 }) => { @@ -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(); }); });