mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-05 10:23:23 +00:00
fix(env-vars): treat search wildcards literally
Escape SQL LIKE wildcard characters in environment variable searches and hide production or preview sections when the filtered results are empty.
This commit is contained in:
@@ -45,3 +45,12 @@ it('renders a single no results message for empty environment variable searches'
|
||||
->toContain('<div>No environment variables found.</div>')
|
||||
->toContain('@else');
|
||||
});
|
||||
|
||||
it('only renders the production section when production variables are visible', function () {
|
||||
$view = file_get_contents(resource_path('views/livewire/project/shared/environment-variable/all.blade.php'));
|
||||
|
||||
expect($view)
|
||||
->toContain('@if ($this->environmentVariables->isNotEmpty() || $this->hardcodedEnvironmentVariables->isNotEmpty())')
|
||||
->not->toContain('@forelse ($this->environmentVariables as $env)')
|
||||
->not->toContain('@empty');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user