Update admin PWA events, branding, and packages
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-01-19 11:35:38 +01:00
parent 926bc7d070
commit fbff2afa3e
43 changed files with 6846 additions and 6323 deletions

View File

@@ -70,4 +70,28 @@ class TenantPackageOverviewTest extends TenantTestCase
$this->assertSame(10, $payload['active_package']['package_limits']['used_gallery_days']);
$this->assertSame(9, $payload['active_package']['remaining_events']);
}
public function test_active_package_falls_back_to_active_endcustomer_package(): void
{
$package = Package::factory()->endcustomer()->create([
'features' => ['custom_branding'],
'branding_allowed' => true,
'watermark_allowed' => false,
]);
TenantPackage::factory()->create([
'tenant_id' => $this->tenant->id,
'package_id' => $package->id,
'active' => true,
]);
$request = Request::create('/api/v1/tenant/packages', 'GET');
$request->attributes->set('tenant', $this->tenant);
$response = app(TenantPackageController::class)->index($request);
$payload = $response->getData(true);
$this->assertSame($package->id, $payload['active_package']['package_id']);
$this->assertSame(['custom_branding'], $payload['active_package']['package_limits']['features']);
}
}