auth.spec.ts 526 B

1234567891011121314151617
  1. import { test, expect } from "../setup";
  2. import { loginAsAdmin } from "../utils/admin";
  3. test("should be able to login", async ({ page }) => {
  4. await loginAsAdmin(page);
  5. await expect(page.getByPlaceholder("Mega Search").first()).toBeVisible();
  6. });
  7. test("should be able to logout", async ({ page }) => {
  8. await loginAsAdmin(page);
  9. await page.click("button:text('E')");
  10. await page.getByRole("link", { name: "Logout" }).click();
  11. await expect(page.getByPlaceholder("Password").first()).toBeVisible();
  12. });