Stop IndexTest from treating Flux CSS 80% as a transcription percent.
CI / test (push) Successful in 22s
CI / build-and-push (push) Successful in 36s
CI / deploy (push) Skipped
CI / deploy-stage (push) Failing after 1s

assertDontSee('0%') matched unrelated classes like transparent_80% and the disk meter.
This commit is contained in:
ben
2026-08-13 18:26:33 +02:00
parent 5e76bfdec1
commit 3601ce8b6f
+11 -1
View File
@@ -6,6 +6,7 @@ use App\Jobs\TranscribeRecording;
use App\Livewire\Recordings\Index; use App\Livewire\Recordings\Index;
use App\Models\Recording; use App\Models\Recording;
use App\Models\User; use App\Models\User;
use App\Services\DiskSpaceService;
use Illuminate\Database\Eloquent\ModelNotFoundException; use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Bus; use Illuminate\Support\Facades\Bus;
@@ -17,6 +18,15 @@ class IndexTest extends TestCase
{ {
use RefreshDatabase; 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 public function test_index_page_renders_as_livewire(): void
{ {
$user = User::factory()->create(); $user = User::factory()->create();
@@ -153,7 +163,7 @@ class IndexTest extends TestCase
Livewire::test(Index::class) Livewire::test(Index::class)
->assertSee('Just started') ->assertSee('Just started')
->assertSee('Transcribing') ->assertSee('Transcribing')
->assertDontSee('0%'); ->assertDontSeeHtml('tabular-nums text-xs text-zinc-500');
} }
public function test_queued_recordings_do_not_show_fake_percent(): void public function test_queued_recordings_do_not_show_fake_percent(): void