coolify/tests/Feature/SettingsScheduledJobsRefreshPlacementTest.php
Andras Bacsai 8ae56587d5
feat(ui): Shadow UI redesign, domain management, and DNS autoconfigure (#11119)
Co-authored-by: ShadowArcanist <162910371+ShadowArcanist@users.noreply.github.com>
2026-08-03 23:11:54 +02:00

20 lines
873 B
PHP

<?php
test('scheduled jobs refresh control lives on the activity section not the navbar', function () {
$view = file_get_contents(resource_path('views/livewire/settings/scheduled-jobs.blade.php'));
expect($view)
->toContain('<x-settings.navbar />')
->toContain('settings-section title="Scheduler activity"')
->toContain('wire:click="refresh"')
// Self-closing navbar means Refresh is not passed as a tab-bar action.
->not->toContain('<x-settings.navbar>');
// Refresh should appear after the activity section opens, not before.
$activityPos = strpos($view, 'settings-section title="Scheduler activity"');
$refreshPos = strpos($view, 'wire:click="refresh"');
expect($activityPos)->not->toBeFalse()
->and($refreshPos)->not->toBeFalse()
->and($refreshPos)->toBeGreaterThan($activityPos);
});