fix(applications): refresh pending configuration changes

Dispatch configuration change events after saving application source and advanced settings, and refresh the configuration checker before showing redeploy diffs.
This commit is contained in:
Andras Bacsai committed 2026-05-13 10:04:17 +02:00
1 parent f8849aba73
commit 0ecd488d6a
7 files changed
+95 -6

No files matched your search

@@ -48,6 +48,16 @@ it('saves a valid stop grace period', function () {
expect($application->settings()->first()->stop_grace_period)->toBe(300);
});
it('dispatches configuration changed when advanced settings are saved', function () {
$application = createApplicationForAdvancedStopGracePeriodTest();
Livewire::test(Advanced::class, ['application' => $application])
->set('includeSourceCommitInBuild', true)
->call('submit')
->assertHasNoErrors()
->assertDispatched('configurationChanged');
});
it('clears the stop grace period when submitted empty', function () {
$application = createApplicationForAdvancedStopGracePeriodTest();
$application->settings->update(['stop_grace_period' => 300]);