Stop IndexTest from treating Flux CSS 80% as a transcription percent.
assertDontSee('0%') matched unrelated classes like transparent_80% and the disk meter.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user