Skip to content

Commit

Permalink
Expect common field defaults in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean committed May 28, 2024
1 parent 972567b commit aae4aa3
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/Fields/BlueprintTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,11 @@ public function converts_to_array_suitable_for_rendering_fields_in_publish_compo
'read_only' => false, // deprecated
'always_save' => false,
'autocomplete' => null,
'hide_display' => null,
'instructions_position' => 'above',
'listable' => 'hidden',
'replicator_preview' => true,
'duplicate' => true,
],
],
],
Expand Down Expand Up @@ -472,6 +477,11 @@ public function converts_to_array_suitable_for_rendering_fields_in_publish_compo
'visibility' => 'visible',
'read_only' => false, // deprecated
'always_save' => false,
'hide_display' => null,
'instructions_position' => 'above',
'listable' => 'hidden',
'replicator_preview' => true,
'duplicate' => true,
],
],
],
Expand Down Expand Up @@ -558,6 +568,11 @@ public function converts_to_array_suitable_for_rendering_prefixed_conditional_fi
'read_only' => false, // deprecated
'always_save' => false,
'autocomplete' => null,
'hide_display' => null,
'instructions_position' => 'above',
'listable' => 'hidden',
'replicator_preview' => true,
'duplicate' => true,
],
[
'handle' => 'nested_deeper_two',
Expand All @@ -578,6 +593,11 @@ public function converts_to_array_suitable_for_rendering_prefixed_conditional_fi
'read_only' => false, // deprecated
'always_save' => false,
'autocomplete' => null,
'hide_display' => null,
'instructions_position' => 'above',
'listable' => 'hidden',
'replicator_preview' => true,
'duplicate' => true,
],
],
],
Expand Down
5 changes: 5 additions & 0 deletions tests/Fields/FieldTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,11 @@ public function preProcess($data)
'component' => 'example',
'a_config_field_with_pre_processing' => 'foo preprocessed',
'a_config_field_without_pre_processing' => 'foo',
'hide_display' => null,
'instructions_position' => 'above',
'listable' => 'hidden',
'replicator_preview' => true,
'duplicate' => true,
], $field->toPublishArray());
}

Expand Down
10 changes: 10 additions & 0 deletions tests/Fields/SectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,11 @@ public function converts_to_array_suitable_for_rendering_fields_in_publish_compo
'read_only' => false, // deprecated
'always_save' => false,
'autocomplete' => null,
'hide_display' => null,
'instructions_position' => 'above',
'listable' => 'hidden',
'replicator_preview' => true,
'duplicate' => true,
],
[
'handle' => 'two',
Expand All @@ -150,6 +155,11 @@ public function converts_to_array_suitable_for_rendering_fields_in_publish_compo
'visibility' => 'visible',
'read_only' => false, // deprecated
'always_save' => false,
'hide_display' => null,
'instructions_position' => 'above',
'listable' => 'hidden',
'replicator_preview' => true,
'duplicate' => true,
],
],
], $section->toPublishArray());
Expand Down
10 changes: 10 additions & 0 deletions tests/Fields/TabTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,11 @@ public function converts_to_array_suitable_for_rendering_fields_in_publish_compo
'read_only' => false, // deprecated
'always_save' => false,
'autocomplete' => null,
'hide_display' => null,
'instructions_position' => 'above',
'listable' => 'hidden',
'replicator_preview' => true,
'duplicate' => true,
],
[
'handle' => 'two',
Expand All @@ -175,6 +180,11 @@ public function converts_to_array_suitable_for_rendering_fields_in_publish_compo
'visibility' => 'visible',
'read_only' => false, // deprecated
'always_save' => false,
'hide_display' => null,
'instructions_position' => 'above',
'listable' => 'hidden',
'replicator_preview' => true,
'duplicate' => true,
],
],
],
Expand Down
15 changes: 15 additions & 0 deletions tests/Fieldtypes/SetsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,11 @@ public function it_preprocesses_for_config_with_groups()
'read_only' => false,
'always_save' => false,
'autocomplete' => null,
'hide_display' => null,
'instructions_position' => 'above',
'listable' => 'hidden',
'replicator_preview' => true,
'duplicate' => true,
],
],
],
Expand Down Expand Up @@ -264,6 +269,11 @@ public function it_preprocesses_for_config_with_groups()
'read_only' => false,
'always_save' => false,
'autocomplete' => null,
'hide_display' => null,
'instructions_position' => 'above',
'listable' => 'hidden',
'replicator_preview' => true,
'duplicate' => true,
],
],
],
Expand Down Expand Up @@ -318,6 +328,11 @@ public function it_preprocesses_for_config_without_groups()
'read_only' => false,
'always_save' => false,
'autocomplete' => null,
'hide_display' => null,
'instructions_position' => 'above',
'listable' => 'hidden',
'replicator_preview' => true,
'duplicate' => true,
],
],
],
Expand Down

0 comments on commit aae4aa3

Please sign in to comment.