Compare commits

..

No commits in common. "2984ad937221b87646c525a66bac6335cc042451" and "0437511bf105b729c48d204ef80b298bf8b38557" have entirely different histories.

3 changed files with 8 additions and 13 deletions

View File

@ -15,6 +15,7 @@ use Tests\RequestFactories\EditorRequestFactory;
* @method self from(string $from)
* @method self to(string $to)
* @method self excerpt(string $excerpt)
* @method self description(EditorRequestFactory $description)
* @method self registrationFrom(string|null $date)
* @method self registrationUntil(string|null $date)
*/
@ -83,9 +84,4 @@ class FormFactory extends Factory
{
return $this->state(['mail_bottom' => $factory->create()]);
}
public function description(EditorRequestFactory $factory): self
{
return $this->state(['description' => $factory->create()]);
}
}

View File

@ -57,7 +57,7 @@ class FormApiListActionTest extends FormTestCase
->create();
sleep(1);
$this->get('/api/form?perPage=15')->assertJsonPath('data.0.config.sections.0.fields.0.value', null);
$this->get('/api/form?perPage=15')->assertJsonPath('data.0.config.sections.0.fields.0.value', '');
}
public function testItDisplaysRemoteGroups(): void

View File

@ -7,7 +7,6 @@ use App\Form\Models\Formtemplate;
use App\Form\Models\Participant;
use Carbon\Carbon;
use Tests\Feature\Form\FormtemplateSectionRequest;
use Tests\RequestFactories\EditorRequestFactory;
class FormIndexActionTest extends FormTestCase
{
@ -20,11 +19,11 @@ class FormIndexActionTest extends FormTestCase
$form = Form::factory()
->name('lala')
->excerpt('fff')
->description(EditorRequestFactory::new()->text(10, 'desc'))
->description('desc')
->from('2023-05-05')
->to('2023-06-07')
->mailTop(EditorRequestFactory::new()->text(10, 'Guten Tag'))
->mailBottom(EditorRequestFactory::new()->text(10, 'Cheers'))
->mailTop('Guten Tag')
->mailBottom('Cheers')
->registrationFrom('2023-05-06 04:00:00')
->registrationUntil('2023-04-01 05:00:00')
->sections([FormtemplateSectionRequest::new()->name('sname')->fields([$this->textField()])])
@ -38,9 +37,9 @@ class FormIndexActionTest extends FormTestCase
->assertInertiaPath('data.data.0.config.sections.0.name', 'sname')
->assertInertiaPath('data.data.0.id', $form->id)
->assertInertiaPath('data.data.0.excerpt', 'fff')
->assertInertiaPath('data.data.0.description.blocks.0.data.text', 'desc')
->assertInertiaPath('data.data.0.mail_top.blocks.0.data.text', 'Guten Tag')
->assertInertiaPath('data.data.0.mail_bottom.blocks.0.data.text', 'Cheers')
->assertInertiaPath('data.data.0.description', 'desc')
->assertInertiaPath('data.data.0.mail_top', 'Guten Tag')
->assertInertiaPath('data.data.0.mail_bottom', 'Cheers')
->assertInertiaPath('data.data.0.from_human', '05.05.2023')
->assertInertiaPath('data.data.0.to_human', '07.06.2023')
->assertInertiaPath('data.data.0.from', '2023-05-05')