From 64f3e1d491cfd08cc8234b3d6504975674cf7cee Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 4 Dec 2023 19:20:16 +0100 Subject: initial commit --- tests/example.spec.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/example.spec.ts (limited to 'tests') diff --git a/tests/example.spec.ts b/tests/example.spec.ts new file mode 100644 index 0000000..54a906a --- /dev/null +++ b/tests/example.spec.ts @@ -0,0 +1,18 @@ +import { test, expect } from '@playwright/test'; + +test('has title', async ({ page }) => { + await page.goto('https://playwright.dev/'); + + // Expect a title "to contain" a substring. + await expect(page).toHaveTitle(/Playwright/); +}); + +test('get started link', async ({ page }) => { + 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(); +}); -- cgit v1.2.3-70-g09d2