'file']); InstanceSettings::forceCreate(['id' => 0]); $this->team = Team::factory()->create(); $this->user = User::factory()->create(); $this->user->teams()->attach($this->team, ['role' => 'owner']); $this->actingAs($this->user); session(['currentTeam' => $this->team]); }); it('renders frontend-only application backup search data for volume names and frequencies', function () { $application = createBackupSearchApplication($this->team); $dailyVolume = createBackupSearchVolume($application, 'app-data'); $weeklyVolume = createBackupSearchVolume($application, 'Cache-Data'); $dailyVolume->scheduledBackups()->create([ 'team_id' => $this->team->id, 'frequency' => 'daily', ]); $weeklyVolume->scheduledBackups()->create([ 'team_id' => $this->team->id, 'frequency' => '0 4 * * 0', ]); $parameters = [ 'project_uuid' => $application->project()->uuid, 'environment_uuid' => $application->environment->uuid, 'application_uuid' => $application->uuid, ]; $this->get(route('project.application.backup.index', [...$parameters, 'search' => 'cache'])) ->assertOk() ->assertSee('Cache-Data') ->assertSee('Volume: app-data') ->assertSee("search: 'cache'", false) ->assertSee('x-model="search"', false) ->assertSee('x-show=', false) ->assertSee('No scheduled backups match your search.'); }); it('renders frontend-only database backup search data for database names and frequencies', function () { $server = Server::factory()->create(['team_id' => $this->team->id]); $destination = StandaloneDocker::where('server_id', $server->id)->firstOrFail(); $project = Project::factory()->create(['team_id' => $this->team->id]); $environment = Environment::factory()->create(['project_id' => $project->id]); $database = StandalonePostgresql::create([ 'name' => 'Orders-Primary', 'image' => 'postgres:16-alpine', 'postgres_user' => 'postgres', 'postgres_password' => 'password', 'postgres_db' => 'postgres', 'environment_id' => $environment->id, 'destination_id' => $destination->id, 'destination_type' => $destination->getMorphClass(), ]); $storage = S3Storage::create([ 'name' => 'Archive-Bucket', 'region' => 'us-east-1', 'key' => 'test-key', 'secret' => 'test-secret', 'bucket' => 'test-bucket', 'endpoint' => 'https://s3.example.com', 'is_usable' => true, 'team_id' => $this->team->id, ]); $database->scheduledBackups()->create([ 'team_id' => $this->team->id, 'frequency' => 'daily', 'save_s3' => true, 's3_storage_id' => $storage->id, ]); $database->scheduledBackups()->create([ 'team_id' => $this->team->id, 'frequency' => '0 3 * * 1', ]); $parameters = [ 'project_uuid' => $project->uuid, 'environment_uuid' => $environment->uuid, 'database_uuid' => $database->uuid, ]; $this->get(route('project.database.backup.index', [...$parameters, 'search' => '0 3'])) ->assertOk() ->assertSee('