import { test, expect } from "@playwright/test";
import { actorCalled, Actor } from "@serenity-js/core";
import { BrowseTheWebWithPlaywright } from "@serenity-js/playwright";
import { Navigate } from "@serenity-js/web";
test("get started link", async ({ page }) => {
const actor = actorCalled("Jacob").whoCan(
BrowseTheWebWithPlaywright.usingPage(page)
);
await actor.attemptsTo(Navigate.to("google.com"));
await page.goto("https://playwright.dev/");
// Click the get started link.
await page.getByRole("link", { name: "Get started" }).click();
// Expects page to have a heading with the name of Installation.
await expect(
page.getByRole("heading", { name: "Installation" })
).toBeVisible();
});