create([ 'workspace_id' => (int) $tenant->workspace_id, 'tenant_id' => (int) $tenant->getKey(), 'user_id' => (int) $user->getKey(), 'type' => 'provider.connection.check', 'status' => 'completed', 'outcome' => 'failed', 'context' => [ 'verification_report' => $report, ], ]); $report['previous_report_id'] = (int) $previousRun->getKey(); $run = OperationRun::factory()->create([ 'workspace_id' => (int) $tenant->workspace_id, 'tenant_id' => (int) $tenant->getKey(), 'user_id' => (int) $user->getKey(), 'type' => 'provider.connection.check', 'status' => 'completed', 'outcome' => 'failed', 'context' => [ 'verification_report' => $report, ], ]); Filament::setTenant(null, true); $this->actingAs($user) ->withSession([WorkspaceContext::SESSION_KEY => (int) $tenant->workspace_id]) ->get(route('admin.operations.view', ['run' => (int) $run->getKey()])) ->assertOk() ->assertSee('Verification report') ->assertSee('Open previous verification') ->assertSee('/admin/operations/'.((int) $previousRun->getKey()), false) ->assertSee('Token acquisition works'); } }