diff --git a/tests/Feature/Recordings/IndexTest.php b/tests/Feature/Recordings/IndexTest.php index f7421e3..fed23ae 100644 --- a/tests/Feature/Recordings/IndexTest.php +++ b/tests/Feature/Recordings/IndexTest.php @@ -6,6 +6,7 @@ use App\Jobs\TranscribeRecording; use App\Livewire\Recordings\Index; use App\Models\Recording; use App\Models\User; +use App\Services\DiskSpaceService; use Illuminate\Database\Eloquent\ModelNotFoundException; use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Support\Facades\Bus; @@ -17,6 +18,15 @@ class IndexTest extends TestCase { use RefreshDatabase; + protected function setUp(): void + { + parent::setUp(); + + $this->mock(DiskSpaceService::class, function ($mock): void { + $mock->shouldReceive('snapshot')->andReturn(null); + }); + } + public function test_index_page_renders_as_livewire(): void { $user = User::factory()->create(); @@ -153,7 +163,7 @@ class IndexTest extends TestCase Livewire::test(Index::class) ->assertSee('Just started') ->assertSee('Transcribing') - ->assertDontSee('0%'); + ->assertDontSeeHtml('tabular-nums text-xs text-zinc-500'); } public function test_queued_recordings_do_not_show_fake_percent(): void