Admin package summary sheet
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user