Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dvlpp committed Nov 26, 2024
1 parent ffd5672 commit 029dd9c
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ public function execute(array $data = []): array
[
'fields' => [
[
['key' => 'name', 'size' => 12, 'sizeXS' => 12],
['key' => 'name', 'size' => 12],
],
],
'size' => 12,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected function executeFirstStep(array $data): array
[
'fields' => [
[
['key' => 'name', 'size' => 12, 'sizeXS' => 12],
['key' => 'name', 'size' => 12],
],
],
'size' => 12,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ public function execute($instanceId, array $data = []): array
[
'fields' => [
[
['key' => 'name', 'size' => 12, 'sizeXS' => 12],
['key' => 'name', 'size' => 12],
],
],
'size' => 12,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected function executeFirstStep($instanceId, array $data): array
[
'fields' => [
[
['key' => 'name', 'size' => 12, 'sizeXS' => 12],
['key' => 'name', 'size' => 12],
],
],
'size' => 12,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public function execute($instanceId, array $data = []): array
[
'fields' => [
[
['key' => 'name', 'size' => 12, 'sizeXS' => 12],
['key' => 'name', 'size' => 12],
],
],
'size' => 12,
Expand Down Expand Up @@ -241,7 +241,7 @@ public function execute($instanceId, array $data = []): array
[
'fields' => [
[
['key' => 'name', 'size' => 12, 'sizeXS' => 12],
['key' => 'name', 'size' => 12],
],
],
'size' => 12,
Expand Down
2 changes: 1 addition & 1 deletion tests/Http/Api/Embeds/ApiEmbedsFormControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
[
'fields' => [
[
['key' => 'name', 'size' => 12, 'sizeXS' => 12],
['key' => 'name', 'size' => 12],
],
],
'size' => 12,
Expand Down
14 changes: 2 additions & 12 deletions tests/Unit/Form/Layout/FormLayoutFieldTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,6 @@

expect($formTab->toArray())
->toHaveKey('size', 6)
->toHaveKey('sizeXS', 12)
->toHaveKey('key', 'name');
});

it('allows to set a xs size', function () {
$formTab = new FormLayoutField('name|6,8');

expect($formTab->toArray())
->toHaveKey('size', 6)
->toHaveKey('sizeXS', 8)
->toHaveKey('key', 'name');
});

Expand All @@ -37,8 +27,8 @@
->toHaveKey('key', 'name')
->and($formTab->toArray()['item'])
->toEqual([[
['key' => 'age', 'size' => 12, 'sizeXS' => 12],
['key' => 'age', 'size' => 12],
], [
['key' => 'size', 'size' => 12, 'sizeXS' => 12],
['key' => 'size', 'size' => 12],
]]);
});
2 changes: 0 additions & 2 deletions tests/Unit/Form/SharpFormTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public function buildFormLayout(FormLayout $formLayout): void
[
'key' => 'name',
'size' => 12,
'sizeXS' => 12,
],
]],
], [
Expand All @@ -63,7 +62,6 @@ public function buildFormLayout(FormLayout $formLayout): void
[
'key' => 'age',
'size' => 12,
'sizeXS' => 12,
],
]],
]],
Expand Down
3 changes: 0 additions & 3 deletions tests/Unit/Show/SharpShowLayoutTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public function buildShowLayout(ShowLayout $showLayout): void
->and($show->showLayout()['sections'][0]['columns'][0]['fields'][0][0])->toEqual([
'key' => 'name',
'size' => 12,
'sizeXS' => 12,
]);
});

Expand All @@ -72,13 +71,11 @@ public function buildShowLayout(ShowLayout $showLayout): void
->and($show->showLayout()['sections'][0]['columns'][0]['fields'][0][0])->toEqual([
'key' => 'list',
'size' => 12,
'sizeXS' => 12,
'item' => [
[
[
'key' => 'item',
'size' => 12,
'sizeXS' => 12,
],
],
],
Expand Down

0 comments on commit 029dd9c

Please sign in to comment.