feat(shared-variables): display project icons in project views

Add project icon images with fallback icons and cache-busting URLs, plus coverage for both shared-variable views.
This commit is contained in:
Andras Bacsai committed 2026-08-15 23:15:31 +02:00
1 parent 96f55e3e31
commit c6a12d7078
2 files changed
+30 -2

No files matched your search

+17
View File
@@ -3,6 +3,7 @@
use App\Livewire\Dashboard;
use App\Livewire\Project\Edit;
use App\Livewire\Project\Index;
use App\Livewire\SharedVariables\Project\Index as SharedVariablesProjectIndex;
use App\Models\InstanceSettings;
use App\Models\Project;
use App\Models\Team;
@@ -113,3 +114,19 @@ it('displays the project icon on the dashboard', function () {
'v' => $this->project->updated_at->timestamp,
]).'"');
});
it('displays the project icon in shared variables project views', function () {
$this->project->forceFill([
'icon_path' => "project-icons/{$this->project->uuid}/icon.jpg",
'icon_storage_type' => 'local',
])->save();
$iconUrl = route('project.icon', [
'project_uuid' => $this->project->uuid,
'v' => $this->project->updated_at->timestamp,
]);
$component = Livewire::test(SharedVariablesProjectIndex::class);
expect(substr_count($component->html(), 'src="'.$iconUrl.'"'))->toBe(2);
});