From 1073bbca83a6cda81f237b26ca43ef2b02c59c1d Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Tue, 18 Aug 2026 15:06:05 +0200 Subject: [PATCH] fix(sentinel): clarify restart after settings update Add a regression test for the updated success notification. --- app/Livewire/Server/Sentinel.php | 2 +- tests/Feature/Livewire/SentinelComponentTest.php | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/Livewire/Server/Sentinel.php b/app/Livewire/Server/Sentinel.php index cd05002aa..a69eb3f80 100644 --- a/app/Livewire/Server/Sentinel.php +++ b/app/Livewire/Server/Sentinel.php @@ -146,7 +146,7 @@ public function submit() { try { $this->syncData(true); - $this->dispatch('success', 'Sentinel settings updated.'); + $this->dispatch('success', 'Sentinel settings updated. Restarting Sentinel.'); } catch (\Throwable $e) { return handleError($e, $this); } diff --git a/tests/Feature/Livewire/SentinelComponentTest.php b/tests/Feature/Livewire/SentinelComponentTest.php index 41b3f2b49..01250910a 100644 --- a/tests/Feature/Livewire/SentinelComponentTest.php +++ b/tests/Feature/Livewire/SentinelComponentTest.php @@ -36,3 +36,12 @@ expect($view)->not->toContain("? 'Disabled'"); }); + +it('tells the user that saving sentinel settings initiates a restart', function () { + $componentSource = file_get_contents(app_path('Livewire/Server/Sentinel.php')); + + preg_match('/public function submit\([^)]*\).*?\{(?.*?)\n \}/s', $componentSource, $matches); + + expect($matches['body'] ?? '') + ->toContain("\$this->dispatch('success', 'Sentinel settings updated. Restarting Sentinel.');"); +});