From 809c2dcff307da03d98568a0c4530b5df448e918 Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 11 Nov 2026 11:41:23 -0800 Subject: [PATCH] test: N-01 stage threshold (4.9 s / 5 s) and one fixture per stage line --- .../VmBuildSheet.fixture.tsx | 25 +++++++++++++++++++ .../worktree-creation/vm-build-steps.test.ts | 12 ++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/src/renderer/src/components/worktree-creation/VmBuildSheet.fixture.tsx b/src/renderer/src/components/worktree-creation/VmBuildSheet.fixture.tsx index 06a3c9523fe..8757e90cbc9 100644 --- a/src/renderer/src/components/worktree-creation/VmBuildSheet.fixture.tsx +++ b/src/renderer/src/components/worktree-creation/VmBuildSheet.fixture.tsx @@ -166,6 +166,31 @@ export const cloudStarting = frame( T0 + 3_000 ) +// N-01: past 5 s the running "Start sandbox" names what it waits on (one frame per stage). +export const cloudStageProject = frame( + entry({ phase: 'preparing', provisioningLog: '', phaseLog: [] }, CLOUD_RECIPE), + null, + T0 + 12_000 +) + +export const cloudStagePlan = frame( + entry({ provisioningLog: '[orca-cloud] checking-entitlement' }, CLOUD_RECIPE), + null, + T0 + 12_000 +) + +export const cloudStageStarting = frame( + entry({ provisioningLog: CLOUD_LOG }, CLOUD_RECIPE), + null, + T0 + 12_000 +) + +export const cloudStageConnecting = frame( + entry({ provisioningLog: `${CLOUD_LOG}\n[orca-cloud] connecting` }, CLOUD_RECIPE), + null, + T0 + 12_000 +) + export const cloudPreparing = frame( entry( { environmentCheck: { status: 'running', startedAt: T0 + 4_800 }, provisioningLog: LOG }, 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 df977242b64..8f5e11f14c4 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 @@ -190,8 +190,18 @@ describe('provisionStageLabel (N-01)', () => { it('stays quiet for a normal start, then names what the sandbox step waits on', () => { const log = '[orca-cloud] provisioning\n' expect( - provisionStageLabel({ phase: 'provisioning-vm', provisioningLog: log }, 4000, t) + provisionStageLabel({ phase: 'provisioning-vm', provisioningLog: log }, 4900, t) ).toBeNull() + expect(provisionStageLabel({ phase: 'provisioning-vm', provisioningLog: log }, 5000, t)).toBe( + 'Starting the sandbox…' + ) + expect( + provisionStageLabel( + { phase: 'provisioning-vm', provisioningLog: '[orca-cloud] checking-entitlement\n' }, + 5000, + t + ) + ).toBe('Checking your plan…') expect(provisionStageLabel({ phase: 'preparing' }, 6000, t)).toBe('Getting your project ready…') expect(provisionStageLabel({ phase: 'provisioning-vm', provisioningLog: log }, 6000, t)).toBe( 'Starting the sandbox…'