innhold/tests/Browser/ContentTest.php
Ruben b8e6d2537d Add browser and unit test suite with Pest + Playwright
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.
2026-03-17 16:43:39 +01:00

46 lines
1.2 KiB
PHP

<?php
it('about page shows organization history', function () {
$this->visit(BASE_URL . '/om-oss')
->assertSee('Vår historie');
});
it('about page mentions the organization name', function () {
$this->visit(BASE_URL . '/om-oss')
->assertSourceHas('Stopp lidelsen');
});
it('privacy page loads with correct heading', function () {
$this->visit(BASE_URL . '/personvern')
->assertSee('Personvernerklæring');
});
it('contact page loads with content', function () {
$this->visit(BASE_URL . '/kontakt')
->assertSourceHas('<main');
});
it('brochures page loads with intro text', function () {
$this->visit(BASE_URL . '/brosjyrer')
->assertSee('Brosjyrer');
});
it('articles section loads', function () {
$this->visit(BASE_URL . '/artikler')
->assertSourceHas('<main');
});
it('patient info article loads', function () {
$this->visit(BASE_URL . '/artikler/pasientinfo')
->assertSee('pasienter');
});
it('homepage shows goals section heading', function () {
$this->visit(BASE_URL . '/')
->assertSee('oppnå');
});
it('homepage shows intro text about the organization', function () {
$this->visit(BASE_URL . '/')
->assertSee('frivillig');
});