From c44007f96a38fe508ce18f8fb35f1ee79c7f9682 Mon Sep 17 00:00:00 2001 From: Ivan Moroz Date: Fri, 29 May 2026 19:15:52 +0300 Subject: [PATCH] CONV-074: Test valid file upload flow --- .../Livewire/DashboardConverterUploadTest.php | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/Feature/Livewire/DashboardConverterUploadTest.php diff --git a/tests/Feature/Livewire/DashboardConverterUploadTest.php b/tests/Feature/Livewire/DashboardConverterUploadTest.php new file mode 100644 index 0000000..e69c1ae --- /dev/null +++ b/tests/Feature/Livewire/DashboardConverterUploadTest.php @@ -0,0 +1,24 @@ +create(); + + Livewire::actingAs($user) + ->test(DashboardConverter::class) + ->set('upload', UploadedFile::fake()->image('sample.png', 600, 400)) + ->call('storeUpload') + ->assertSet('step', 'format') + ->assertSee('sample.png') + ->assertSee('Choose output format'); + + expect(FileRecord::query()->where('original_name', 'sample.png')->exists())->toBeTrue(); +});