Add conference stage layouts for plenary and panel discussions.
Deploy Ladill Meet / deploy (push) Successful in 37s
Deploy Ladill Meet / deploy (push) Successful in 37s
Speakers get a full-screen spotlight with overlapping audience avatars; hosts can configure panels in the green room and switch layouts live. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -772,6 +772,138 @@ class MeetWebTest extends TestCase
|
||||
]);
|
||||
}
|
||||
|
||||
public function test_host_can_update_conference_stage_layout(): void
|
||||
{
|
||||
$room = Room::create([
|
||||
'owner_ref' => $this->user->public_id,
|
||||
'organization_id' => $this->organization->id,
|
||||
'host_user_ref' => $this->user->public_id,
|
||||
'title' => 'NextGen Summit',
|
||||
'type' => 'town_hall',
|
||||
'status' => 'live',
|
||||
'scheduled_at' => now()->addHour(),
|
||||
'timezone' => 'UTC',
|
||||
'settings' => array_merge(config('meet.default_settings'), [
|
||||
'panel_discussions' => true,
|
||||
'stage_layout' => 'plenary',
|
||||
'panels' => [],
|
||||
]),
|
||||
]);
|
||||
|
||||
$session = Session::create([
|
||||
'owner_ref' => $this->user->public_id,
|
||||
'room_id' => $room->id,
|
||||
'media_room_name' => 'meet-'.$room->uuid,
|
||||
'status' => 'live',
|
||||
'session_mode' => 'green_room',
|
||||
'started_at' => now(),
|
||||
]);
|
||||
|
||||
$participant = \App\Models\Participant::create([
|
||||
'owner_ref' => $this->user->public_id,
|
||||
'session_id' => $session->id,
|
||||
'user_ref' => $this->user->public_id,
|
||||
'display_name' => $this->user->name,
|
||||
'role' => 'host',
|
||||
'status' => 'joined',
|
||||
'joined_at' => now(),
|
||||
]);
|
||||
|
||||
$this->actingAs($this->user)
|
||||
->withSession(["meet.participant.{$session->uuid}" => $participant->uuid])
|
||||
->postJson('/room/'.$session->uuid.'/stage', [
|
||||
'stage_layout' => 'panel',
|
||||
'panels' => [
|
||||
['name' => 'Opening panel', 'speaker_refs' => [$this->user->public_id]],
|
||||
],
|
||||
'active_panel_id' => null,
|
||||
])
|
||||
->assertOk()
|
||||
->assertJson([
|
||||
'stage_layout' => 'panel',
|
||||
'panel_discussions' => true,
|
||||
]);
|
||||
|
||||
$room->refresh();
|
||||
$this->assertSame('panel', $room->setting('stage_layout'));
|
||||
$this->assertCount(1, $room->setting('panels'));
|
||||
}
|
||||
|
||||
public function test_poll_includes_stage_config_for_conference(): void
|
||||
{
|
||||
$room = Room::create([
|
||||
'owner_ref' => $this->user->public_id,
|
||||
'organization_id' => $this->organization->id,
|
||||
'host_user_ref' => $this->user->public_id,
|
||||
'title' => 'NextGen Summit',
|
||||
'type' => 'town_hall',
|
||||
'status' => 'live',
|
||||
'scheduled_at' => now()->addHour(),
|
||||
'timezone' => 'UTC',
|
||||
'settings' => array_merge(config('meet.default_settings'), [
|
||||
'panel_discussions' => true,
|
||||
'stage_layout' => 'plenary',
|
||||
]),
|
||||
]);
|
||||
|
||||
$session = Session::create([
|
||||
'owner_ref' => $this->user->public_id,
|
||||
'room_id' => $room->id,
|
||||
'media_room_name' => 'meet-'.$room->uuid,
|
||||
'status' => 'live',
|
||||
'session_mode' => 'live',
|
||||
'started_at' => now(),
|
||||
]);
|
||||
|
||||
$participant = \App\Models\Participant::create([
|
||||
'owner_ref' => $this->user->public_id,
|
||||
'session_id' => $session->id,
|
||||
'user_ref' => $this->user->public_id,
|
||||
'display_name' => $this->user->name,
|
||||
'role' => 'host',
|
||||
'status' => 'joined',
|
||||
'joined_at' => now(),
|
||||
]);
|
||||
|
||||
$this->withSession(["meet.participant.{$session->uuid}" => $participant->uuid])
|
||||
->getJson('/room/'.$session->uuid.'/poll')
|
||||
->assertOk()
|
||||
->assertJson([
|
||||
'uses_stage_layout' => true,
|
||||
'stage_layout' => 'plenary',
|
||||
'panel_discussions' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
public function test_regular_meeting_rejects_stage_update(): void
|
||||
{
|
||||
$room = $this->createRoom();
|
||||
$session = Session::create([
|
||||
'owner_ref' => $this->user->public_id,
|
||||
'room_id' => $room->id,
|
||||
'media_room_name' => 'meet-'.$room->uuid,
|
||||
'status' => 'live',
|
||||
'started_at' => now(),
|
||||
]);
|
||||
|
||||
$participant = \App\Models\Participant::create([
|
||||
'owner_ref' => $this->user->public_id,
|
||||
'session_id' => $session->id,
|
||||
'user_ref' => $this->user->public_id,
|
||||
'display_name' => $this->user->name,
|
||||
'role' => 'host',
|
||||
'status' => 'joined',
|
||||
'joined_at' => now(),
|
||||
]);
|
||||
|
||||
$this->actingAs($this->user)
|
||||
->withSession(["meet.participant.{$session->uuid}" => $participant->uuid])
|
||||
->postJson('/room/'.$session->uuid.'/stage', [
|
||||
'stage_layout' => 'panel',
|
||||
])
|
||||
->assertStatus(422);
|
||||
}
|
||||
|
||||
public function test_host_can_create_space_room(): void
|
||||
{
|
||||
$this->actingAs($this->user)
|
||||
|
||||
Reference in New Issue
Block a user