-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
3 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,7 @@ | ||
import { expect, test } from "@playwright/test"; | ||
|
||
test("should navigate to the about page", async ({ page }) => { | ||
// Start from the index page (the baseURL is set via the webServer in the playwright.config.ts) | ||
await page.goto("/"); | ||
// Find an element with the text 'About Page' and click on it | ||
await page.getByText("About Page").click(); | ||
// The new url should be "/about" (baseURL is used there) | ||
await page.getByText("About").click(); | ||
await expect(page).toHaveURL("/about"); | ||
// The new page should contain an h1 with "About Page" | ||
await expect(page.getByRole("heading", { level: 1 })).toContainText( | ||
"About Page", | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters