Add comprehensive test coverage for core site features (content, navigation, language, FAQ, news, petition, newsletter) using Pest browser tests and unit tests for custom plugins. Includes test infrastructure (Containerfile.test, compose.test.yaml), test documentation, and test files covering petition form logic, CSV handling, translation, date formatting, rate limiting, and map data building.
31 lines
928 B
PHP
31 lines
928 B
PHP
<?php
|
|
|
|
it('news listing page loads', function () {
|
|
$this->visit(BASE_URL . '/nyheter')
|
|
->assertSourceHas('<main');
|
|
});
|
|
|
|
it('news listing shows article titles', function () {
|
|
$this->visit(BASE_URL . '/nyheter')
|
|
->assertSee('Banebrytende');
|
|
});
|
|
|
|
it('individual news article loads', function () {
|
|
$this->visit(BASE_URL . '/nyheter/2025-09-26-banebrytende-studie')
|
|
->assertSourceHas('<main');
|
|
});
|
|
|
|
it('individual news article shows content', function () {
|
|
$this->visit(BASE_URL . '/nyheter/2025-09-26-banebrytende-studie')
|
|
->assertSee('medisinsk cannabis');
|
|
});
|
|
|
|
it('news article about podcast loads', function () {
|
|
$this->visit(BASE_URL . '/nyheter/2026-03-08-podcast-paradigmepodden')
|
|
->assertSourceHas('<main');
|
|
});
|
|
|
|
it('returns 404 for non-existent news article', function () {
|
|
$this->visit(BASE_URL . '/nyheter/finnes-ikke')
|
|
->assertSourceHas('404');
|
|
});
|