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:
@@ -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']);
|
||||
|
||||
Reference in New Issue
Block a user