Align provisioning UI with lifecycle states
CI / checks (push) Successful in 5m37s

This commit is contained in:
2026-10-12 15:52:34 -04:00
parent 6059ebf2a5
commit c296769b33
15 changed files with 294 additions and 237 deletions
+43
View File
@@ -123,6 +123,49 @@ function recovery(state: RecoveryObservation['state']): RecoveryObservation {
}
describe('provisioning detail summary and technical details', () => {
it('explains file preparation while preserving the Queued lifecycle state', () => {
const detail = fixture('queued');
detail.deployment.finished_at = null;
detail.deployment.stage = 'Preparing launch files for the host agent';
detail.progress!.phase = 'prepare';
const body = pageBody(detail);
const badges = body.match(/<div\b[^>]*class="badges[^>]*>[\s\S]*?<\/div>/)?.[0];
expect(badges).toContain('Queued');
expect(body).toContain('Current step: Prepare server files');
expect(body).toContain('The command has not been submitted yet.');
expect(body).not.toContain('awaiting provisioning evaluation');
});
it('shows Validating with the current step and blocker as separate supporting text', () => {
const detail = fixture('awaiting-health');
detail.deployment.finished_at = null;
detail.deployment.stage = 'Checking game status';
detail.progress!.blocker = {
code: 'native-host',
message: 'Waiting for fresh game telemetry',
automatic: true
};
const body = pageBody(detail);
const badges = body.match(/<div\b[^>]*class="badges[^>]*>[\s\S]*?<\/div>/)?.[0];
expect(badges).toContain('Validating');
expect(badges).not.toContain('Waiting for fresh game telemetry');
expect(body).toContain('Current step: Verify game status');
expect(body).toContain('Waiting for fresh game telemetry');
expect(body).not.toContain('Verifying health');
});
it('keeps failed outcomes visible even when a prior blocker remains recorded', () => {
const detail = fixture('failed');
detail.progress!.blocker = {
code: 'startup-capacity',
message: 'Waiting for startup capacity',
automatic: true
};
const body = pageBody(detail);
expect(body).toContain('Restart failed');
expect(body).not.toContain('Current step:');
});
it('puts requester, absolute start and one duration above the outcome', () => {
const body = pageBody(fixture());
const summary = body.match(/<p\b[^>]*class="operation-summary[^>]*>[\s\S]*?<\/p>/)?.[0];