create(['is_active' => true]); $this->actingAs($customer); LivewireVolt::test('customer.press-releases.create') ->assertSet('hasCompanies', false) ->assertSee('Ohne Firma kann keine Pressemitteilung angelegt werden.') ->assertSee('Firma anlegen') ->assertDontSee('Zur Prüfung senden'); }); test('the pm create page shows the editor when a company exists', function () { /** @var TestCase $this */ $customer = User::factory()->create(['is_active' => true]); $company = Company::factory()->presseecho()->create(); $customer->companies()->attach($company->id, ['role' => 'owner']); $this->actingAs($customer); LivewireVolt::test('customer.press-releases.create') ->assertSet('hasCompanies', true) ->assertSet('companyId', $company->id) ->assertDontSee('Ohne Firma kann keine Pressemitteilung angelegt werden.') ->assertSee('Zur Prüfung senden'); });