updated table structure for photobooth/sparkbooth settings. now there's a separate table for it. update all references and tests. also fixed the notification panel and the lightbox in the guest app.

This commit is contained in:
Codex Agent
2025-12-18 08:49:56 +01:00
parent ece38fc009
commit 1c4acda332
30 changed files with 734 additions and 538 deletions

View File

@@ -3,6 +3,7 @@
namespace Tests\Feature\Console;
use App\Models\Event;
use App\Models\EventPhotoboothSetting;
use App\Models\PhotoboothSetting;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Http;
@@ -23,15 +24,18 @@ class PhotoboothCleanupCommandTest extends TestCase
'control_service_base_url' => 'https://control.test',
]);
$event = Event::factory()->create([
'photobooth_enabled' => true,
'photobooth_username' => 'pbcleanup',
'photobooth_status' => 'active',
'photobooth_path' => '/photobooth/demo',
'photobooth_expires_at' => now()->subDay(),
]);
$event->photobooth_password = 'CLEANUP';
$event->save();
$event = Event::factory()->create();
$setting = EventPhotoboothSetting::factory()
->for($event)
->create([
'enabled' => true,
'mode' => 'ftp',
'username' => 'pbcleanup',
'password' => 'CLEANUP',
'status' => 'active',
'path' => '/photobooth/demo',
'expires_at' => now()->subDay(),
]);
Http::fake([
'https://control.test/*' => Http::response(['ok' => true], 200),
@@ -40,11 +44,11 @@ class PhotoboothCleanupCommandTest extends TestCase
$this->artisan('photobooth:cleanup-expired')
->assertExitCode(0);
$event->refresh();
$setting->refresh();
$this->assertFalse($event->photobooth_enabled);
$this->assertNull($event->photobooth_username);
$this->assertNotNull($event->photobooth_last_deprovisioned_at);
$this->assertFalse($setting->enabled);
$this->assertNull($setting->username);
$this->assertNotNull($setting->last_deprovisioned_at);
Http::assertSent(fn ($request) => $request->url() === 'https://control.test/users/pbcleanup');
}