fixed sanitazer and academy

This commit is contained in:
2026-06-05 16:53:20 +02:00
parent 15870ddb1f
commit f89ee937c0
29 changed files with 2444 additions and 1039 deletions

View File

@@ -213,6 +213,7 @@ it('renders public group pages and accepts group reports', function () {
->component('Group/GroupShow')
->where('group.slug', $group->slug)
->where('section', 'overview')
->where('seo.canonical', route('groups.show', ['group' => $group]))
->where('featuredArtworks.0.id', $featuredArtwork->id)
->where('featuredCollections.0.id', $featuredCollection->id)
->where('leadership.0.role', Group::ROLE_OWNER)
@@ -229,6 +230,27 @@ it('renders public group pages and accepts group reports', function () {
expect(Report::query()->where('target_type', 'group')->where('target_id', $group->id)->count())->toBe(1);
});
it('adds canonical metadata to public group artwork sections', function () {
$owner = User::factory()->create();
$group = Group::factory()->for($owner, 'owner')->create([
'visibility' => Group::VISIBILITY_PUBLIC,
'status' => Group::LIFECYCLE_ACTIVE,
'slug' => 'pixelart',
'name' => 'Pixelart',
]);
app(GroupMembershipService::class)->ensureOwnerMembership($group);
$this->get(route('groups.section', ['group' => $group, 'section' => 'artworks']))
->assertOk()
->assertInertia(fn (AssertableInertia $page) => $page
->component('Group/GroupShow')
->where('section', 'artworks')
->where('seo.canonical', route('groups.section', ['group' => $group, 'section' => 'artworks']))
->where('seo.og_url', route('groups.section', ['group' => $group, 'section' => 'artworks']))
);
});
it('lets owners manage releases, contributors, milestones, and publishing through studio endpoints', function () {
$owner = User::factory()->create();
$contributor = User::factory()->create();
@@ -2195,4 +2217,4 @@ it('publishes and pins posts, hides archived posts from public listings, and sup
->assertCreated();
expect(Report::query()->where('target_type', 'group_post')->where('target_id', $draft->id)->count())->toBe(1);
});
});