KkosmetickySalon/tests/e2e/service.test.ts

23 lines
711 B
TypeScript
Raw Normal View History

// tests/e2e/service.test.ts
import { test, expect } from '@playwright/test';
test('service page renders correctly', async ({ page }) => {
const categoryId = 'pmu';
const serviceId = 'pmu-linky';
await page.goto(`/${categoryId}/${serviceId}`);
// Assert service title
const serviceTitle = await page.locator('h1').textContent();
expect(serviceTitle).toBeDefined();
// Assert service description
const serviceDescription = await page.locator('p').first().textContent();
expect(serviceDescription).toBeDefined();
// Assert service content
const serviceContent = await page.locator('article').textContent();
expect(serviceContent).toBeDefined();
// Add more assertions as needed
});