Skip to content

Commit 71e740c

Browse files
committed
ui: preserve modern ISO state after template selection
Align the modern selector prop with DeployVM's existing isoHypervisor binding so the displayed ISO selection follows the parent fallback after template hypervisor changes. Restore focused watcher coverage for that state transition.
1 parent 12cc20b commit 71e740c

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

ui/src/views/compute/wizard/OsBasedImageSelection.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ export default {
203203
type: Array,
204204
default: () => []
205205
},
206-
selectedIsoHypervisor: {
206+
isoHypervisor: {
207207
type: String,
208208
default: undefined
209209
},
@@ -226,7 +226,7 @@ export default {
226226
localSelectedImageType: this.selectedImageType,
227227
localSelectedGuestOsCategoryId: this.selectedGuestOsCategoryId,
228228
localRootDiskOverrideChecked: this.rootDiskOverrideChecked,
229-
localSelectedIsoHypervisor: this.selectedIsoHypervisor
229+
localSelectedIsoHypervisor: this.isoHypervisor
230230
}
231231
},
232232
mounted () {
@@ -260,7 +260,7 @@ export default {
260260
rootDiskOverrideChecked (newValue) {
261261
this.localRootDiskOverrideChecked = newValue
262262
},
263-
selectedIsoHypervisor (newValue) {
263+
isoHypervisor (newValue) {
264264
this.localSelectedIsoHypervisor = newValue
265265
}
266266
},

ui/tests/unit/views/compute/ImageSelectionHypervisor.spec.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,17 @@ describe('compute image selection hypervisor state', () => {
218218
)
219219
})
220220

221+
it('synchronizes the modern ISO selector when the parent hypervisor changes', () => {
222+
const context = { localSelectedIsoHypervisor: 'VMware' }
223+
224+
OsBasedImageSelection.watch.isoHypervisor.call(
225+
context,
226+
fallbackHypervisor
227+
)
228+
229+
expect(context.localSelectedIsoHypervisor).toBe(fallbackHypervisor)
230+
})
231+
221232
it('preserves a modern explicit ISO hypervisor after selecting another ISO', () => {
222233
const selector = selectors[0]
223234
const { context, emit } = createContext(selector)

0 commit comments

Comments
 (0)