KkosmetickySalon/tests/e2e/category.test.ts

22 lines
664 B
TypeScript
Raw Normal View History

// tests/e2e/category.test.ts
import { test, expect } from '@playwright/test';
test('category page renders correctly', async ({ page }) => {
const categoryId = 'pmu';
await page.goto(`/${categoryId}`);
// Assert category title
const categoryTitle = await page.locator('h1').textContent();
expect(categoryTitle).toBeDefined();
// Assert category description
const categoryDescription = await page.locator('p').first().textContent();
expect(categoryDescription).toBeDefined();
// Assert services list
// const servicesList = page.locator('ul > li');
// await expect(servicesList).toBeGreaterThan(0);
// Add more assertions as needed
});