Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flaky tests (maybe?) #49

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions tests/Imports/StoreImportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,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 @@ -67,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 @@ -105,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 @@ -135,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 @@ -159,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 @@ -187,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 @@ -229,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 @@ -247,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 @@ -263,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
Loading