| 2 | |
| 3 | describe('showHideInputs – declared defaults of sibling fields', () => { |
| 4 | const buildParams = () => [ |
| 5 | { |
| 6 | label: 'Schedule Type', |
| 7 | name: 'scheduleType', |
| 8 | type: 'options', |
| 9 | default: 'visualPicker', |
| 10 | show: { startInputType: 'scheduleInput' } |
| 11 | }, |
| 12 | { |
| 13 | label: 'Schedule Input Mode', |
| 14 | name: 'scheduleInputMode', |
| 15 | type: 'options', |
| 16 | default: 'text', |
| 17 | show: { startInputType: 'scheduleInput' } |
| 18 | }, |
| 19 | { |
| 20 | label: 'Frequency', |
| 21 | name: 'scheduleFrequency', |
| 22 | type: 'options', |
| 23 | show: { startInputType: 'scheduleInput', scheduleType: 'visualPicker' } |
| 24 | }, |
| 25 | { |
| 26 | label: 'Default Input', |
| 27 | name: 'scheduleDefaultInput', |
| 28 | type: 'string', |
| 29 | show: { startInputType: 'scheduleInput', scheduleInputMode: 'text' } |
| 30 | } |
| 31 | ] |
| 32 | |
| 33 | it('shows fields whose `show` references a sibling default value, even if the sibling key is absent', () => { |
| 34 | const nodeData = { |