22-05-2026 Optimierung der User und Admin Panels
This commit is contained in:
parent
d2ba22c0cf
commit
e8c47b7553
73 changed files with 10282 additions and 1546 deletions
|
|
@ -53,6 +53,28 @@ test('customer company switcher links to selected company detail', function () {
|
|||
->assertSee(route('me.press-kits.show', $company->id, absolute: false));
|
||||
});
|
||||
|
||||
test('customer company switcher limits rendered company options', function () {
|
||||
/** @var TestCase $this */
|
||||
$customer = User::factory()->create(['is_active' => true]);
|
||||
|
||||
for ($i = 1; $i <= 55; $i++) {
|
||||
Company::factory()->presseecho()->create([
|
||||
'name' => sprintf('Switcher Firma %02d', $i),
|
||||
'owner_user_id' => $customer->id,
|
||||
'created_at' => now()->subDays(56 - $i),
|
||||
]);
|
||||
}
|
||||
|
||||
$this->actingAs($customer);
|
||||
|
||||
LivewireVolt::test('customer.company-switcher')
|
||||
->assertViewHas('companies', fn ($companies) => $companies->count() === 50)
|
||||
->assertSee('Switcher Firma 55')
|
||||
->assertSee('Switcher Firma 06')
|
||||
->assertDontSee('Switcher Firma 05')
|
||||
->assertSee('Weitere Firmen über');
|
||||
});
|
||||
|
||||
test('customer press release list is filtered by selected company context', function () {
|
||||
/** @var TestCase $this */
|
||||
$customer = User::factory()->create(['is_active' => true]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue