37 lines
1021 B
PHP
37 lines
1021 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Models\OnboardingSession;
|
|
use App\Models\ProviderConnection;
|
|
|
|
beforeEach(function () {
|
|
bindFailHardGraphClient();
|
|
});
|
|
|
|
it('renders onboarding pages without triggering Graph calls at render time', function () {
|
|
[$user, $tenant] = createUserWithTenant(role: 'owner');
|
|
|
|
$connection = ProviderConnection::factory()->for($tenant)->create([
|
|
'provider' => 'microsoft',
|
|
'is_default' => true,
|
|
]);
|
|
|
|
OnboardingSession::query()->create([
|
|
'tenant_id' => $tenant->getKey(),
|
|
'provider_connection_id' => $connection->getKey(),
|
|
'status' => 'in_progress',
|
|
'current_step' => 4,
|
|
'assigned_to_user_id' => $user->getKey(),
|
|
'metadata' => [],
|
|
]);
|
|
|
|
$this->actingAs($user);
|
|
|
|
$wizardUrl = "/admin/t/{$tenant->external_id}/onboarding";
|
|
$taskBoardUrl = "/admin/t/{$tenant->external_id}/onboarding/tasks";
|
|
|
|
$this->get($wizardUrl)->assertSuccessful();
|
|
$this->get($taskBoardUrl)->assertSuccessful();
|
|
});
|