withoutExceptionHandling()->login()->loginNami(); test()->get('/setting/prevention')->assertSeeLivewire(PreventionSettingView::class); }); it('displays settings', function () { test()->withoutExceptionHandling()->login()->loginNami(); $text = EditorRequestFactory::new()->text(50, 'lorem ipsum')->toData(); app(PreventionSettings::class)->fill(['formmail' => $text])->save(); Livewire::test(PreventionSettingView::class) ->assertSet('formmail.blocks.0.data.text', 'lorem ipsum') ->assertSeeHtml('data-active'); }); it('saves settings', function () { test()->withoutExceptionHandling()->login()->loginNami(); $text = EditorRequestFactory::new()->text(50, 'new lorem')->create(); Livewire::test(PreventionSettingView::class) ->set('formmail', $text) ->call('save') ->assertDispatched('success', 'Einstellungen gespeichert.'); $this->assertTrue(app(PreventionSettings::class)->formmail->hasAll(['new lorem'])); });