2026-08-03 21:11:54 +00:00
|
|
|
<?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)
|
2026-08-05 14:24:31 +00:00
|
|
|
->toContain('<x-settings.layout>')
|
2026-08-03 21:11:54 +00:00
|
|
|
->toContain('settings-section title="Scheduler activity"')
|
|
|
|
|
->toContain('wire:click="refresh"')
|
2026-08-05 14:24:31 +00:00
|
|
|
->not->toContain('<x-settings.navbar');
|
2026-08-03 21:11:54 +00:00
|
|
|
|
|
|
|
|
// 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);
|
|
|
|
|
});
|