feat: add Z-Wave node types to add/edit node modal

Z-Wave (controller/router/end device) types existed in the model, theme
accents, default icons and the custom-style editor, but were missing from
the node Add/Edit type selector, so they could not be placed manually like
Zigbee nodes. Add a Z-Wave group and default mesh-radio nodes to no status
check (not IP-reachable), matching Zigbee behaviour.
This commit is contained in:
Pouzor
2026-06-30 14:38:02 +02:00
parent f2162a663a
commit fb33e5cb16
2 changed files with 20 additions and 2 deletions
@@ -188,6 +188,20 @@ describe('NodeModal', () => {
expect((onSubmit.mock.calls[0][0] as Partial<NodeData>).type).toBe('nas')
})
it('offers Z-Wave node types and submits one', () => {
const { onSubmit } = renderModal({ initial: BASE })
fireEvent.change(selects()[0], { target: { value: 'zwave_enddevice' } })
fireEvent.click(screen.getByRole('button', { name: 'Add' }))
expect((onSubmit.mock.calls[0][0] as Partial<NodeData>).type).toBe('zwave_enddevice')
})
it('forces check_method to none when a Z-Wave type is selected', () => {
const { onSubmit } = renderModal({ initial: { ...BASE, check_method: 'ping' } })
fireEvent.change(selects()[0], { target: { value: 'zwave_coordinator' } })
fireEvent.click(screen.getByRole('button', { name: 'Add' }))
expect((onSubmit.mock.calls[0][0] as Partial<NodeData>).check_method).toBe('none')
})
// ── Check method ──────────────────────────────────────────────────────
it('pre-fills check_method from initial', () => {