Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean committed Nov 29, 2024
1 parent 42baece commit 70f4395
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions tests/Imports/StoreImportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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', [
Expand Down Expand Up @@ -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', [
Expand Down Expand Up @@ -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', [
Expand Down Expand Up @@ -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', [
Expand All @@ -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', [
Expand Down Expand Up @@ -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', [
Expand Down Expand Up @@ -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', [
Expand All @@ -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', [
Expand All @@ -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', [
Expand Down

0 comments on commit 70f4395

Please sign in to comment.