Extend service API for Events and fix panel layout reverting during edit.
Deploy Ladill Meet / deploy (push) Successful in 48s

Service rooms support town_hall/webinar types with source lookup, update, and cancel; stage poll no longer overwrites layout while the modal is open.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-01 22:08:01 +00:00
co-authored by Cursor
parent d0b6e9ff01
commit c108514b27
8 changed files with 347 additions and 51 deletions
+67
View File
@@ -513,6 +513,73 @@ class MeetWebTest extends TestCase
->assertJsonPath('room.organization_id', $this->organization->id);
}
public function test_service_api_can_create_town_hall_room(): void
{
\Illuminate\Support\Facades\Http::fake();
config(['meet.service_api_keys.events' => 'test-events-key']);
$this->postJson('/api/service/v1/rooms', [
'owner_ref' => $this->user->public_id,
'host_user_ref' => $this->user->public_id,
'title' => 'Opening keynote',
'type' => 'town_hall',
'scheduled_at' => now()->addDay()->toIso8601String(),
'duration_minutes' => 90,
'source' => ['app' => 'events', 'entity_type' => 'virtual_session', 'entity_id' => 'vs-1'],
], ['Authorization' => 'Bearer test-events-key'])
->assertCreated()
->assertJsonPath('room.type', 'town_hall');
$this->assertDatabaseHas('meet_rooms', ['type' => 'town_hall', 'title' => 'Opening keynote']);
}
public function test_service_api_upserts_room_by_source_entity_id(): void
{
\Illuminate\Support\Facades\Http::fake();
config(['meet.service_api_keys.events' => 'test-events-key']);
$payload = [
'owner_ref' => $this->user->public_id,
'host_user_ref' => $this->user->public_id,
'title' => 'Session A',
'type' => 'webinar',
'scheduled_at' => now()->addDay()->toIso8601String(),
'source' => ['app' => 'events', 'entity_type' => 'virtual_session', 'entity_id' => 'vs-dup'],
];
$this->postJson('/api/service/v1/rooms', $payload, ['Authorization' => 'Bearer test-events-key'])
->assertCreated();
$payload['title'] = 'Session A (updated)';
$this->postJson('/api/service/v1/rooms', $payload, ['Authorization' => 'Bearer test-events-key'])
->assertOk()
->assertJsonPath('room.title', 'Session A (updated)');
$this->assertSame(1, \App\Models\Room::where('source->entity_id', 'vs-dup')->count());
}
public function test_service_api_lookup_by_source(): void
{
\Illuminate\Support\Facades\Http::fake();
config(['meet.service_api_keys.events' => 'test-events-key']);
$this->postJson('/api/service/v1/rooms', [
'owner_ref' => $this->user->public_id,
'host_user_ref' => $this->user->public_id,
'title' => 'Lookup test',
'type' => 'town_hall',
'scheduled_at' => now()->addDay()->toIso8601String(),
'source' => ['app' => 'events', 'entity_type' => 'virtual_session', 'entity_id' => 'vs-lookup'],
], ['Authorization' => 'Bearer test-events-key'])->assertCreated();
$this->getJson('/api/service/v1/rooms/by-source?source_app=events&entity_id=vs-lookup&owner_ref='.$this->user->public_id, [
'Authorization' => 'Bearer test-events-key',
])
->assertOk()
->assertJsonPath('room.title', 'Lookup test');
}
public function test_scheduled_room_syncs_to_ladill_mail_calendar(): void
{
\Illuminate\Support\Facades\Http::fake([