Recruiting Challenge: Start 9. Oktober, Texte auf EN/ES/FR

- Qualifikationsbeginn 09.10.2026 statt 01.10. (Kundenentscheid 25.09.),
  Beschreibung und Teilnahmebedingungen nennen den 9. Oktober
- Name, Untertitel, Beschreibung und Bedingungen als trans_* auf
  Englisch, Spanisch und Franzoesisch
- Seeder gleicht bei bestehender Challenge Texte, Uebersetzungen und den
  Beginn ab; alle anderen Admin-Werte bleiben

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kevin 2026-09-25 10:28:27 +00:00
parent 11afdb11d1
commit 68533e917c
2 changed files with 146 additions and 13 deletions

View file

@ -18,7 +18,7 @@ it('legt die Challenge als Entwurf mit Praemie und Wertung nach Neupartnern an',
expect($incentive->isDraft())->toBeTrue()
->and($incentive->vip_only)->toBeTrue()
->and($incentive->name)->toBe('Recruiting Challenge 2026/27')
->and($incentive->qualification_start->toDateString())->toBe('2026-10-01')
->and($incentive->qualification_start->toDateString())->toBe('2026-10-09')
->and($incentive->qualification_end->toDateString())->toBe('2027-01-31')
->and((float) $incentive->amount_per_partner)->toBe(50.0)
->and($incentive->rankBonuses())->toBe([1 => 500.0, 2 => 300.0, 3 => 200.0])
@ -28,13 +28,33 @@ it('legt die Challenge als Entwurf mit Praemie und Wertung nach Neupartnern an',
->and($incentive->description)->toContain('50 €')
->and($incentive->terms)->toContain('6. Gleichstand')
->and($incentive->description.$incentive->subtitle.$incentive->terms)->not->toContain('–')
->and($incentive->description.$incentive->subtitle.$incentive->terms)->not->toContain('—');
->and($incentive->description.$incentive->subtitle.$incentive->terms)->not->toContain('—')
->and($incentive->description.$incentive->terms)->toContain('9. Oktober')->not->toContain('1. Oktober');
});
it('aktualisiert beim zweiten Lauf nur die Texte und laesst Admin-Werte stehen', function () {
it('liefert Name, Untertitel, Beschreibung und Bedingungen auf EN, ES und FR', function (string $locale, string $date) {
$this->seed(RecruitingChallenge2026Seeder::class);
$incentive = Incentive::where('slug', RecruitingChallenge2026Seeder::SLUG)->firstOrFail();
$incentive->update(['status' => 1, 'image' => 'challenge.jpg', 'bonus_rank_1' => 999, 'description' => 'alt']);
app()->setLocale($locale);
expect($incentive->getLang('subtitle'))->toContain('50')->not->toBe($incentive->subtitle)
->and($incentive->getLang('description'))->toContain($date)->not->toBe($incentive->description)
->and($incentive->getLang('terms'))->toContain($date)->toContain('6.')
->and($incentive->getLang('name'))->toBe('Recruiting Challenge 2026/27');
})->with([
'en' => ['en', '9 October'],
'es' => ['es', '9 de octubre'],
'fr' => ['fr', '9 octobre'],
]);
it('aktualisiert beim zweiten Lauf Texte und Beginn und laesst Admin-Werte stehen', function () {
$this->seed(RecruitingChallenge2026Seeder::class);
$incentive = Incentive::where('slug', RecruitingChallenge2026Seeder::SLUG)->firstOrFail();
$incentive->update([
'status' => 1, 'image' => 'challenge.jpg', 'bonus_rank_1' => 999, 'description' => 'alt',
'qualification_start' => '2026-10-01', 'trans_description' => ['en' => null, 'es' => null, 'fr' => null],
]);
$this->seed(RecruitingChallenge2026Seeder::class);
@ -43,5 +63,7 @@ it('aktualisiert beim zweiten Lauf nur die Texte und laesst Admin-Werte stehen',
->and($incentive->status)->toBe(1)
->and($incentive->image)->toBe('challenge.jpg')
->and((float) $incentive->bonus_rank_1)->toBe(999.0)
->and($incentive->description)->toContain('50 €');
->and($incentive->description)->toContain('50 €')
->and($incentive->qualification_start->toDateString())->toBe('2026-10-09')
->and($incentive->getTrans('description', 'en'))->toContain('9 October');
});