+ @if ($application->build_pack === 'nixpacks')
+
+ {{ config('deprecations.nixpacks') }}
+
+ Switch to Railpack in General settings.
+
+
+ @endif
+
- @if ($application->build_pack === 'nixpacks' && $activeRouteName !== 'project.application.configuration')
-
- {{ config('deprecations.nixpacks') }}
-
- Switch to Railpack in General settings.
-
-
- @endif
-
{{-- Desktop actions live in the fixed top bar so they cannot overlap page content. --}}
@teleport('#resource-action-hud-slot')
diff --git a/tests/Feature/NixpacksDeprecationTest.php b/tests/Feature/NixpacksDeprecationTest.php
index ba468ffd4f..15245bd7b2 100644
--- a/tests/Feature/NixpacksDeprecationTest.php
+++ b/tests/Feature/NixpacksDeprecationTest.php
@@ -48,30 +48,7 @@ uZx9iFkCELtxrh31QJ68AAAAEXNhaWxANzZmZjY2ZDJlMmRkAQIDBA==
?? StandaloneDocker::factory()->create(['server_id' => $this->server->id, 'network' => 'coolify-test']);
});
-test('the application page shows the nixpacks deprecation notice only for nixpacks', function (string $buildPack, bool $showsNotice) {
- $application = Application::factory()->create([
- 'environment_id' => $this->environment->id,
- 'destination_id' => $this->destination->id,
- 'destination_type' => StandaloneDocker::class,
- 'build_pack' => $buildPack,
- 'static_image' => 'nginx:alpine',
- 'base_directory' => '/',
- 'ports_exposes' => '3000',
- 'is_http_basic_auth_enabled' => false,
- 'redirect' => 'no',
- ]);
-
- $component = Livewire::test(General::class, ['application' => $application])->assertSuccessful();
-
- $showsNotice
- ? $component->assertSee(config('deprecations.nixpacks'))
- : $component->assertDontSee(config('deprecations.nixpacks'));
-})->with([
- 'nixpacks' => ['nixpacks', true],
- 'railpack' => ['railpack', false],
-]);
-
-test('switching the build pack to railpack hides the nixpacks deprecation notice', function () {
+test('the general page does not repeat the nixpacks deprecation notice from the heading', function () {
$application = Application::factory()->create([
'environment_id' => $this->environment->id,
'destination_id' => $this->destination->id,
@@ -85,11 +62,26 @@ test('switching the build pack to railpack hides the nixpacks deprecation notice
]);
Livewire::test(General::class, ['application' => $application])
- ->assertSee(config('deprecations.nixpacks'))
- ->set('buildPack', 'railpack')
+ ->assertSuccessful()
->assertDontSee(config('deprecations.nixpacks'));
});
+test('switching the build pack to railpack hides the nixpacks deprecation notice in the heading', function () {
+ $application = Application::factory()->create([
+ 'environment_id' => $this->environment->id,
+ 'destination_id' => $this->destination->id,
+ 'destination_type' => StandaloneDocker::class,
+ 'build_pack' => 'nixpacks',
+ ]);
+
+ $component = Livewire::test(Heading::class, ['application' => $application])
+ ->assertSee(config('deprecations.nixpacks'));
+
+ $application->update(['build_pack' => 'railpack']);
+
+ $component->call('$refresh')->assertDontSee(config('deprecations.nixpacks'));
+});
+
test('the application heading shows the nixpacks deprecation notice only for nixpacks', function (string $buildPack, bool $showsNotice) {
$application = Application::factory()->create([
'environment_id' => $this->environment->id,