Incentive (E1): Titelbild der Challenge, Dashboard-Karte mit einem Button, VIP-Sichtbarkeit auf dem Dashboard getestet
Titelbild liegt unter public/img/incentive/recruiting-challenge-2026-27/, der Seeder traegt den Dateinamen ein. Die Dashboard-Karte verlinkt nur noch auf die eine Incentive-Seite, der Ranglisten-Button entfaellt. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
96d7a9565e
commit
2f24a35efa
5 changed files with 24 additions and 9 deletions
|
|
@ -42,6 +42,7 @@ function vipTestUser(int $admin = 0): User
|
|||
'payment_account' => now()->addYear(),
|
||||
'wizard' => 100,
|
||||
'active' => 1,
|
||||
'active_date' => now()->subMonths(6),
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
@ -108,6 +109,24 @@ it('zeigt in der Navigation ein VIP-Badge am VIP-Incentive', function () {
|
|||
->and($publicEntry)->not->toContain('badge badge-secondary');
|
||||
});
|
||||
|
||||
it('zeigt die Dashboard-Karte eines VIP-Incentives normalen Beratern nicht', function () {
|
||||
vipOnlyChallenge(['name' => 'VIP Dashboard Challenge']);
|
||||
|
||||
$this->actingAs(vipTestUser());
|
||||
$this->get(route('home'))->assertOk()->assertDontSee('VIP Dashboard Challenge');
|
||||
});
|
||||
|
||||
it('zeigt die Dashboard-Karte eines VIP-Incentives VIP-Konten mit nur einem Button zur Seite', function () {
|
||||
vipOnlyChallenge(['name' => 'VIP Dashboard Challenge']);
|
||||
|
||||
$this->actingAs(vipTestUser(admin: 1));
|
||||
$this->get(route('home'))->assertOk()
|
||||
->assertSee('VIP Dashboard Challenge')
|
||||
->assertSee(__('incentive.dashboard_btn_teaser'))
|
||||
->assertDontSee(__('incentive.dashboard_btn_ranking'))
|
||||
->assertDontSee('#ranking');
|
||||
});
|
||||
|
||||
it('zeigt allen Beratern ein Incentive ohne VIP-Sperre', function () {
|
||||
$incentive = vipOnlyChallenge(['vip_only' => false]);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue