diff --git a/tests/Imports/StoreImportTest.php b/tests/Imports/StoreImportTest.php index 20f8550..3c610ed 100644 --- a/tests/Imports/StoreImportTest.php +++ b/tests/Imports/StoreImportTest.php @@ -22,8 +22,6 @@ protected function setUp(): void File::deleteDirectory(storage_path('statamic/importer')); Storage::disk('local')->deleteDirectory('statamic/file-uploads'); - - $this->travelTo(now()); } #[Test] @@ -34,6 +32,8 @@ public function it_stores_a_collection_import() // The Files fieldtype will upload this before the form gets submitted. Storage::disk('local')->put('statamic/file-uploads/123456789/import.csv', ''); + sleep(1); + $this ->actingAs(User::make()->makeSuper()->save()) ->post('/cp/utilities/importer', [ @@ -69,6 +69,8 @@ public function it_stores_a_collection_import_with_a_site() // The Files fieldtype will upload this before the form gets submitted. Storage::disk('local')->put('statamic/file-uploads/123456789/import.csv', ''); + sleep(1); + $this ->actingAs(User::make()->makeSuper()->save()) ->post('/cp/utilities/importer', [ @@ -107,6 +109,8 @@ public function it_cant_store_a_collection_import_when_the_collection_is_not_ava // The Files fieldtype will upload this before the form gets submitted. Storage::disk('local')->put('statamic/file-uploads/123456789/import.csv', ''); + sleep(1); + $this ->actingAs(User::make()->makeSuper()->save()) ->post('/cp/utilities/importer', [ @@ -137,6 +141,8 @@ public function it_cant_store_a_collection_import_without_a_site_when_multisite_ // The Files fieldtype will upload this before the form gets submitted. Storage::disk('local')->put('statamic/file-uploads/123456789/import.csv', ''); + sleep(1); + $this ->actingAs(User::make()->makeSuper()->save()) ->post('/cp/utilities/importer', [ @@ -161,6 +167,8 @@ public function it_stores_a_taxonomy_import() // The Files fieldtype will upload this before the form gets submitted. Storage::disk('local')->put('statamic/file-uploads/123456789/import.csv', ''); + sleep(1); + $this ->actingAs(User::make()->makeSuper()->save()) ->post('/cp/utilities/importer', [ @@ -189,6 +197,8 @@ public function it_stores_a_user_import() // The Files fieldtype will upload this before the form gets submitted. Storage::disk('local')->put('statamic/file-uploads/123456789/import.csv', ''); + sleep(1); + $this ->actingAs(User::make()->makeSuper()->save()) ->post('/cp/utilities/importer', [ @@ -231,6 +241,8 @@ public function validation_error_is_thrown_when_file_mime_type_is_not_allowed() // The Files fieldtype will upload this before the form gets submitted. Storage::disk('local')->put('statamic/file-uploads/123456789/import.pdf', ''); + sleep(1); + $this ->actingAs(User::make()->makeSuper()->save()) ->post('/cp/utilities/importer', [ @@ -249,6 +261,8 @@ public function validation_error_is_thrown_without_destination_type() // The Files fieldtype will upload this before the form gets submitted. Storage::disk('local')->put('statamic/file-uploads/123456789/import.csv', ''); + sleep(1); + $this ->actingAs(User::make()->makeSuper()->save()) ->post('/cp/utilities/importer', [ @@ -265,6 +279,8 @@ public function validation_error_is_thrown_without_an_import_strategy() // The Files fieldtype will upload this before the form gets submitted. Storage::disk('local')->put('statamic/file-uploads/123456789/import.csv', ''); + sleep(1); + $this ->actingAs(User::make()->makeSuper()->save()) ->post('/cp/utilities/importer', [