mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-15 20:15:45 +00:00
feat(domains): add inline indexing and redirect controls
Move domain indexing and redirect settings into domain management views and include noindex changes in deployment configuration diffs.
This commit is contained in:
1 parent
8c9a7413d0
commit
69ba001e21
22 files changed
+327
-185
No files matched your search
@@ -271,6 +271,8 @@ it('updates a domain in place via modal', function () {
|
||||
->call('startEdit', 0)
|
||||
->assertSet('showEditDomainModal', true)
|
||||
->assertSet('editingDomain', 'https://old.example.com')
|
||||
->assertSee('Direction')
|
||||
->assertSee('Search engine indexing')
|
||||
->set('editingDomain', 'https://new.example.com')
|
||||
->call('updateDomain')
|
||||
->assertHasNoErrors()
|
||||
@@ -375,7 +377,8 @@ it('auto-adds missing www counterpart as a normal domain when setting www redire
|
||||
->assertSet('domainRows.0.is_suggested', false)
|
||||
->assertSet('domainRows.1.is_suggested', false)
|
||||
->assertSet('domainRows.0.url', 'https://example.com')
|
||||
->assertSet('domainRows.1.url', 'https://www.example.com');
|
||||
->assertSet('domainRows.1.url', 'https://www.example.com')
|
||||
->assertSet('domainRows.1.checked_at', fn (?string $checkedAt): bool => filled($checkedAt));
|
||||
|
||||
$this->application->refresh();
|
||||
|
||||
@@ -1216,9 +1219,8 @@ it('uses the compact service domains layout for compose applications', function
|
||||
expect($view)
|
||||
->toContain('application-compose-domain-group-{{ $redirectWireKey }}')
|
||||
->toContain('class="application-settings-section-body mt-1 scroll-mt-28')
|
||||
->toContain('aria-label="Redirect direction for {{ $serviceName }}"')
|
||||
->toContain('wire:target="serviceRedirects.{{ $redirectWireKey }}"')
|
||||
->not->toContain('wire:target="serviceRedirects.{{ $redirectWireKey }},setServiceRedirect"')
|
||||
->toContain('htmlId="application-compose-domain-redirect-{{ $redirectWireKey }}"')
|
||||
->not->toContain('aria-label="Redirect direction for {{ $serviceName }}"')
|
||||
->not->toContain('title="No domains for this service"');
|
||||
});
|
||||
|
||||
@@ -1227,6 +1229,8 @@ it('provides client-side search for compose service domains', function () {
|
||||
|
||||
expect($view)
|
||||
->toContain('x-model="domainSearch"')
|
||||
->toContain('class="ml-auto flex flex-wrap items-center gap-2"')
|
||||
->toContain('<div class="relative shrink-0">')
|
||||
->toContain('placeholder="Search services or domains"')
|
||||
->toContain('x-show="matchesDomainSearch(')
|
||||
->toContain('title="No domains found"')
|
||||
@@ -1326,3 +1330,20 @@ it('uses compose service redirect for suggested domain messaging when direction
|
||||
->and($suggested['suggestion_role'] ?? null)->toBe('pair')
|
||||
->and($suggested['url'] ?? null)->toBe('https://www.web.example.com');
|
||||
});
|
||||
|
||||
it('updates search engine indexing from the domains view', function () {
|
||||
$this->application->update(['fqdn' => 'https://app.example.com,https://staging.example.com']);
|
||||
|
||||
Livewire::test(Domains::class, ['application' => $this->application->fresh()])
|
||||
->assertSee('Noindex')
|
||||
->assertSee('Indexable')
|
||||
->assertSee('x-model="localIndexing"', false)
|
||||
->assertDontSee('@change="$wire.toggleNoindexDomain', false)
|
||||
->assertDontSee('@js(', false)
|
||||
->call('toggleNoindexDomain', 'https://staging.example.com', 'noindex')
|
||||
->assertDispatched('configurationChanged')
|
||||
->assertDispatched('success');
|
||||
|
||||
expect($this->application->refresh()->noindexDomains()->all())
|
||||
->toBe(['https://staging.example.com']);
|
||||
});
|
||||
Reference in new issue
Block a user