mirror of
https://github.com/stablyai/orca.git
synced 2026-11-15 18:37:24 +00:00
test: N-01 stage threshold (4.9 s / 5 s) and one fixture per stage line
This commit is contained in:
@@ -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 },
|
||||
|
||||
@@ -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…'
|
||||
|
||||
Reference in New Issue
Block a user