mirror of
https://github.com/tiennm99/coolify.git
synced 2026-07-25 14:22:51 +00:00
fix(env-vars): show single empty state for searches
Move the environment variable search field above the production section and hide production and preview headings when a search has no results.
This commit is contained in:
@@ -29,3 +29,19 @@ it('uses sans font for the developer bulk environment variable editor', function
|
||||
->not->toContain('wire:model="variables" monospace')
|
||||
->not->toContain('wire:model="variablesPreview" monospace');
|
||||
});
|
||||
|
||||
it('renders the environment variable search field above the production title', function () {
|
||||
$view = file_get_contents(resource_path('views/livewire/project/shared/environment-variable/all.blade.php'));
|
||||
|
||||
expect(strpos($view, 'aria-label="Search environment variables"'))
|
||||
->toBeLessThan(strpos($view, '<h3>Production Environment Variables</h3>'));
|
||||
});
|
||||
|
||||
it('renders a single no results message for empty environment variable searches', function () {
|
||||
$view = file_get_contents(resource_path('views/livewire/project/shared/environment-variable/all.blade.php'));
|
||||
|
||||
expect($view)
|
||||
->toContain('@if ($this->isSearchActive && ! $this->hasEnvironmentVariables)')
|
||||
->toContain('<div>No environment variables found.</div>')
|
||||
->toContain('@else');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user