Files
blog/tests/e2e/category.spec.ts
T

15 lines
531 B
TypeScript
Raw Normal View History

2026-09-11 11:41:52 +02:00
import { expect, test } from '@playwright/test'
test('category page filters articles to that category only', async ({ page }) => {
await page.goto('/category/attualita')
await expect(page.getByRole('link', { name: 'Secondo articolo pubblicato' })).toBeVisible()
await expect(page.getByRole('link', { name: 'Articolo pubblicato', exact: true })).toHaveCount(0)
})
test('unknown category slug 404s', async ({ page }) => {
const response = await page.goto('/category/non-esiste')
expect(response?.status()).toBe(404)
})