'file']); Server::flushIdentityMap(); InstanceSettings::unguarded(fn () => InstanceSettings::firstOrCreate(['id' => 0])); $team = Team::factory()->create(); $user = User::factory()->create(); $user->teams()->attach($team, ['role' => 'owner']); $server = Server::factory()->create(['team_id' => $team->id]); $server->settings->update(['server_timezone' => 'Europe/Budapest']); $destination = StandaloneDocker::where('server_id', $server->id)->firstOrFail(); $project = Project::factory()->create(['team_id' => $team->id]); $environment = Environment::factory()->create(['project_id' => $project->id]); $this->service = Service::factory()->create([ 'server_id' => $server->id, 'destination_id' => $destination->id, 'destination_type' => $destination->getMorphClass(), 'environment_id' => $environment->id, ]); $database = ServiceDatabase::create([ 'service_id' => $this->service->id, 'name' => 'timestamps-db', 'image' => 'postgres:16-alpine', 'custom_type' => 'postgresql', ]); $this->backup = ScheduledDatabaseBackup::create([ 'team_id' => $team->id, 'frequency' => '0 0 * * *', 'database_id' => $database->id, 'database_type' => $database->getMorphClass(), ]); $this->travelTo(Carbon::parse('2026-10-16 14:00:00', 'UTC')); ScheduledDatabaseBackupExecution::create([ 'scheduled_database_backup_id' => $this->backup->id, 'status' => 'success', 'filename' => '/data/coolify/backups/timestamps.dmp', 'finished_at' => Carbon::parse('2026-10-16 14:30:05', 'UTC'), ]); $this->travelTo(Carbon::parse('2026-10-16 18:00:00', 'UTC')); $this->actingAs($user); session(['currentTeam' => $team]); }); it('shows the exact finish time of database backup executions in the server timezone', function () { Livewire::test(DatabaseBackupExecutions::class, ['backup' => $this->backup]) ->call('refreshBackupExecutions') ->assertSee('2026-10-16 16:30:05 CEST') ->assertSee('Started: 2026-10-16 16:00:00 CEST', false) ->assertSee('3 hours ago'); }); it('shows the exact start time of service backup executions in the server timezone', function () { Livewire::test(ServiceBackupExecutions::class, ['service' => $this->service]) ->assertSee('2026-10-16 16:00:00 CEST') ->assertSee('4 hours ago'); });