new test files

This commit is contained in:
2026-04-25 08:36:03 +02:00
parent 19d5a9ed3e
commit 67be537c86
17 changed files with 4075 additions and 18 deletions

View File

@@ -5,23 +5,33 @@ declare(strict_types=1);
use App\Models\World;
use Database\Seeders\WorldLaunchSeeder;
it('seeds launch worlds with a featured current world and archived recurrence', function (): void {
it('seeds a live Spring Vibes activation and recurring archive editions', function (): void {
$this->seed(WorldLaunchSeeder::class);
$featuredCurrent = World::query()
->where('slug', 'like', 'retro-month-%')
->where('is_featured', true)
->current()
$springVibes = World::query()
->where('slug', 'like', 'spring-vibes-%')
->campaignActive()
->where('is_homepage_featured', true)
->first();
expect($featuredCurrent)->not->toBeNull();
expect($featuredCurrent?->worldRelations()->count())->toBeGreaterThan(0);
expect($springVibes)->not->toBeNull();
expect($springVibes?->title)->toStartWith('Spring Vibes');
expect($springVibes?->worldRelations()->count())->toBeGreaterThan(0);
expect($springVibes?->campaign_priority)->toBeGreaterThan(0);
expect($springVibes?->teaser_title)->toBe('Now live: Spring Vibes');
$archivedEdition = World::query()
->where('parent_world_id', $featuredCurrent?->id)
->where('parent_world_id', $springVibes?->id)
->where('status', World::STATUS_ARCHIVED)
->first();
$upcomingCampaign = World::query()
->where('slug', 'like', 'pixel-week-%')
->first();
expect($archivedEdition)->not->toBeNull();
expect(World::query()->count())->toBeGreaterThanOrEqual(6);
expect($upcomingCampaign)->not->toBeNull();
expect($upcomingCampaign?->is_active_campaign)->toBeTrue();
expect($upcomingCampaign?->promotion_starts_at)->not->toBeNull();
expect(World::query()->count())->toBeGreaterThanOrEqual(8);
});