fix: harden legacy release channel fallback

This commit is contained in:
lucaronin
2026-04-13 12:35:02 +02:00
parent 8f408d9ef0
commit b4abc05f0e
4 changed files with 134 additions and 33 deletions

View File

@@ -71,6 +71,20 @@ describe('SettingsPanel', () => {
expect(screen.queryByText(/Beta\/Stable/i)).not.toBeInTheDocument()
})
it('treats a legacy beta release channel as stable', () => {
render(
<SettingsPanel
open={true}
settings={{ ...emptySettings, release_channel: 'beta' }}
onSave={onSave}
onClose={onClose}
/>
)
expect(screen.getByTestId('settings-release-channel')).toHaveAttribute('data-value', 'stable')
expect(screen.queryByText('Beta')).not.toBeInTheDocument()
})
it('preserves alpha when alpha is already selected', () => {
const alphaSettings: Settings = {
...emptySettings,