TenantAtlas/apps/platform/tests/Unit/Providers/ProviderConnectionBadgeMappingTest.php
ahmido be314c577f Spec 400: rebuild Tenantial homepage visuals (#387)
## Summary
- rebuild the public Tenantial homepage around an evidence-first Microsoft tenant governance narrative
- replace the old hero visual with a new static dashboard preview and add dedicated Trust Bar and Feature Pillars sections
- update the shared public shell, navigation, footer, dark design tokens, assets, and homepage content to match the new brand direction
- align website smoke coverage and Spec 400 artifacts with the rebuilt homepage

## Testing
- not run in this pass
- updated website smoke specs under apps/website/tests/smoke

## Note
- `website-dev` was pushed to `origin` so the requested PR base exists remotely
- the remote `website-dev` branch is an ancestor of `origin/dev`, so this PR may also show upstream `dev` history relative to that base

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #387
2026-05-18 14:38:11 +00:00

34 lines
2.2 KiB
PHP

<?php
declare(strict_types=1);
use App\Support\Badges\BadgeCatalog;
use App\Support\Badges\BadgeDomain;
it('normalizes provider consent aliases through the canonical consent badge domain', function (): void {
expect(BadgeCatalog::spec(BadgeDomain::ProviderConsentStatus, 'needs_consent')->label)->toBe('Required')
->and(BadgeCatalog::spec(BadgeDomain::ProviderConsentStatus, 'connected')->label)->toBe('Granted')
->and(BadgeCatalog::spec(BadgeDomain::ProviderConsentStatus, 'error')->label)->toBe('Failed');
});
it('normalizes provider verification aliases through the canonical verification badge domain', function (): void {
expect(BadgeCatalog::spec(BadgeDomain::ProviderVerificationStatus, 'ok')->label)->toBe('Healthy')
->and(BadgeCatalog::spec(BadgeDomain::ProviderVerificationStatus, 'warning')->label)->toBe('Degraded')
->and(BadgeCatalog::spec(BadgeDomain::ProviderVerificationStatus, 'failed')->label)->toBe('Error')
->and(BadgeCatalog::spec(BadgeDomain::ProviderVerificationStatus, 'blocked')->label)->toBe('Blocked');
});
it('keeps consent and verification badge domains distinct for provider connection summaries', function (): void {
expect(BadgeCatalog::spec(BadgeDomain::ProviderConsentStatus, 'granted')->label)->toBe('Granted')
->and(BadgeCatalog::spec(BadgeDomain::ProviderVerificationStatus, 'healthy')->label)->toBe('Healthy')
->and(BadgeCatalog::spec(BadgeDomain::ProviderConsentStatus, 'granted')->label)
->not->toBe(BadgeCatalog::spec(BadgeDomain::ProviderVerificationStatus, 'healthy')->label);
});
it('maps managed-tenant onboarding verification badge aliases consistently', function (): void {
expect(BadgeCatalog::spec(BadgeDomain::ManagedTenantOnboardingVerificationStatus, 'unknown')->label)->toBe('Not started')
->and(BadgeCatalog::spec(BadgeDomain::ManagedTenantOnboardingVerificationStatus, 'healthy')->label)->toBe('Ready')
->and(BadgeCatalog::spec(BadgeDomain::ManagedTenantOnboardingVerificationStatus, 'degraded')->label)->toBe('Needs attention')
->and(BadgeCatalog::spec(BadgeDomain::ManagedTenantOnboardingVerificationStatus, 'error')->label)->toBe('Blocked');
});