feat: optional fixed viewport background on public pages

Adds background_fixed column, admin checkbox, fixed-position layers on the public layout, Dutch strings, and store tests.

Made-with: Cursor
This commit is contained in:
2026-04-04 13:36:26 +02:00
parent 2603288881
commit 5a67827c23
7 changed files with 72 additions and 4 deletions

View File

@@ -32,9 +32,31 @@ class StorePreregistrationPageTest extends TestCase
$page = PreregistrationPage::query()->first();
$response->assertRedirect(route('admin.pages.edit', $page));
$this->assertSame('Summer Fest', $page?->title);
$this->assertFalse($page?->background_fixed);
$this->assertGreaterThanOrEqual(4, PageBlock::query()->where('preregistration_page_id', $page?->id)->count());
}
public function test_store_can_enable_fixed_background(): void
{
$user = User::factory()->create(['role' => 'user']);
$response = $this->actingAs($user)->post(route('admin.pages.store'), [
'title' => 'Winter Fest',
'thank_you_message' => null,
'expired_message' => null,
'ticketshop_url' => null,
'start_date' => '2026-06-01T10:00',
'end_date' => '2026-06-30T18:00',
'is_active' => true,
'background_fixed' => true,
]);
$page = PreregistrationPage::query()->where('title', 'Winter Fest')->first();
$response->assertRedirect(route('admin.pages.edit', $page));
$this->assertNotNull($page);
$this->assertTrue($page->background_fixed);
}
public function test_validation_failure_redirects_back_with_input(): void
{
$user = User::factory()->create(['role' => 'user']);