Add Live Show settings in admin app
This commit is contained in:
@@ -138,6 +138,50 @@ class EventControllerTest extends TenantTestCase
|
||||
->assertJsonPath('error.code', 'event_limit_exceeded');
|
||||
}
|
||||
|
||||
public function test_update_event_accepts_live_show_settings(): void
|
||||
{
|
||||
$eventType = EventType::factory()->create();
|
||||
$event = Event::factory()->for($this->tenant)->create([
|
||||
'event_type_id' => $eventType->id,
|
||||
'name' => 'Live Show Event',
|
||||
'slug' => 'live-show-settings',
|
||||
'date' => now()->addDays(5),
|
||||
]);
|
||||
|
||||
$response = $this->authenticatedRequest('PUT', "/api/v1/tenant/events/{$event->slug}", [
|
||||
'name' => 'Live Show Event',
|
||||
'event_date' => now()->addDays(5)->toDateString(),
|
||||
'event_type_id' => $eventType->id,
|
||||
'settings' => [
|
||||
'live_show' => [
|
||||
'moderation_mode' => 'manual',
|
||||
'retention_window_hours' => 12,
|
||||
'playback_mode' => 'balanced',
|
||||
'pace_mode' => 'fixed',
|
||||
'fixed_interval_seconds' => 9,
|
||||
'layout_mode' => 'single',
|
||||
'effect_preset' => 'film_cut',
|
||||
'effect_intensity' => 60,
|
||||
'background_mode' => 'blur_last',
|
||||
],
|
||||
],
|
||||
]);
|
||||
|
||||
$response->assertOk();
|
||||
|
||||
$event->refresh();
|
||||
$settings = $event->settings;
|
||||
$this->assertSame('manual', data_get($settings, 'live_show.moderation_mode'));
|
||||
$this->assertSame(12, data_get($settings, 'live_show.retention_window_hours'));
|
||||
$this->assertSame('balanced', data_get($settings, 'live_show.playback_mode'));
|
||||
$this->assertSame('fixed', data_get($settings, 'live_show.pace_mode'));
|
||||
$this->assertSame(9, data_get($settings, 'live_show.fixed_interval_seconds'));
|
||||
$this->assertSame('single', data_get($settings, 'live_show.layout_mode'));
|
||||
$this->assertSame('film_cut', data_get($settings, 'live_show.effect_preset'));
|
||||
$this->assertSame(60, data_get($settings, 'live_show.effect_intensity'));
|
||||
$this->assertSame('blur_last', data_get($settings, 'live_show.background_mode'));
|
||||
}
|
||||
|
||||
public function test_upload_exceeds_package_limit_fails(): void
|
||||
{
|
||||
$tenant = $this->tenant;
|
||||
|
||||
Reference in New Issue
Block a user