mirror of
https://github.com/coollabsio/coolify.git
synced 2026-10-28 09:34:36 +08:00
fix(sentinel): clarify restart after settings update
Add a regression test for the updated success notification.
This commit is contained in:
1 parent
ee843b7230
commit
1073bbca83
2 files changed
+10
-1
No files matched your search
@@ -146,7 +146,7 @@ class Sentinel extends Component
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -36,3 +36,12 @@ it('does not repeat a disabled status badge in the sentinel empty state', functi
|
||||
|
||||
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\([^)]*\).*?\{(?<body>.*?)\n \}/s', $componentSource, $matches);
|
||||
|
||||
expect($matches['body'] ?? '')
|
||||
->toContain("\$this->dispatch('success', 'Sentinel settings updated. Restarting Sentinel.');");
|
||||
});
|
||||
Reference in new issue
Block a user