Implement academy analytics, billing, and web stories updates
This commit is contained in:
@@ -6,6 +6,7 @@ use App\Models\User;
|
||||
use App\Models\World;
|
||||
use App\Models\WorldRewardGrant;
|
||||
use App\Models\WorldSubmission;
|
||||
use App\Models\WorldWebStory;
|
||||
use App\Models\Artwork;
|
||||
use App\Models\Group;
|
||||
use App\Models\GroupChallenge;
|
||||
@@ -152,6 +153,26 @@ it('includes rewarded contributors on public world pages', function (): void {
|
||||
->where('rewardedContributors.items.0.badge_label', $world->title . ' Winner'));
|
||||
});
|
||||
|
||||
it('exposes a published web story on the public world page payload', function (): void {
|
||||
$world = publicWorld([
|
||||
'title' => 'Fantasy Realms',
|
||||
'slug' => 'fantasy-realms',
|
||||
]);
|
||||
|
||||
$story = WorldWebStory::factory()->visible()->for($world)->create([
|
||||
'slug' => 'fantasy-realms',
|
||||
'title' => 'Fantasy Realms',
|
||||
'excerpt' => 'A cinematic journey through magical wallpapers and dreamlike digital art.',
|
||||
]);
|
||||
|
||||
$this->get(route('worlds.show', ['world' => $world->slug]))
|
||||
->assertOk()
|
||||
->assertInertia(fn (AssertableInertia $page) => $page
|
||||
->component('World/WorldShow')
|
||||
->where('webStory.slug', $story->slug)
|
||||
->where('webStory.url', route('web-stories.show', ['slug' => $story->slug])));
|
||||
});
|
||||
|
||||
it('renders recap payloads for ended worlds with published recaps', function (): void {
|
||||
$creator = User::factory()->create([
|
||||
'username' => 'recapcreator-' . Str::lower(Str::random(6)),
|
||||
|
||||
Reference in New Issue
Block a user