Admin package summary sheet

This commit is contained in:
Codex Agent
2026-01-06 11:57:30 +01:00
parent eba212a056
commit a796973861
13 changed files with 320 additions and 92 deletions

View File

@@ -47,4 +47,30 @@ class OnboardingStatusTest extends TenantTestCase
$show->assertOk();
$show->assertJsonPath('steps.completed_at', $completedAt);
}
public function test_tenant_can_mark_summary_seen(): void
{
$response = $this->authenticatedRequest('POST', '/api/v1/tenant/onboarding', [
'step' => 'summary_seen',
'meta' => [
'package_id' => 123,
],
]);
$response->assertOk();
$this->tenant->refresh();
$seenPackageId = Arr::get($this->tenant->settings ?? [], 'onboarding.summary_seen_package_id');
$seenAt = Arr::get($this->tenant->settings ?? [], 'onboarding.summary_seen_at');
$this->assertSame(123, $seenPackageId);
$this->assertNotNull($seenAt);
$show = $this->authenticatedRequest('GET', '/api/v1/tenant/onboarding');
$show->assertOk();
$show->assertJsonPath('steps.summary_seen_package_id', 123);
$show->assertJsonPath('steps.summary_seen_at', $seenAt);
}
}