diff --git a/frontend-modern/src/utils/__tests__/featureReleases.preview.test.ts b/frontend-modern/src/utils/__tests__/featureReleases.preview.test.ts index 069fb0e3a0..93277fb669 100644 --- a/frontend-modern/src/utils/__tests__/featureReleases.preview.test.ts +++ b/frontend-modern/src/utils/__tests__/featureReleases.preview.test.ts @@ -34,6 +34,8 @@ describe('a feature in preview', () => { expect(isFeatureInPreview('infrastructureMap')).toBe(true); expect(getFeatureStage('standaloneVms')).toBe('preview'); expect(isFeatureInPreview('standaloneVms')).toBe(true); + expect(getFeatureStage('cloudCompanion')).toBe('preview'); + expect(isFeatureInPreview('cloudCompanion')).toBe(true); }); it('is on in a beta or release candidate', () => { @@ -41,6 +43,7 @@ describe('a feature in preview', () => { expect(getFeatureAvailability('infrastructureMap')).toBe('on'); expect(isFeatureGuideAvailable('MAP')).toBe(true); expect(getFeatureAvailability('standaloneVms')).toBe('on'); + expect(getFeatureAvailability('cloudCompanion')).toBe('on'); }); it('is off in a stable build and in a source build', () => { @@ -49,6 +52,7 @@ describe('a feature in preview', () => { expect(getFeatureAvailability('infrastructureMap')).toBe('off'); expect(isFeatureGuideAvailable('MAP')).toBe(false); expect(getFeatureAvailability('standaloneVms')).toBe('off'); + expect(getFeatureAvailability('cloudCompanion')).toBe('off'); } }); @@ -56,30 +60,37 @@ describe('a feature in preview', () => { setVersion({ channel: 'stable', isDevelopment: true }); expect(getFeatureAvailability('infrastructureMap')).toBe('off'); expect(getFeatureAvailability('standaloneVms')).toBe('off'); + expect(getFeatureAvailability('cloudCompanion')).toBe('off'); setVersion({ isDevelopment: true }); expect(getFeatureAvailability('infrastructureMap')).toBe('off'); expect(getFeatureAvailability('standaloneVms')).toBe('off'); + expect(getFeatureAvailability('cloudCompanion')).toBe('off'); setVersion({ channel: 'rc', isDevelopment: true }); expect(getFeatureAvailability('infrastructureMap')).toBe('on'); expect(getFeatureAvailability('standaloneVms')).toBe('on'); + expect(getFeatureAvailability('cloudCompanion')).toBe('on'); }); it('is on in a page the end-to-end suite has marked, whatever the channel', () => { setVersion({ channel: 'stable', featureReleaseTestBuild: true }); expect(getFeatureAvailability('infrastructureMap')).toBe('on'); expect(getFeatureAvailability('standaloneVms')).toBe('on'); + expect(getFeatureAvailability('cloudCompanion')).toBe('on'); }); it('waits while the version is unknown and stays off if it cannot be read', () => { expect(getFeatureAvailability('infrastructureMap')).toBe('pending'); expect(getFeatureGuideAvailability('MAP')).toBe('pending'); expect(getFeatureAvailability('standaloneVms')).toBe('pending'); + expect(getFeatureAvailability('cloudCompanion')).toBe('pending'); expect(isFeatureAvailable('infrastructureMap')).toBe(false); expect(isFeatureAvailable('standaloneVms')).toBe(false); + expect(isFeatureAvailable('cloudCompanion')).toBe(false); setLastError('Failed to check for updates'); expect(getFeatureAvailability('infrastructureMap')).toBe('off'); expect(getFeatureGuideAvailability('MAP')).toBe('off'); expect(getFeatureAvailability('standaloneVms')).toBe('off'); + expect(getFeatureAvailability('cloudCompanion')).toBe('off'); }); it('turns on for anything already on the page when the version arrives', () => { @@ -87,11 +98,14 @@ describe('a feature in preview', () => { // A memo is recomputed only if it tracked what changed. const mapAvailable = createMemo(() => isFeatureAvailable('infrastructureMap')); const vmsAvailable = createMemo(() => isFeatureAvailable('standaloneVms')); + const companionAvailable = createMemo(() => isFeatureAvailable('cloudCompanion')); expect(mapAvailable()).toBe(false); expect(vmsAvailable()).toBe(false); + expect(companionAvailable()).toBe(false); setVersion({ channel: 'rc' }); expect(mapAvailable()).toBe(true); expect(vmsAvailable()).toBe(true); + expect(companionAvailable()).toBe(true); dispose(); }); }); @@ -101,5 +115,6 @@ describe('a feature in preview', () => { setVersion({ channel: 'stable' }); expect(getFeatureAvailability('infrastructureMap')).toBe('on'); expect(getFeatureAvailability('standaloneVms')).toBe('on'); + expect(getFeatureAvailability('cloudCompanion')).toBe('on'); }); }); diff --git a/frontend-modern/src/utils/__tests__/featureReleases.test.ts b/frontend-modern/src/utils/__tests__/featureReleases.test.ts index c6e64db363..6ff24799e6 100644 --- a/frontend-modern/src/utils/__tests__/featureReleases.test.ts +++ b/frontend-modern/src/utils/__tests__/featureReleases.test.ts @@ -67,11 +67,13 @@ describe('feature release stages', () => { // Moving a feature past build is Richard's call after its review. This fails // on purpose when a stage changes, so the change is never a side effect. - it('holds the map and standalone VMs in preview', () => { + it('holds the map, standalone VMs, and Cloud Companion in preview', () => { expect(getFeatureStage('infrastructureMap')).toBe('preview'); expect(isFeatureInPreview('infrastructureMap')).toBe(true); expect(getFeatureStage('standaloneVms')).toBe('preview'); expect(isFeatureInPreview('standaloneVms')).toBe(true); + expect(getFeatureStage('cloudCompanion')).toBe('preview'); + expect(isFeatureInPreview('cloudCompanion')).toBe(true); }); it('shows the map in this development build and not in a release build', () => { diff --git a/frontend-modern/src/utils/featureReleases.json b/frontend-modern/src/utils/featureReleases.json index 662d082b75..abc7722c53 100644 --- a/frontend-modern/src/utils/featureReleases.json +++ b/frontend-modern/src/utils/featureReleases.json @@ -18,7 +18,8 @@ }, "cloudCompanion": { "name": "Cloud Companion", - "stage": "build", + "stage": "preview", + "approval": "Richard, 2026-12-02: \"you decide\"", "guides": [] } }