github.com/replicatedhq/ship@v0.55.0/pkg/lifecycle/render/config/resolve/test-cases/api/failing/hidden-group.yml (about) 1 ## this has two options, the second has a when that should make it hidden by 2 ## default. The test will toggle the first item on and confirm the second is 3 ## now visible 4 5 - name: a when that defaults to false with select_one 6 input: 7 - {} 8 config: 9 - name: external_service_enable 10 title: Enable Some External Service 11 description: Configure the external service to be used 12 items: 13 - name: external_service_enabled 14 default: external_service_enabled_no 15 type: select_one 16 items: 17 - name: external_service_enabled_yes 18 title: Enable External Service 19 - name: external_service_enabled_no 20 title: Disable External Service 21 - name: external_service 22 when: '{{repl ConfigOptionEquals "external_service_enabled" "external_service_enabled_yes"}}' 23 items: 24 - name: service_login 25 title: Service Login 26 type: text 27 - name: service_password 28 title: Service Password 29 type: password 30 31 responses: 32 json: | 33 [ 34 { 35 "name": "external_service_enable", 36 "test_proc": null, 37 "title": "Enable Some External Service", 38 "when": "", 39 "description": "Configure the external service to be used", 40 "filters": null, 41 "items": [ 42 { 43 "affix": "", 44 "data_cmd": null, 45 "default": "external_service_enabled_no", 46 "default_cmd": null, 47 "filters": null, 48 "help_text": "", 49 "hidden": false, 50 "is_excluded_from_support": false, 51 "items": [ 52 { 53 "default": "", 54 "name": "external_service_enabled_yes", 55 "recommended": false, 56 "title": "Enable External Service", 57 "value": "" 58 }, 59 { 60 "default": "", 61 "name": "external_service_enabled_no", 62 "recommended": false, 63 "title": "Disable External Service", 64 "value": "" 65 } 66 ], 67 "multi_value": null, 68 "multiple": false, 69 "name": "external_service_enabled", 70 "props": null, 71 "readonly": false, 72 "recommended": false, 73 "required": false, 74 "test_proc": null, 75 "title": "", 76 "type": "select_one", 77 "value": "", 78 "value_cmd": null, 79 "when": "" 80 } 81 ] 82 }, 83 { 84 "name": "external_service", 85 "test_proc": null, 86 "title": "", 87 "when": "{{repl ConfigOptionEquals \"external_service_enabled\" \"external_service_enabled_yes\"}}", 88 "description": "", 89 "filters": null, 90 "items": [ 91 { 92 "affix": "", 93 "data_cmd": null, 94 "default": "", 95 "default_cmd": null, 96 "filters": null, 97 "help_text": "", 98 "hidden": true, 99 "is_excluded_from_support": false, 100 "items": null, 101 "multi_value": null, 102 "multiple": false, 103 "name": "service_login", 104 "props": null, 105 "readonly": false, 106 "recommended": false, 107 "required": false, 108 "test_proc": null, 109 "title": "Service Login", 110 "type": "text", 111 "value": "", 112 "value_cmd": null, 113 "when": "" 114 }, 115 { 116 "affix": "", 117 "data_cmd": null, 118 "default": "", 119 "default_cmd": null, 120 "filters": null, 121 "help_text": "", 122 "hidden": true, 123 "is_excluded_from_support": false, 124 "items": null, 125 "multi_value": null, 126 "multiple": false, 127 "name": "service_password", 128 "props": null, 129 "readonly": false, 130 "recommended": false, 131 "required": false, 132 "test_proc": null, 133 "title": "Service Password", 134 "type": "password", 135 "value": "", 136 "value_cmd": null, 137 "when": "" 138 } 139 ] 140 } 141 ]