diff --git a/tests/flows/basic-layout-after.json b/tests/flows/basic-layout-after.json index 6b64e84..5233bf6 100644 --- a/tests/flows/basic-layout-after.json +++ b/tests/flows/basic-layout-after.json @@ -230,6 +230,39 @@ [] ] }, + { + "id": "940a12ce19bf2212", + "type": "ui-number-input", + "z": "94d6d107f1742efb", + "name": "", + "label": "numeric", + "tooltip": "", + "group": "f663864dda246564", + "order": 13, + "width": 0, + "height": 0, + "passthru": true, + "topic": "topic", + "topicType": "msg", + "min": 0, + "max": 10, + "step": 1, + "className": "", + "x": 320, + "y": 440, + "wires": [ + [ + + ] + ], + "sendOnBlue": true, + "sendOnEnter": true, + "clearable": false, + "icon": "", + "iconPosition": "left", + "iconInnerPosition": "inside", + "spinner": "default" + }, { "id": "856a31bba370e7fc", "type": "ui-group", diff --git a/tests/flows/basic-layout-before.json b/tests/flows/basic-layout-before.json index 5efea68..1c7797f 100644 --- a/tests/flows/basic-layout-before.json +++ b/tests/flows/basic-layout-before.json @@ -223,6 +223,32 @@ [] ] }, + { + "id": "b52c292d531874a6", + "type": "ui_numeric", + "z": "94d6d107f1742efb", + "name": "", + "label": "numeric", + "tooltip": "", + "group": "856a31bba370e7fc", + "order": 13, + "width": 0, + "height": 0, + "wrap": false, + "passthru": true, + "topic": "topic", + "topicType": "msg", + "format": "$ {{value}} ", + "min": 0, + "max": 10, + "step": 1, + "className": "", + "x": 320, + "y": 440, + "wires": [ + [] + ] + }, { "id": "856a31bba370e7fc", "type": "ui_group", diff --git a/tests/index.js b/tests/index.js index 5f6a8e1..028d30b 100644 --- a/tests/index.js +++ b/tests/index.js @@ -205,6 +205,20 @@ describe('Dashboard Migration Script', function () { }) }) + describe('UI Number Input', function () { + const input = utils.getByType(migratedFlow, 'ui-number-input')[0] + const input1 = utils.getByType(basicLayoutAfter, 'ui-number-input')[0] + + const excludeFromChecks = ['id', 'group'] + Object.keys(input).forEach((prop) => { + if (!excludeFromChecks.includes(prop)) { + it('should set ' + prop + ' correctly ', function () { + input[prop].should.eql(input1[prop]) + }) + } + }) + }) + describe('Unsupported UI Nodes:', function () { it('should should be disabled in the NR Editor', function () { const template0 = utils.getByType(migratedFlow, 'ui_template')[0]