Skip to content

Commit

Permalink
Fix image tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ilumos committed Sep 15, 2024
1 parent fcc9ecd commit da48e39
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion tests/Browser/Tests/Images/DeleteImageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function testDeleteingImage(): void
$browser->loginAs($superAdmin);

// And there is an image in the image uploads directory
copy(base_path('public/img/bg.jpg'), storage_path('app/public/images/bg.jpg'));
copy(base_path('resources/images/bg.jpg'), storage_path('app/public/images/bg.jpg'));

// When the super admin navigates to the image index page
$browser->visitRoute('images.index');
Expand All @@ -30,6 +30,9 @@ public function testDeleteingImage(): void
// And clicks the "delete" button
$browser->clickLink('Delete');

// And accept the deletion confirmation dialog
$browser->acceptDialog();

// Then the super admin should be redirected to the image index page
$browser->assertRouteIs('images.index');

Expand Down
2 changes: 1 addition & 1 deletion tests/Browser/Tests/Images/EditImageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function testEditingImage(): void
$browser->loginAs($superAdmin);

// And there is an image in the image uploads directory
copy(base_path('public/img/bg.jpg'), storage_path('app/public/images/bg.jpg'));
copy(base_path('resources/images/bg.jpg'), storage_path('app/public/images/bg.jpg'));

// When the super admin navigates to the image index page
$browser->visitRoute('images.index');
Expand Down
2 changes: 1 addition & 1 deletion tests/Browser/Tests/Images/UploadImageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function testUploadingImage(): void
$browser->visitRoute('images.index');

// And selects a file to upload
$browser->attach('images[]', base_path('public/img/bg.jpg'));
$browser->attach('images[]', base_path('resources/images/bg.jpg'));

// And clicks the "upload" button
$browser->press('Upload');
Expand Down

0 comments on commit da48e39

Please sign in to comment.