File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 1010use Statamic \Importer \Facades \Import ;
1111use Statamic \Importer \Tests \TestCase ;
1212use Statamic \Testing \Concerns \PreventsSavingStacheItemsToDisk ;
13+ use Inertia \Testing \AssertableInertia as Assert ;
1314
1415class 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}
Original file line number Diff line number Diff line change 99use Statamic \Importer \Facades \Import ;
1010use Statamic \Importer \Tests \TestCase ;
1111use Statamic \Testing \Concerns \PreventsSavingStacheItemsToDisk ;
12+ use Inertia \Testing \AssertableInertia as Assert ;
1213
1314class 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}
You can’t perform that action at this time.
0 commit comments