Fix share assets, shared photo UI, and live show expiry
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-02-06 07:30:30 +01:00
parent 18b4f36fcf
commit b14435df8b
12 changed files with 352 additions and 85 deletions

View File

@@ -8,11 +8,13 @@ class LiveShowLinkControllerTest extends TenantTestCase
{
public function test_live_show_link_response_includes_qr_code_and_url(): void
{
$eventDate = now()->addDays(2)->startOfDay();
$event = Event::factory()
->for($this->tenant)
->create([
'name' => ['de' => 'Live-Show Test', 'en' => 'Live Show Test'],
'slug' => 'live-show-link-test',
'date' => $eventDate,
]);
$response = $this->authenticatedRequest('GET', "/api/v1/tenant/events/{$event->slug}/live-show/link");
@@ -26,15 +28,18 @@ class LiveShowLinkControllerTest extends TenantTestCase
$this->assertArrayHasKey('url', $data);
$this->assertArrayHasKey('qr_code_data_url', $data);
$this->assertArrayHasKey('rotated_at', $data);
$this->assertArrayHasKey('expires_at', $data);
$this->assertIsString($data['token']);
$this->assertIsString($data['url']);
$this->assertIsString($data['qr_code_data_url']);
$this->assertStringStartsWith('data:image/png;base64,', $data['qr_code_data_url']);
$this->assertNotNull($data['rotated_at']);
$this->assertNotNull($data['expires_at']);
$expectedBase = rtrim((string) config('app.url'), '/');
$this->assertSame("{$expectedBase}/show/{$data['token']}", $data['url']);
$this->assertSame($eventDate->copy()->addDay()->endOfDay()->toIso8601String(), $data['expires_at']);
}
public function test_rotate_live_show_link_changes_token(): void