Mod FormtemplateResource

This commit is contained in:
philipp lang 2023-12-25 19:35:00 +01:00
parent 131690262e
commit 9f85809195
2 changed files with 18 additions and 0 deletions

View File

@ -31,6 +31,13 @@ class FormtemplateResource extends JsonResource
[ [
'id' => 'TextField', 'id' => 'TextField',
'name' => 'Text', 'name' => 'Text',
'default' => [
'name' => '',
'type' => 'TextField',
'columns' => ['mobile' => 2, 'tablet' => 4, 'desktop' => 12],
'default' => '',
'required' => false,
]
] ]
], ],
'links' => [ 'links' => [
@ -43,6 +50,8 @@ class FormtemplateResource extends JsonResource
] ]
], ],
'section_default' => [ 'section_default' => [
'name' => '',
'intro' => '',
'fields' => [], 'fields' => [],
] ]
]; ];

View File

@ -18,6 +18,13 @@ class FormtemplateIndexActionTest extends TestCase
->assertInertiaPath('data.meta.fields.0', [ ->assertInertiaPath('data.meta.fields.0', [
'id' => 'TextField', 'id' => 'TextField',
'name' => 'Text', 'name' => 'Text',
'default' => [
'name' => '',
'type' => 'TextField',
'columns' => ['mobile' => 2, 'tablet' => 4, 'desktop' => 12],
'default' => '',
'required' => false,
]
]) ])
->assertInertiaPath('data.meta.default', [ ->assertInertiaPath('data.meta.default', [
'name' => '', 'name' => '',
@ -27,6 +34,8 @@ class FormtemplateIndexActionTest extends TestCase
]) ])
->assertInertiaPath('data.meta.links.store', route('formtemplate.store')) ->assertInertiaPath('data.meta.links.store', route('formtemplate.store'))
->assertInertiaPath('data.meta.section_default', [ ->assertInertiaPath('data.meta.section_default', [
'name' => '',
'intro' => '',
'fields' => [], 'fields' => [],
]); ]);
} }