From 4c64849163c5eeaa5b74491d16bd7cf082f0beea Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 10 Nov 2026 16:47:21 -0800 Subject: [PATCH] test: sidebar clone-step label test with a full request --- .../worktree-creation/vm-build-steps.test.ts | 34 ------------------- .../pending-worktree-creation-label.test.ts | 26 ++++++++++++++ 2 files changed, 26 insertions(+), 34 deletions(-) diff --git a/src/renderer/src/components/worktree-creation/vm-build-steps.test.ts b/src/renderer/src/components/worktree-creation/vm-build-steps.test.ts index c3523bbc41d..fa99cec518d 100644 --- a/src/renderer/src/components/worktree-creation/vm-build-steps.test.ts +++ b/src/renderer/src/components/worktree-creation/vm-build-steps.test.ts @@ -7,7 +7,6 @@ import { deriveVmBuildSteps } from './vm-build-steps' import { classifyVmBuildFailure } from './vm-build-failure' import { holdRunningSteps } from './use-minimum-running-steps' import { humanizeOrcaCloudLogLine } from './orca-cloud-build-log' -import { getCreationProgressLabel } from '@/lib/workspace/creation/pending-worktree-creation' import type { Translate } from '@/i18n/use-translate' const base = { @@ -296,39 +295,6 @@ describe('Orca Cloud clone step', () => { }) }) - it('the sidebar line follows the active step', () => { - const t: Translate = (_key, fallback) => fallback - const entry = ( - provisioningLog: string, - environmentCheck?: { status: 'running'; startedAt: number } - ) => ({ - status: 'creating' as const, - phase: 'provisioning-vm' as const, - request: { - repoId: 'r', - name: 'n', - setupDecision: 'skip' as const, - ephemeralVmRecipe: { - sourceRepoId: 'r', - recipeId: 'cloud', - projectId: 'p', - provider: 'orca-cloud' as const - } - }, - provisioningLog, - ...(environmentCheck ? { environmentCheck } : {}) - }) - expect(getCreationProgressLabel(entry('[orca-cloud] provisioning\n'), t)).toBe( - 'Starting sandbox…' - ) - expect(getCreationProgressLabel(entry('[orca-cloud] cloning\n'), t)).toBe( - 'Cloning the repository…' - ) - expect( - getCreationProgressLabel(entry('[orca-cloud] cloning\n[orca-cloud] connecting\n'), t) - ).toBe('Preparing environment…') - }) - it('progress lines stay out of the plain log', () => { const t: Translate = (_key, fallback) => fallback expect(humanizeOrcaCloudLogLine('[orca-cloud] cloning', t)).toBe('Cloning the repository…') diff --git a/src/renderer/src/lib/workspace/creation/pending-worktree-creation-label.test.ts b/src/renderer/src/lib/workspace/creation/pending-worktree-creation-label.test.ts index 61f1cc48b33..536820aba40 100644 --- a/src/renderer/src/lib/workspace/creation/pending-worktree-creation-label.test.ts +++ b/src/renderer/src/lib/workspace/creation/pending-worktree-creation-label.test.ts @@ -46,3 +46,29 @@ it('speaks of a sandbox for Orca Cloud and keeps VM wording for bring-your-own r expect(label('orca-cloud', { status: 'running', startedAt: 1 })).toBe('Preparing environment…') expect(label(undefined)).toBe('Provisioning VM…') }) + +it('the Orca Cloud sidebar line follows the clone step', () => { + const at = (provisioningLog: string) => + getCreationProgressLabel( + { + status: 'creating', + phase: 'provisioning-vm', + indeterminate: false, + provisioningLog, + request: request({ + ephemeralVmRecipe: { + sourceRepoId: 'r', + recipeId: 'cloud', + projectId: 'p', + provider: 'orca-cloud' + } + }) + }, + t + ) + expect(at('[orca-cloud] provisioning\n')).toBe('Starting sandbox…') + expect(at('[orca-cloud] cloning\n[orca-cloud] clone-progress 40 download\n')).toBe( + 'Cloning the repository…' + ) + expect(at('[orca-cloud] cloning\n[orca-cloud] connecting\n')).toBe('Preparing environment…') +})