mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-14 00:33:44 -04:00
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Furox <177975472+Furox-Art@users.noreply.github.com> Co-authored-by: johandenhollander <johan.den.hollander@finalist.nl> Co-authored-by: João Cruz <161638790+SrJooJ@users.noreply.github.com> Co-authored-by: Saim Hashmi <hashmisaim037@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
38 lines
1.4 KiB
PHP
38 lines
1.4 KiB
PHP
<?php
|
|
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use Illuminate\Support\Facades\Cache;
|
|
|
|
uses(RefreshDatabase::class);
|
|
|
|
it('keeps the update badge inside the sidebar brand area', function (string $version) {
|
|
config()->set('constants.coolify.version', $version);
|
|
seedBrowserResourceStack(['instanceSettings' => ['new_version_available' => true]]);
|
|
Cache::put('coolify:versions:all', ['coolify' => ['v4' => ['version' => '9.9.9']]], 3600);
|
|
|
|
$page = visit('/login')
|
|
->fill('email', 'test@example.com')
|
|
->fill('password', 'password')
|
|
->click('Login')
|
|
->assertSee('Dashboard')
|
|
->assertVisible('header button[aria-label="Update available"]');
|
|
|
|
$layout = $page->script(<<<'JS'
|
|
() => {
|
|
const badge = document.querySelector('header button[aria-label="Update available"]');
|
|
const brand = badge.closest('header > div');
|
|
|
|
return {
|
|
badgeRight: badge.getBoundingClientRect().right,
|
|
brandRight: brand.getBoundingClientRect().right,
|
|
brandOverflows: brand.scrollWidth > brand.clientWidth,
|
|
};
|
|
}
|
|
JS);
|
|
|
|
$page->screenshot(filename: 'upgrade-badge-layout');
|
|
|
|
expect($layout['brandOverflows'])->toBeFalse()
|
|
->and($layout['badgeRight'])->toBeLessThanOrEqual($layout['brandRight']);
|
|
})->with(['4.3.19', '4.0.0-beta.470']);
|