mirror of
https://github.com/coollabsio/coolify.git
synced 2026-08-24 10:05:47 -05:00
Add manual fix-release validation and stable image rebuilds, inject traceable development versions into SHA builds, and suppress invalid release links for development versions.
31 lines
1.1 KiB
PHP
31 lines
1.1 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Blade;
|
|
|
|
/**
|
|
* Header version badge should open the matching GitHub release page.
|
|
*/
|
|
test('desktop header version links to the coolify github release for the installed version', function () {
|
|
$layout = file_get_contents(resource_path('views/layouts/app.blade.php'));
|
|
$version = file_get_contents(resource_path('views/components/version.blade.php'));
|
|
|
|
expect($layout)
|
|
->toContain('<x-version')
|
|
->not->toContain("class=\"text-[10.5px] font-medium text-neutral-400 dark:text-fg-faint\">v{{ config('constants.coolify.version') }}</span>");
|
|
|
|
expect($version)
|
|
->toContain("https://github.com/coollabsio/coolify/releases/tag/v{{ config('constants.coolify.version') }}")
|
|
->toContain('target="_blank"');
|
|
});
|
|
|
|
test('development versions are not linked to nonexistent github releases', function () {
|
|
config(['constants.coolify.version' => '4.3.1-dev.d64cbda3e']);
|
|
|
|
$version = Blade::render('<x-version />');
|
|
|
|
expect($version)
|
|
->toContain('v4.3.1-dev.d64cbda3e')
|
|
->not->toContain('href=')
|
|
->not->toContain('target="_blank"');
|
|
});
|