From 6b307525621b05d1c6909d4ce23e3f01aaab96b8 Mon Sep 17 00:00:00 2001 From: bugy Date: Fri, 1 Nov 2019 21:45:53 +0100 Subject: [PATCH] #127 fixed replacement of parameter object on adding new field --- samples/configs/parameterized.json | 3 +- .../js/admin/scripts-config/ParamListItem.vue | 2 +- .../scripts-config/ParameterConfigForm.vue | 27 +- .../admin/scripts-config/ScriptParamList.vue | 9 +- .../scripts-config/script-config-module.js | 31 +- web-src/js/common.js | 4 +- .../tests/admin/ParameterConfigForm_test.js | 356 +++++++++--------- web-src/tests/admin/ParameterList_test.js | 95 +++++ 8 files changed, 333 insertions(+), 194 deletions(-) create mode 100644 web-src/tests/admin/ParameterList_test.js diff --git a/samples/configs/parameterized.json b/samples/configs/parameterized.json index ff87b63b..53975df1 100644 --- a/samples/configs/parameterized.json +++ b/samples/configs/parameterized.json @@ -11,8 +11,7 @@ { "name": "Simple Int", "param": "--simple_int", - "type": "int", - "max": "" + "type": "int" }, { "name": "Simple Boolean", diff --git a/web-src/js/admin/scripts-config/ParamListItem.vue b/web-src/js/admin/scripts-config/ParamListItem.vue index be3d9fe6..446206f8 100644 --- a/web-src/js/admin/scripts-config/ParamListItem.vue +++ b/web-src/js/admin/scripts-config/ParamListItem.vue @@ -27,7 +27,7 @@ import ParameterConfigForm from './ParameterConfigForm'; export default { - name: 'ParamHeader', + name: 'ParamListItem', components: {ParameterConfigForm}, props: { diff --git a/web-src/js/admin/scripts-config/ParameterConfigForm.vue b/web-src/js/admin/scripts-config/ParameterConfigForm.vue index 42cd2dbf..a03f32bf 100644 --- a/web-src/js/admin/scripts-config/ParameterConfigForm.vue +++ b/web-src/js/admin/scripts-config/ParameterConfigForm.vue @@ -64,7 +64,7 @@