import type { Page } from "@playwright/test";

export async function loginAs(page: Page, annotatorId: string) {
  await page.goto("/");
  await page.selectOption("#annotator", annotatorId);
  await page.getByPlaceholder("Enter password").fill("SEC-cyBERT");
  await page.getByRole("button", { name: "Sign In" }).click();
  await page.waitForURL("/dashboard");
}
