First test

This commit is contained in:
2026-02-06 11:53:20 +01:00
parent 064ccddde0
commit 96fe5431c3
5 changed files with 221 additions and 0 deletions

25
tests/example.spec.ts Normal file
View File

@@ -0,0 +1,25 @@
import { test, expect } from '@playwright/test';
test('has title', async ({ page }) => {
await page.goto('https://music.lukan.cz/');
// Expect a title "to contain" a substring.
await expect(page).toHaveTitle(/Zažij numetal a grunge každý den, po celý rok./);
});
test('has title about page', async ({ page }) => {
await page.goto('https://music.lukan.cz/about.html');
// Expect a title "to contain" a substring about page.
await expect(page).toHaveTitle(/O projektu a další žvásty/);
});
test('get started link', async ({ page }) => {
await page.goto('https://music.lukan.cz/');
// Click the get started link.
await page.getByRole('link', { name: 'O projektu' }).click();
// Expects page to have a heading with the name of Installation.
await expect(page.getByRole('heading', { name: '🎸 Zažij numetal a grunge každý den, po celý rok. 💿' })).toBeVisible();
});