## 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
107 lines
4.0 KiB
PHP
107 lines
4.0 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Filament\Resources\TenantReviewResource;
|
|
use App\Models\ReviewPack;
|
|
use App\Models\Tenant;
|
|
use App\Support\TenantReviewStatus;
|
|
use App\Support\Workspaces\WorkspaceContext;
|
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
use Illuminate\Support\Facades\Storage;
|
|
|
|
uses(RefreshDatabase::class);
|
|
|
|
pest()->browser()->timeout(20_000);
|
|
|
|
beforeEach(function (): void {
|
|
Storage::fake('exports');
|
|
});
|
|
|
|
it('smokes the customer review workspace handoff from tenant review detail', function (): void {
|
|
$tenantPublished = Tenant::factory()->create(['name' => 'Published Tenant']);
|
|
[$user, $tenantPublished] = createUserWithTenant(
|
|
tenant: $tenantPublished,
|
|
role: 'owner',
|
|
workspaceRole: 'manager',
|
|
);
|
|
|
|
$tenantWithoutPublished = Tenant::factory()->create([
|
|
'workspace_id' => (int) $tenantPublished->workspace_id,
|
|
'name' => 'No Published Tenant',
|
|
]);
|
|
|
|
createUserWithTenant(
|
|
tenant: $tenantWithoutPublished,
|
|
user: $user,
|
|
role: 'owner',
|
|
workspaceRole: 'manager',
|
|
);
|
|
|
|
$publishedSnapshot = seedTenantReviewEvidence($tenantPublished);
|
|
$noPublishedSnapshot = seedTenantReviewEvidence($tenantWithoutPublished);
|
|
|
|
$publishedReview = composeTenantReviewForTest($tenantPublished, $user, $publishedSnapshot);
|
|
$publishedReview->forceFill([
|
|
'status' => TenantReviewStatus::Published->value,
|
|
'published_at' => now(),
|
|
'published_by_user_id' => (int) $user->getKey(),
|
|
])->save();
|
|
|
|
$internalOnlyReview = composeTenantReviewForTest($tenantWithoutPublished, $user, $noPublishedSnapshot);
|
|
$internalOnlyReview->forceFill([
|
|
'status' => TenantReviewStatus::Ready->value,
|
|
'published_at' => null,
|
|
'published_by_user_id' => null,
|
|
])->save();
|
|
|
|
Storage::disk('exports')->put('review-packs/customer-review-workspace-smoke.zip', 'PK-test');
|
|
|
|
$pack = ReviewPack::factory()->ready()->create([
|
|
'tenant_id' => (int) $tenantPublished->getKey(),
|
|
'workspace_id' => (int) $tenantPublished->workspace_id,
|
|
'tenant_review_id' => (int) $publishedReview->getKey(),
|
|
'evidence_snapshot_id' => (int) $publishedSnapshot->getKey(),
|
|
'initiated_by_user_id' => (int) $user->getKey(),
|
|
'file_path' => 'review-packs/customer-review-workspace-smoke.zip',
|
|
'file_disk' => 'exports',
|
|
]);
|
|
|
|
$publishedReview->forceFill(['current_export_review_pack_id' => (int) $pack->getKey()])->save();
|
|
|
|
$this->actingAs($user)->withSession([
|
|
WorkspaceContext::SESSION_KEY => (int) $tenantPublished->workspace_id,
|
|
WorkspaceContext::LAST_TENANT_IDS_SESSION_KEY => [
|
|
(string) $tenantPublished->workspace_id => (int) $tenantPublished->getKey(),
|
|
],
|
|
]);
|
|
|
|
visit(TenantReviewResource::tenantScopedUrl('view', ['record' => $publishedReview], $tenantPublished))
|
|
->waitForText('Related context')
|
|
->assertSee('Open customer workspace')
|
|
->assertNoJavaScriptErrors()
|
|
->assertNoConsoleLogs()
|
|
->click('Open customer workspace')
|
|
->waitForText('Customer-safe review workspace')
|
|
->assertSee('Clear filters')
|
|
->assertSee('Open latest review')
|
|
->assertSee('Current review pack available')
|
|
->assertSee('Proof summary available')
|
|
->assertDontSee('Publish review')
|
|
->assertDontSee('Refresh review')
|
|
->click('Clear filters')
|
|
->waitForText('No published review available yet')
|
|
->assertSee('No published review available yet')
|
|
->click('Open latest review')
|
|
->waitForText('Outcome summary')
|
|
->assertSee('Download current review pack')
|
|
->assertSee('Released governance record')
|
|
->assertDontSee('Publish review')
|
|
->assertDontSee('Refresh review')
|
|
->assertDontSee('Create next review')
|
|
->assertDontSee('Export executive pack')
|
|
->assertDontSee('Archive review')
|
|
->assertNoJavaScriptErrors()
|
|
->assertNoConsoleLogs();
|
|
});
|