mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-20 18:23:40 +00:00
fix(ui): show loading state on compose validate button
Disable the Validate control and show a spinner until validateCompose finishes, then clear state via compose-validate-finished.
This commit is contained in:
@@ -13,6 +13,10 @@ it('uses the large modal treatment for the compose editor', function () {
|
||||
->toContain("\$dispatch('compose-preview-toggle')")
|
||||
->toContain("\$dispatch('compose-save')")
|
||||
->toContain('@compose-save-finished.window="saving = false"')
|
||||
->toContain('@compose-validate-finished.window="validating = false"')
|
||||
->toContain('@click="validating = true; $dispatch(\'compose-validate\')"')
|
||||
->toContain('x-bind:disabled="validating"')
|
||||
->toContain('<x-loading-on-button x-show="validating" x-cloak />')
|
||||
->toContain('<x-loading-on-button x-show="saving" x-cloak />')
|
||||
->toContain('x-bind:disabled="saving"')
|
||||
->not->toContain('name="refresh"')
|
||||
@@ -36,6 +40,7 @@ it('renders the compose editor with clear guidance settings and actions', functi
|
||||
->toContain('min-h-[24rem]')
|
||||
->toContain('@compose-preview-toggle.window')
|
||||
->toContain('@compose-save.window')
|
||||
->toContain('@compose-validate.window="$wire.validateCompose().finally(() => $dispatch(\'compose-validate-finished\'))"')
|
||||
->not->toContain("finally(() => \$dispatch('compose-save-finished'))")
|
||||
->not->toContain('sticky bottom-0')
|
||||
->not->toContain('Cancel')
|
||||
|
||||
Reference in New Issue
Block a user