Skip to content

Commit cbbbefd

Browse files
committed
Fix failing tests
1 parent b856188 commit cbbbefd

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

tests/Imports/EditImportTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Statamic\Importer\Facades\Import;
1111
use Statamic\Importer\Tests\TestCase;
1212
use Statamic\Testing\Concerns\PreventsSavingStacheItemsToDisk;
13+
use Inertia\Testing\AssertableInertia as Assert;
1314

1415
class EditImportTest extends TestCase
1516
{
@@ -43,6 +44,6 @@ public function can_edit_an_import()
4344
->actingAs(User::make()->makeSuper()->save())
4445
->get("/cp/utilities/importer/{$import->id()}")
4546
->assertOk()
46-
->assertViewHas('import');
47+
->assertInertia(fn (Assert $page) => $page->component('importer::Edit'));
4748
}
4849
}

tests/Imports/ViewImportListingTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use Statamic\Importer\Facades\Import;
1010
use Statamic\Importer\Tests\TestCase;
1111
use Statamic\Testing\Concerns\PreventsSavingStacheItemsToDisk;
12+
use Inertia\Testing\AssertableInertia as Assert;
1213

1314
class ViewImportListingTest extends TestCase
1415
{
@@ -40,8 +41,9 @@ public function it_shows_a_list_of_imports()
4041
->actingAs(User::make()->makeSuper()->save())
4142
->get('/cp/utilities/importer')
4243
->assertOk()
43-
->assertViewHas('imports', function ($imports) {
44-
return $imports->count() === 2;
45-
});
44+
->assertInertia(fn (Assert $page) => $page
45+
->component('importer::Index')
46+
->has('imports', 2)
47+
);
4648
}
4749
}

0 commit comments

Comments
 (0)