create(['status' => 'active']); $onboardingUrl = "/admin/t/{$tenant->external_id}/onboarding"; $readonly = User::factory()->create(); TenantMembership::query()->create([ 'tenant_id' => $tenant->getKey(), 'user_id' => $readonly->getKey(), 'role' => 'readonly', 'source' => 'manual', 'source_ref' => null, 'created_by_user_id' => null, ]); OnboardingSession::factory()->create([ 'tenant_id' => $tenant->getKey(), 'status' => 'in_progress', 'current_step' => 4, ]); $this->actingAs($readonly); $this->get($onboardingUrl) ->assertSuccessful() ->assertSee('permission', escape: false); });