TenantAtlas/apps/platform/tests/Feature/Badges/OnboardingBadgeSemanticsTest.php
Ahmed Darrazi 5443dba269
Some checks failed
PR Fast Feedback / fast-feedback (pull_request) Failing after 7m2s
refactor: consolidate internal tenant model naming
2026-05-14 13:09:36 +02:00

27 lines
1.0 KiB
PHP

<?php
use App\Support\Badges\BadgeCatalog;
use App\Support\Badges\BadgeDomain;
it('maps onboarding verification status blocked to a Blocked danger badge', function (): void {
$spec = BadgeCatalog::spec(BadgeDomain::ManagedEnvironmentOnboardingVerificationStatus, 'blocked');
expect($spec->label)->toBe('Blocked');
expect($spec->color)->toBe('danger');
expect($spec->icon)->toBe('heroicon-m-x-circle');
});
it('maps onboarding verification status ready to a Ready success badge', function (): void {
$spec = BadgeCatalog::spec(BadgeDomain::ManagedEnvironmentOnboardingVerificationStatus, 'ready');
expect($spec->label)->toBe('Ready');
expect($spec->color)->toBe('success');
expect($spec->icon)->toBe('heroicon-m-check-circle');
});
it('normalizes onboarding verification status input before mapping', function (): void {
$spec = BadgeCatalog::spec(BadgeDomain::ManagedEnvironmentOnboardingVerificationStatus, 'NEEDS ATTENTION');
expect($spec->label)->toBe('Needs attention');
});