Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions resources/views/livewire/recent-conversions-table.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
<thead>
<tr class="border-b border-[var(--ca-border)] bg-[var(--ca-surface-muted)]/40">
<th class="px-4 py-3 text-left font-medium text-[var(--ca-muted)]">File Name</th>
<th class="px-4 py-3 text-left font-medium text-[var(--ca-muted)]">From</th>
<th class="px-4 py-3 text-left font-medium text-[var(--ca-muted)]">To</th>
</tr>
</thead>
<tbody class="divide-y divide-[var(--ca-border)]">
Expand All @@ -21,6 +23,12 @@
<td class="px-4 py-3 text-[var(--ca-text)]">
{{ $job->sourceFile?->original_name ?? '—' }}
</td>
<td class="px-4 py-3 text-[var(--ca-text)]">
{{ $job->source_format ? strtoupper($job->source_format) : '—' }}
</td>
<td class="px-4 py-3 text-[var(--ca-text)]">
{{ $job->target_format ? strtoupper($job->target_format) : '—' }}
</td>
</tr>
@endforeach
</tbody>
Expand Down
15 changes: 15 additions & 0 deletions tests/Feature/Livewire/RecentConversionsTableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,21 @@
->assertSee('Upload a file to start converting');
});

it('renders source and target formats in recent conversions table', function () {
$user = User::factory()->create();

ConversionJob::factory()->for($user)->create([
'source_format' => 'png',
'target_format' => 'jpg',
]);

$this->actingAs($user);

Livewire::test(RecentConversionsTable::class)
->assertSee('PNG')
->assertSee('JPG');
});

it('renders source file name in recent conversions table', function () {
$user = User::factory()->create();

Expand Down