withoutMiddleware(HandleInertiaRequests::class); }); it('renders discussion forum structured data on forum topic pages', function (): void { $author = User::query()->create([ 'username' => 'forumauthor', 'username_changed_at' => now()->subDays(120), 'last_username_change_at' => now()->subDays(120), 'onboarding_step' => 'complete', 'name' => 'Forum Author', 'email' => 'forumauthor@example.com', 'email_verified_at' => now(), 'password' => 'password', 'is_active' => true, ]); $replier = User::query()->create([ 'username' => 'forumreplier', 'username_changed_at' => now()->subDays(120), 'last_username_change_at' => now()->subDays(120), 'onboarding_step' => 'complete', 'name' => 'Forum Replier', 'email' => 'forumreplier@example.com', 'email_verified_at' => now(), 'password' => 'password', 'is_active' => true, ]); $category = ForumCategory::query()->create([ 'name' => 'Forum SEO', 'title' => 'Forum SEO', 'slug' => 'forum-seo', 'description' => 'SEO discussion category', 'is_active' => true, 'position' => 1, ]); $board = ForumBoard::query()->create([ 'category_id' => $category->id, 'title' => 'Technical SEO', 'slug' => 'technical-seo', 'description' => 'Technical SEO board', 'is_active' => true, 'position' => 1, ]); $topic = ForumTopic::query()->create([ 'board_id' => $board->id, 'user_id' => $author->id, 'title' => 'Structured data for forums', 'slug' => 'structured-data-for-forums', 'views' => 42, 'replies_count' => 1, 'last_post_at' => now(), ]); ForumPost::query()->create([ 'thread_id' => $topic->id, 'topic_id' => $topic->id, 'user_id' => $author->id, 'content' => 'Original post body about Google discussion structured data.', 'created_at' => now()->subHour(), 'updated_at' => now()->subHour(), ]); $reply = ForumPost::query()->create([ 'thread_id' => $topic->id, 'topic_id' => $topic->id, 'user_id' => $replier->id, 'content' => 'Reply with implementation details for the forum page.', 'created_at' => now()->subMinutes(15), 'updated_at' => now()->subMinutes(15), ]); $response = $this->get(route('forum.topic.show', ['topic' => $topic->slug])); $response ->assertOk() ->assertSee('application/ld+json', false) ->assertSee('DiscussionForumPosting', false) ->assertSee('