diff --git a/resources/views/livewire/dashboard/dashboard-converter.blade.php b/resources/views/livewire/dashboard/dashboard-converter.blade.php index fee5cf2..ec566e3 100644 --- a/resources/views/livewire/dashboard/dashboard-converter.blade.php +++ b/resources/views/livewire/dashboard/dashboard-converter.blade.php @@ -66,6 +66,15 @@ class="flex flex-col items-center justify-center gap-4 rounded-[var(--ca-radius- + @if (empty($this->targetFormatCards)) +
+

No conversion targets available

+

We cannot convert this file type yet. Upload another file or check supported formats later.

+
+ Upload another file +
+
+ @else

Convert {{ strtoupper($file->extension) }} to

@@ -88,6 +97,7 @@ class="flex items-start gap-3 rounded-[var(--ca-radius-md)] border border-[var(- @endforeach
+ @endif @endif diff --git a/tests/Feature/Livewire/DashboardConverterTest.php b/tests/Feature/Livewire/DashboardConverterTest.php index 4345e83..4b7369e 100644 --- a/tests/Feature/Livewire/DashboardConverterTest.php +++ b/tests/Feature/Livewire/DashboardConverterTest.php @@ -123,3 +123,17 @@ ->call('goToFormatStep') ->assertSee('Recommended'); }); + +it('shows an empty state when the source format has no available targets', function () { + $user = User::factory()->create(); + $file = FileRecord::factory()->for($user)->create(['extension' => 'pdf']); + + Livewire::actingAs($user) + ->test(DashboardConverter::class) + ->set('currentFileId', $file->id) + ->call('goToFormatStep') + ->assertSet('step', 'format') + ->assertSee('No conversion targets available') + ->assertSee('Upload another file') + ->assertDontSee('Convert PDF to'); +});