diff options
author | Erich Eckner <git@eckner.net> | 2023-12-04 19:20:16 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2023-12-04 19:20:16 +0100 |
commit | 64f3e1d491cfd08cc8234b3d6504975674cf7cee (patch) | |
tree | fa00c55690221482eac1fe2c39a9f5fa75c5f657 /tests | |
download | Milchtankstelle-64f3e1d491cfd08cc8234b3d6504975674cf7cee.tar.xz |
initial commit
Diffstat (limited to 'tests')
-rw-r--r-- | tests/example.spec.ts | 18 |
1 files changed, 18 insertions, 0 deletions
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(); +}); |