test(playwright): install playwright

This commit is contained in:
Mona Mayrhofer 2025-04-03 14:27:24 +02:00
parent 85afa969f1
commit b3018ccfc9
No known key found for this signature in database
GPG key ID: 5C83114FA383C6A0
7 changed files with 74 additions and 2 deletions

View file

@ -0,0 +1,18 @@
import { expect, test } 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();
});