mirror of
https://github.com/coollabsio/coolify.git
synced 2026-09-28 02:06:37 -04:00
feat(previews): move pull request settings into a modal
Add pull request loading, refreshing, and deployment controls to the preview settings modal, simplify modal subtitles, and update sponsor listings.
This commit is contained in:
@@ -117,6 +117,21 @@ it('renders preview deployment enablement as a section action', function () {
|
||||
expect($this->application->fresh()->settings->is_preview_deployments_enabled)->toBeTrue();
|
||||
});
|
||||
|
||||
it('renders GitHub pull requests in a modal opened from the preview settings', function () {
|
||||
$view = file_get_contents(resource_path('views/livewire/project/application/previews.blade.php'));
|
||||
$sidebar = file_get_contents(resource_path('views/components/application/configuration-sidebar.blade.php'));
|
||||
|
||||
expect($view)
|
||||
->toContain('<x-modal-input title="Pull requests"')
|
||||
->toContain(':isLarge="true"')
|
||||
->toContain('wire:click="load_prs"')
|
||||
->not->toContain('id="preview-pull-requests-section"')
|
||||
->and(strpos($view, '<x-modal-input title="Pull requests"'))
|
||||
->toBeLessThan(strpos($view, '<livewire:project.application.preview.form'));
|
||||
|
||||
expect($sidebar)->not->toContain("['id' => 'preview-pull-requests-section', 'label' => 'Pull requests']");
|
||||
});
|
||||
|
||||
it('does not show git preview settings for non-git applications', function (string $buildPack, ?string $dockerfile) {
|
||||
$this->application->update(['build_pack' => $buildPack, 'dockerfile' => $dockerfile]);
|
||||
|
||||
|
||||
@@ -17,6 +17,16 @@ test('input modal overlay is fixed to the viewport without its own page scrollba
|
||||
->not->toContain('class="fixed inset-0 z-99 overflow-y-auto"');
|
||||
});
|
||||
|
||||
test('input modal renders its subtitle as static text instead of a tooltip', function () {
|
||||
$html = Blade::render('<x-modal-input title="Pull requests" subtitle="Load repository pull requests.">Modal content</x-modal-input>');
|
||||
|
||||
expect($html)
|
||||
->toContain('Load repository pull requests.')
|
||||
->toContain('text-xs text-neutral-500 dark:text-fg-dim')
|
||||
->not->toContain('More information about Pull requests')
|
||||
->not->toContain('role="tooltip"');
|
||||
});
|
||||
|
||||
test('confirmation modal closes before dispatching an event that can open another modal', function () {
|
||||
$modal = file_get_contents(resource_path('views/components/modal-confirmation.blade.php'));
|
||||
|
||||
|
||||
@@ -441,14 +441,14 @@ it('centers the rollback image loading state across the card', function () {
|
||||
->toContain('flex items-center justify-center');
|
||||
});
|
||||
|
||||
it('shows pull request loading feedback only on the action button', function () {
|
||||
it('shows pull request loading feedback in the modal body', function () {
|
||||
$previews = file_get_contents(resource_path('views/livewire/project/application/previews.blade.php'));
|
||||
|
||||
expect($previews)
|
||||
->toContain('wire:click="load_prs"')
|
||||
->not->toContain('wire:loading.remove wire:target="load_prs"')
|
||||
->not->toContain('wire:loading wire:target="load_prs"')
|
||||
->not->toContain('Loading pull requests…');
|
||||
->toContain('wire:loading.remove wire:target="load_prs"')
|
||||
->toContain('wire:loading wire:target="load_prs"')
|
||||
->toContain('Loading pull requests…');
|
||||
});
|
||||
|
||||
it('shows loading feedback while a service deployment starts', function () {
|
||||
|
||||
Reference in New Issue
Block a user