- Add Cookie Policy view documenting essential cookies (session, CSRF, remember_me, fa_location) and cookieless Umami analytics - Add Privacy Policy view covering UK GDPR compliance, data categories, lawful bases, processors, retention, and user rights - Add Refund & Cancellation Policy view explaining 14-day cooling-off period under Consumer Contracts Regulations 2013 and express-consent flow - Add Terms of Service view defining account rules, subscription billing, and governing law - Create shared legal layout component with FuelAlert header, footer with cross-links, and consistent typography - Add feature tests covering all four legal pages and their cross-links - All policies include placeholders for ICO registration number, email, and hosting/email providers pending production config
55 lines
1.7 KiB
PHP
55 lines
1.7 KiB
PHP
<?php
|
|
|
|
it('serves the privacy policy with required content', function (): void {
|
|
$response = $this->get('/legal/privacy');
|
|
|
|
$response->assertStatus(200);
|
|
$response->assertSeeText('Privacy Policy');
|
|
$response->assertSeeText('data controller');
|
|
$response->assertSeeText('UK GDPR');
|
|
$response->assertSeeText('Last updated:');
|
|
});
|
|
|
|
it('serves the terms of service with required content', function (): void {
|
|
$response = $this->get('/legal/terms');
|
|
|
|
$response->assertStatus(200);
|
|
$response->assertSeeText('Terms of Service');
|
|
$response->assertSeeText('subscription');
|
|
$response->assertSeeText('England and Wales');
|
|
});
|
|
|
|
it('serves the refund policy with cooling-off content', function (): void {
|
|
$response = $this->get('/legal/refund');
|
|
|
|
$response->assertStatus(200);
|
|
$response->assertSeeText('Refund');
|
|
$response->assertSeeText('14-day');
|
|
$response->assertSeeText('Consumer Contracts');
|
|
});
|
|
|
|
it('serves the cookie policy with essential-cookie content', function (): void {
|
|
$response = $this->get('/legal/cookies');
|
|
|
|
$response->assertStatus(200);
|
|
$response->assertSeeText('Cookie Policy');
|
|
$response->assertSeeText('essential');
|
|
});
|
|
|
|
it('does not render the SPA mount point on legal pages', function (string $path): void {
|
|
$response = $this->get($path);
|
|
|
|
$response->assertStatus(200);
|
|
$response->assertDontSee('<div id="app"></div>', false);
|
|
})->with([
|
|
'/legal/privacy',
|
|
'/legal/terms',
|
|
'/legal/refund',
|
|
'/legal/cookies',
|
|
]);
|
|
|
|
it('cross-links between legal pages', function (): void {
|
|
$this->get('/legal/privacy')->assertSee(route('legal.cookies'), false);
|
|
$this->get('/legal/terms')->assertSee(route('legal.refund'), false);
|
|
});
|