team = Team::factory()->create(); $this->user = User::factory()->create(); $this->team->members()->attach($this->user->id, ['role' => 'owner']); $this->actingAs($this->user); session(['currentTeam' => $this->team]); }); describe('new application buildpack defaults', function () { test('github app repository flow defaults to nixpacks', function () { Livewire::test(GithubPrivateRepository::class, ['type' => 'private-gh-app']) ->assertSet('build_pack', 'nixpacks'); }); test('deploy key repository flow defaults to nixpacks', function () { Livewire::test(GithubPrivateRepositoryDeployKey::class, ['type' => 'private-deploy-key']) ->assertSet('build_pack', 'nixpacks'); }); test('public repository flow defaults to nixpacks and lists railpack second', function () { Livewire::test(PublicGitRepository::class, ['type' => 'public']) ->assertSet('build_pack', 'nixpacks'); }); test('public repository flow keeps railpack available after branch lookup', function () { Livewire::test(PublicGitRepository::class, ['type' => 'public']) ->set('branchFound', true) ->assertSeeInOrder(['Nixpacks', 'Railpack']); }); });