@json-editor/json-editor 2.9.0 → 2.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/build.yml +2 -0
- package/CHANGELOG.md +11 -7
- package/config/codeceptjs_helpers.js +4 -8
- package/config/karma.conf.js +0 -4
- package/config/webpack.common.js +1 -1
- package/config/webpack.dev.js +1 -1
- package/config/webpack.nonmin.js +1 -1
- package/config/webpack.prod.js +0 -1
- package/dist/dev/jsoneditor.js +3687 -0
- package/dist/jsoneditor.js +2 -14
- package/dist/jsoneditor.js.LICENSE.txt +1 -1
- package/dist/jsoneditor.js.map +1 -1
- package/dist/nonmin/jsoneditor.js +25354 -26381
- package/dist/nonmin/jsoneditor.js.map +1 -1
- package/docs/datetime.html +37 -2
- package/package.json +26 -24
- package/src/editors/integer.js +5 -3
- package/src/editors/multiple.js +3 -1
- package/src/editors/number.js +5 -3
- package/src/editors/radio.js +4 -6
- package/src/editors/select.js +0 -6
- package/tests/codeceptjs/core_test.js +20 -20
- package/tests/codeceptjs/editors/advanced_test.js +1 -1
- package/tests/codeceptjs/editors/array_any_of_test.js +2 -2
- package/tests/codeceptjs/editors/array_test.js +15 -15
- package/tests/codeceptjs/editors/autocomplete_test.js +3 -3
- package/tests/codeceptjs/editors/button_test.js +5 -5
- package/tests/codeceptjs/editors/checkbox_test.js +2 -2
- package/tests/codeceptjs/editors/colorpicker_test.js +2 -2
- package/tests/codeceptjs/editors/datetime_test.js +4 -4
- package/tests/codeceptjs/editors/inheritance_test.js +1 -1
- package/tests/codeceptjs/editors/integer_test.js +6 -6
- package/tests/codeceptjs/editors/issues/issue-gh-1133_test.js +11 -0
- package/tests/codeceptjs/editors/issues/issue-gh-1158_test.js +1 -1
- package/tests/codeceptjs/editors/issues/issue-gh-1164_test.js +12 -0
- package/tests/codeceptjs/editors/issues/issue-gh-1257_test.js +1 -1
- package/tests/codeceptjs/editors/issues/issue-gh-812_test.js +1 -1
- package/tests/codeceptjs/editors/jodit_test.js +2 -2
- package/tests/codeceptjs/editors/multiselect_test.js +1 -1
- package/tests/codeceptjs/editors/number_test.js +14 -12
- package/tests/codeceptjs/editors/object_test.js +13 -13
- package/tests/codeceptjs/editors/option-no_default_values_test.js +2 -2
- package/tests/codeceptjs/editors/programmatic-changes_test.js +2 -2
- package/tests/codeceptjs/editors/radio_test.js +1 -1
- package/tests/codeceptjs/editors/range_test.js +1 -1
- package/tests/codeceptjs/editors/rating_test.js +1 -1
- package/tests/codeceptjs/editors/select_test.js +2 -2
- package/tests/codeceptjs/editors/stepper_test.js +3 -3
- package/tests/codeceptjs/editors/string_test.js +8 -8
- package/tests/codeceptjs/editors/table-confirm-delete_test.js +4 -4
- package/tests/codeceptjs/editors/tabs_test.js +1 -1
- package/tests/codeceptjs/editors/uuid_test.js +5 -5
- package/tests/codeceptjs/editors/validation_test.js +1 -1
- package/tests/codeceptjs/meta-schema_test.js +4 -4
- package/tests/codeceptjs/schemaloader_test.js +1 -1
- package/tests/codeceptjs/themes_test.js +9 -9
- package/tests/pages/issues/issue-gh-1133.html +64 -0
- package/tests/pages/issues/issue-gh-1164.html +71 -0
- package/tests/pages/number.html +18 -0
- package/tests/unit/core.spec.js +6 -5
package/docs/datetime.html
CHANGED
|
@@ -257,7 +257,42 @@
|
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
},
|
|
260
|
-
|
|
260
|
+
"isofsdatetime": {
|
|
261
|
+
"type": "string",
|
|
262
|
+
"format": "datetime-local",
|
|
263
|
+
"title": "Datetime (String)",
|
|
264
|
+
"description": "ISO datetime-local field with flatpickr",
|
|
265
|
+
"options": {
|
|
266
|
+
"grid_columns": 4,
|
|
267
|
+
"inputAttributes": {
|
|
268
|
+
"placeholder": "Enter datetime"
|
|
269
|
+
},
|
|
270
|
+
"flatpickr": {
|
|
271
|
+
"dateFormat": "Z",
|
|
272
|
+
"wrap": true,
|
|
273
|
+
"allowInput": true,
|
|
274
|
+
"enableSeconds": true,
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
"isofidatetime": {
|
|
279
|
+
"type": "integer",
|
|
280
|
+
"format": "datetime-local",
|
|
281
|
+
"title": "Datetime (Integer)",
|
|
282
|
+
"description": "ISO datetime-local field with flatpickr",
|
|
283
|
+
"options": {
|
|
284
|
+
"grid_columns": 4,
|
|
285
|
+
"inputAttributes": {
|
|
286
|
+
"placeholder": "Enter datetime"
|
|
287
|
+
},
|
|
288
|
+
"flatpickr": {
|
|
289
|
+
"dateFormat": "Z",
|
|
290
|
+
"wrap": true,
|
|
291
|
+
"allowInput": true,
|
|
292
|
+
"enableSeconds": true,
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
},
|
|
261
296
|
"fisdatetime": {
|
|
262
297
|
"type": "string",
|
|
263
298
|
"format": "datetime-local",
|
|
@@ -302,4 +337,4 @@
|
|
|
302
337
|
</script>
|
|
303
338
|
</body>
|
|
304
339
|
|
|
305
|
-
</html>
|
|
340
|
+
</html>
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@json-editor/json-editor",
|
|
3
3
|
"title": "JSONEditor",
|
|
4
4
|
"description": "JSON Schema based editor",
|
|
5
|
-
"version": "2.9.
|
|
5
|
+
"version": "2.9.1",
|
|
6
6
|
"main": "dist/jsoneditor.js",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "Jeremy Dorn",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"build": "npm run build.prod && npm run build.nonmin",
|
|
30
30
|
"build.prod": "webpack --config config/webpack.prod.js --progress --profile --bail",
|
|
31
31
|
"build.nonmin": "webpack --config config/webpack.nonmin.js --progress --profile --bail",
|
|
32
|
-
"build.nonmin.travis": "webpack --config config/webpack.nonmin.js --env
|
|
32
|
+
"build.nonmin.travis": "webpack --config config/webpack.nonmin.js --env travis --progress --profile --bail",
|
|
33
33
|
"build.dev": "webpack --config config/webpack.dev.js --progress --profile --bail",
|
|
34
34
|
"watch": "webpack --config config/webpack.nonmin.js --watch",
|
|
35
35
|
"debug": "webpack-dev-server --config config/webpack.dev.js --progress",
|
|
@@ -55,37 +55,38 @@
|
|
|
55
55
|
"node": ">= 0.8.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@babel/core": "^7.
|
|
59
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
60
|
-
"@babel/preset-env": "^7.
|
|
61
|
-
"@babel/runtime": "^7.
|
|
62
|
-
"
|
|
63
|
-
"
|
|
58
|
+
"@babel/core": "^7.20.12",
|
|
59
|
+
"@babel/plugin-transform-runtime": "^7.19.6",
|
|
60
|
+
"@babel/preset-env": "^7.20.2",
|
|
61
|
+
"@babel/runtime": "^7.20.13",
|
|
62
|
+
"@webpack-cli/serve": "^2.0.1",
|
|
63
|
+
"ace-builds": "^1.15.0",
|
|
64
|
+
"babel-loader": "^8.3.0",
|
|
64
65
|
"clean-webpack-plugin": "^3.0.0",
|
|
65
66
|
"cleave.js": "^1.6.0",
|
|
66
|
-
"codeceptjs": "^
|
|
67
|
+
"codeceptjs": "^3.3.7",
|
|
67
68
|
"css-loader": "^3.6.0",
|
|
68
69
|
"css2json": "^1.1.1",
|
|
69
70
|
"cssnano": "^4.1.11",
|
|
70
71
|
"eslint": "^6.8.0",
|
|
71
72
|
"eslint-loader": "^2.2.1",
|
|
72
73
|
"fast-deep-equal": "^3.1.3",
|
|
73
|
-
"http-server": "^
|
|
74
|
-
"jasmine": "^3.
|
|
75
|
-
"jasmine-core": "^3.
|
|
76
|
-
"jodit": "^3.
|
|
77
|
-
"jquery": "^3.6.
|
|
78
|
-
"karma": "^6.
|
|
79
|
-
"karma-chrome-launcher": "^3.1.
|
|
74
|
+
"http-server": "^14.1.1",
|
|
75
|
+
"jasmine": "^3.99.0",
|
|
76
|
+
"jasmine-core": "^3.99.1",
|
|
77
|
+
"jodit": "^3.24.4",
|
|
78
|
+
"jquery": "^3.6.3",
|
|
79
|
+
"karma": "^6.4.1",
|
|
80
|
+
"karma-chrome-launcher": "^3.1.1",
|
|
80
81
|
"karma-jasmine": "^2.0.1",
|
|
81
|
-
"karma-jasmine-html-reporter": "^1.
|
|
82
|
+
"karma-jasmine-html-reporter": "^1.7.0",
|
|
82
83
|
"karma-sourcemap-loader": "^0.3.8",
|
|
83
|
-
"karma-webpack": "^
|
|
84
|
+
"karma-webpack": "^5.0.0",
|
|
84
85
|
"mathjs": "^7.5.1",
|
|
85
86
|
"mini-css-extract-plugin": "^0.8.2",
|
|
86
|
-
"mocha": "^
|
|
87
|
+
"mocha": "^10.2.0",
|
|
87
88
|
"mochawesome": "^4.1.0",
|
|
88
|
-
"postcss-loader": "^5.
|
|
89
|
+
"postcss-loader": "^5.3.0",
|
|
89
90
|
"puppeteer": "^1.20.0",
|
|
90
91
|
"remove-strict-webpack-plugin": "^0.1.2",
|
|
91
92
|
"sceditor": "^2.1.3",
|
|
@@ -93,12 +94,13 @@
|
|
|
93
94
|
"sinon": "^8.1.1",
|
|
94
95
|
"standard": "^14.3.4",
|
|
95
96
|
"style-loader": "^1.3.0",
|
|
96
|
-
"
|
|
97
|
-
"webpack
|
|
98
|
-
"webpack-
|
|
97
|
+
"webdriverio": "^6.12.1",
|
|
98
|
+
"webpack": "^5.75.0",
|
|
99
|
+
"webpack-cli": "^5.0.1",
|
|
100
|
+
"webpack-dev-server": "^4.11.1",
|
|
99
101
|
"webpack-merge": "^4.2.2"
|
|
100
102
|
},
|
|
101
103
|
"dependencies": {
|
|
102
|
-
"core-js": "^3.
|
|
104
|
+
"core-js": "^3.27.2"
|
|
103
105
|
}
|
|
104
106
|
}
|
package/src/editors/integer.js
CHANGED
|
@@ -10,10 +10,12 @@ export class IntegerEditor extends NumberEditor {
|
|
|
10
10
|
if (!this.dependenciesFulfilled) {
|
|
11
11
|
return undefined
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
if (!this.jsoneditor.options.use_default_values && value === '') {
|
|
13
|
+
|
|
14
|
+
if (!this.schema.default && !this.jsoneditor.options.use_default_values && this.value === '') {
|
|
15
|
+
this.input.value = ''
|
|
15
16
|
return undefined
|
|
17
|
+
} else {
|
|
18
|
+
return isInteger(this.value) ? parseInt(this.value) : this.value
|
|
16
19
|
}
|
|
17
|
-
return value
|
|
18
20
|
}
|
|
19
21
|
}
|
package/src/editors/multiple.js
CHANGED
|
@@ -290,7 +290,9 @@ export class MultipleEditor extends AbstractEditor {
|
|
|
290
290
|
this.switchEditor(this.type)
|
|
291
291
|
}
|
|
292
292
|
|
|
293
|
-
|
|
293
|
+
if (typeof val !== 'undefined') {
|
|
294
|
+
this.editors[this.type].setValue(val, initial)
|
|
295
|
+
}
|
|
294
296
|
|
|
295
297
|
this.refreshValue()
|
|
296
298
|
this.onChange(typeChanged)
|
package/src/editors/number.js
CHANGED
|
@@ -42,10 +42,12 @@ export class NumberEditor extends StringEditor {
|
|
|
42
42
|
if (!this.dependenciesFulfilled) {
|
|
43
43
|
return undefined
|
|
44
44
|
}
|
|
45
|
-
|
|
46
|
-
if (!this.jsoneditor.options.use_default_values && value === '') {
|
|
45
|
+
|
|
46
|
+
if (!this.schema.default && !this.jsoneditor.options.use_default_values && this.value === '') {
|
|
47
|
+
this.input.value = ''
|
|
47
48
|
return undefined
|
|
49
|
+
} else {
|
|
50
|
+
return isNumber(this.value) ? parseFloat(this.value) : this.value
|
|
48
51
|
}
|
|
49
|
-
return value
|
|
50
52
|
}
|
|
51
53
|
}
|
package/src/editors/radio.js
CHANGED
|
@@ -21,12 +21,6 @@ export class RadioEditor extends SelectEditor {
|
|
|
21
21
|
this.onChange(true)
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
if (!this.isRequired()) {
|
|
25
|
-
this.enum_display.shift()
|
|
26
|
-
this.enum_options.shift()
|
|
27
|
-
this.enum_values.shift()
|
|
28
|
-
}
|
|
29
|
-
|
|
30
24
|
for (let i = 0; i < this.enum_values.length; i++) {
|
|
31
25
|
/* form radio elements */
|
|
32
26
|
const attributes = {
|
|
@@ -109,6 +103,10 @@ export class RadioEditor extends SelectEditor {
|
|
|
109
103
|
}
|
|
110
104
|
|
|
111
105
|
setValue (val) {
|
|
106
|
+
if (typeof val !== 'string') {
|
|
107
|
+
val = String(val)
|
|
108
|
+
}
|
|
109
|
+
|
|
112
110
|
for (let i = 0; i < this.radioGroup.length; i++) {
|
|
113
111
|
if (this.radioGroup[i].value === val) {
|
|
114
112
|
this.radioGroup[i].checked = true
|
package/src/editors/select.js
CHANGED
|
@@ -82,12 +82,6 @@ export class SelectEditor extends AbstractEditor {
|
|
|
82
82
|
this.enum_display[i] = `${this.translateProperty(display[i]) || option}`
|
|
83
83
|
this.enum_values[i] = this.typecast(option)
|
|
84
84
|
})
|
|
85
|
-
|
|
86
|
-
if (!this.isRequired()) {
|
|
87
|
-
this.enum_display.unshift(' ')
|
|
88
|
-
this.enum_options.unshift('undefined')
|
|
89
|
-
this.enum_values.unshift(undefined)
|
|
90
|
-
}
|
|
91
85
|
/* Boolean */
|
|
92
86
|
} else if (this.schema.type === 'boolean') {
|
|
93
87
|
this.enum_display = (this.schema.options && this.schema.options.enum_titles) || ['true', 'false']
|
|
@@ -5,7 +5,7 @@ const { DEFAULT_WAIT_TIME } = require('./test-config')
|
|
|
5
5
|
|
|
6
6
|
Feature('core')
|
|
7
7
|
|
|
8
|
-
Scenario('should set per-editor options @per-editor-options', async (I) => {
|
|
8
|
+
Scenario('should set per-editor options @per-editor-options', async ({ I }) => {
|
|
9
9
|
I.amOnPage('per-editor-options.html')
|
|
10
10
|
I.waitForElement('.je-ready')
|
|
11
11
|
I.waitForElement('[title="Expand"]')
|
|
@@ -13,7 +13,7 @@ Scenario('should set per-editor options @per-editor-options', async (I) => {
|
|
|
13
13
|
I.dontSeeElement('.card')
|
|
14
14
|
})
|
|
15
15
|
|
|
16
|
-
Scenario('should set container attributes @container-attributes', async (I) => {
|
|
16
|
+
Scenario('should set container attributes @container-attributes', async ({ I }) => {
|
|
17
17
|
I.amOnPage('container-attributes.html')
|
|
18
18
|
I.waitForElement('.je-ready')
|
|
19
19
|
I.waitForElement('.container-class')
|
|
@@ -22,18 +22,18 @@ Scenario('should set container attributes @container-attributes', async (I) => {
|
|
|
22
22
|
I.dontSeeElement('[data-schemaid="blank"]')
|
|
23
23
|
})
|
|
24
24
|
|
|
25
|
-
Scenario('should not set inputs name attributes @use-name-attributes', async (I) => {
|
|
25
|
+
Scenario('should not set inputs name attributes @use-name-attributes', async ({ I }) => {
|
|
26
26
|
I.amOnPage('use-name-attributes.html')
|
|
27
27
|
I.waitForElement('.je-ready')
|
|
28
28
|
I.dontSeeElement('[name]')
|
|
29
29
|
})
|
|
30
30
|
|
|
31
|
-
Scenario('should have class je-ready when ready @core @ready', async (I) => {
|
|
31
|
+
Scenario('should have class je-ready when ready @core @ready', async ({ I }) => {
|
|
32
32
|
I.amOnPage('ready.html')
|
|
33
33
|
I.waitForElement('.je-ready')
|
|
34
34
|
})
|
|
35
35
|
|
|
36
|
-
Scenario('should Disable and enable entire form', async (I) => {
|
|
36
|
+
Scenario('should Disable and enable entire form', async ({ I }) => {
|
|
37
37
|
I.amOnPage('core.html')
|
|
38
38
|
I.seeElement('[data-schemapath="root.name"] input')
|
|
39
39
|
I.seeElement('[data-schemapath="root.age"] input')
|
|
@@ -45,7 +45,7 @@ Scenario('should Disable and enable entire form', async (I) => {
|
|
|
45
45
|
I.seeElement('[data-schemapath="root.name"] input:not(:disabled)')
|
|
46
46
|
})
|
|
47
47
|
|
|
48
|
-
Scenario('should Disable and enable part of the form', async (I) => {
|
|
48
|
+
Scenario('should Disable and enable part of the form', async ({ I }) => {
|
|
49
49
|
I.amOnPage('core.html')
|
|
50
50
|
I.seeElement('[data-schemapath="root.name"] input')
|
|
51
51
|
I.seeElement('[data-schemapath="root.age"] input')
|
|
@@ -55,14 +55,14 @@ Scenario('should Disable and enable part of the form', async (I) => {
|
|
|
55
55
|
I.seeElement('[data-schemapath="root.name"] input:not(:disabled)')
|
|
56
56
|
})
|
|
57
57
|
|
|
58
|
-
Scenario('should destroy', async (I) => {
|
|
58
|
+
Scenario('should destroy', async ({ I }) => {
|
|
59
59
|
I.amOnPage('core.html')
|
|
60
60
|
I.seeElement('[data-schemapath="root"]')
|
|
61
61
|
I.click('destroy')
|
|
62
62
|
I.dontSeeElement('[data-schemapath="root"]')
|
|
63
63
|
})
|
|
64
64
|
|
|
65
|
-
Scenario('should set and get form value', async (I) => {
|
|
65
|
+
Scenario('should set and get form value', async ({ I }) => {
|
|
66
66
|
I.amOnPage('core.html')
|
|
67
67
|
I.click('.get-value')
|
|
68
68
|
assert.equal(await I.grabValueFrom('.value'), '{"age":18,"name":"Francesco Avizzano"}')
|
|
@@ -71,7 +71,7 @@ Scenario('should set and get form value', async (I) => {
|
|
|
71
71
|
assert.equal(await I.grabValueFrom('.value'), '{"age":40,"name":"John Smith"}')
|
|
72
72
|
})
|
|
73
73
|
|
|
74
|
-
Scenario('should set and get individual values', async (I) => {
|
|
74
|
+
Scenario('should set and get individual values', async ({ I }) => {
|
|
75
75
|
I.amOnPage('core.html')
|
|
76
76
|
I.click('.get-individual-value')
|
|
77
77
|
assert.equal(await I.grabValueFrom('.value'), '"Francesco Avizzano"')
|
|
@@ -79,21 +79,21 @@ Scenario('should set and get individual values', async (I) => {
|
|
|
79
79
|
assert.equal(await I.grabValueFrom('.value'), '"john kaminski"')
|
|
80
80
|
})
|
|
81
81
|
|
|
82
|
-
Scenario('should watch a specific field for changes', async (I) => {
|
|
82
|
+
Scenario('should watch a specific field for changes', async ({ I }) => {
|
|
83
83
|
I.amOnPage('core.html')
|
|
84
84
|
I.dontSeeElement('.name-changed')
|
|
85
85
|
I.click('.set-individual-value')
|
|
86
86
|
I.seeElement('.name-changed')
|
|
87
87
|
})
|
|
88
88
|
|
|
89
|
-
Scenario('should watch form for changes', async (I) => {
|
|
89
|
+
Scenario('should watch form for changes', async ({ I }) => {
|
|
90
90
|
I.amOnPage('core.html')
|
|
91
91
|
I.dontSeeElement('.form-changed')
|
|
92
92
|
I.click('.set-value')
|
|
93
93
|
I.seeElement('.form-changed')
|
|
94
94
|
})
|
|
95
95
|
|
|
96
|
-
Scenario('should change the form if form_name_root option is set @core', async (I) => {
|
|
96
|
+
Scenario('should change the form if form_name_root option is set @core', async ({ I }) => {
|
|
97
97
|
I.amOnPage('form-name.html')
|
|
98
98
|
I.see('Property must be set.', '.invalid-feedback')
|
|
99
99
|
I.seeElement('[data-schemapath="form_1"]')
|
|
@@ -121,7 +121,7 @@ Scenario('should change the form if form_name_root option is set @core', async (
|
|
|
121
121
|
assert.equal(await I.grabValueFrom('#value-form-2'), '"no"')
|
|
122
122
|
})
|
|
123
123
|
|
|
124
|
-
Scenario('should validate against oneOf schemas and display single oneOf and editors error messages @core @oneof', async (I) => {
|
|
124
|
+
Scenario('should validate against oneOf schemas and display single oneOf and editors error messages @core @oneof', async ({ I }) => {
|
|
125
125
|
I.amOnPage('oneof.html')
|
|
126
126
|
I.waitForElement('.je-ready')
|
|
127
127
|
I.waitForText('Object is missing the required property \'p4\'', DEFAULT_WAIT_TIME, '.alert-danger')
|
|
@@ -152,7 +152,7 @@ Scenario('should validate against oneOf schemas and display single oneOf and edi
|
|
|
152
152
|
I.dontSee('Value must be at least 4 characters long.', '[data-schemapath="root.p5.p2"] .invalid-feedback')
|
|
153
153
|
})
|
|
154
154
|
|
|
155
|
-
Scenario('should validate against anyOf schemas and display single anyOf and editors error messages @core @anyof', async (I) => {
|
|
155
|
+
Scenario('should validate against anyOf schemas and display single anyOf and editors error messages @core @anyof', async ({ I }) => {
|
|
156
156
|
I.amOnPage('anyof.html')
|
|
157
157
|
I.waitForElement('.je-ready')
|
|
158
158
|
I.waitForElement('.alert-danger')
|
|
@@ -170,14 +170,14 @@ Scenario('should validate against anyOf schemas and display single anyOf and edi
|
|
|
170
170
|
I.dontSee('Property must be set.', '[data-schemapath="root.age"] .invalid-feedback')
|
|
171
171
|
})
|
|
172
172
|
|
|
173
|
-
Scenario('should display anyOf and oneOf error messages in the correct places @848', async (I) => {
|
|
173
|
+
Scenario('should display anyOf and oneOf error messages in the correct places @848', async ({ I }) => {
|
|
174
174
|
I.amOnPage('issues/issue-gh-848.html')
|
|
175
175
|
I.selectOption('.je-switcher', 'Value, string')
|
|
176
176
|
I.waitForElement('[data-schemapath="root.list"] .invalid-feedback', DEFAULT_WAIT_TIME)
|
|
177
177
|
I.dontSeeElement('[data-schemapath="root.list_group"] .invalid-feedback', DEFAULT_WAIT_TIME)
|
|
178
178
|
})
|
|
179
179
|
|
|
180
|
-
Scenario('Should switch between all json 7 data types in @oneof and display error messages for each one @core', async (I) => {
|
|
180
|
+
Scenario('Should switch between all json 7 data types in @oneof and display error messages for each one @core', async ({ I }) => {
|
|
181
181
|
I.amOnPage('oneof-2.html')
|
|
182
182
|
I.waitForElement('.je-ready')
|
|
183
183
|
|
|
@@ -216,7 +216,7 @@ Scenario('Should switch between all json 7 data types in @oneof and display erro
|
|
|
216
216
|
assert.equal(await I.grabValueFrom('#value'), '{"test":null}')
|
|
217
217
|
})
|
|
218
218
|
|
|
219
|
-
Scenario('Should switch between all json 7 data types in @anyof and display error messages for each one @core', async (I) => {
|
|
219
|
+
Scenario('Should switch between all json 7 data types in @anyof and display error messages for each one @core', async ({ I }) => {
|
|
220
220
|
I.amOnPage('anyof-2.html')
|
|
221
221
|
I.waitForElement('.je-ready')
|
|
222
222
|
|
|
@@ -247,7 +247,7 @@ Scenario('Should switch between all json 7 data types in @anyof and display erro
|
|
|
247
247
|
assert.equal(await I.grabValueFrom('#value'), '{"test":null}')
|
|
248
248
|
})
|
|
249
249
|
|
|
250
|
-
Scenario('should validate against oneOf schemas and display single oneOf and editors error messages @core @translate-property', async (I) => {
|
|
250
|
+
Scenario('should validate against oneOf schemas and display single oneOf and editors error messages @core @translate-property', async ({ I }) => {
|
|
251
251
|
I.amOnPage('translate-property.html?lang=en')
|
|
252
252
|
I.waitForText('Object Title')
|
|
253
253
|
I.waitForText('Object Description')
|
|
@@ -317,7 +317,7 @@ Scenario('should validate against oneOf schemas and display single oneOf and edi
|
|
|
317
317
|
I.seeInSource('Rating Info Text (but in german)')
|
|
318
318
|
})
|
|
319
319
|
|
|
320
|
-
Scenario('should load internal schema definitions, external schema definitions and external schema properties @core @references', async (I) => {
|
|
320
|
+
Scenario('should load internal schema definitions, external schema definitions and external schema properties @core @references', async ({ I }) => {
|
|
321
321
|
I.amOnPage('references.html')
|
|
322
322
|
I.waitForText('References JSON Editor Example')
|
|
323
323
|
|
|
@@ -360,7 +360,7 @@ Scenario('should load internal schema definitions, external schema definitions a
|
|
|
360
360
|
}
|
|
361
361
|
})
|
|
362
362
|
|
|
363
|
-
Scenario('should override error messages if specified in schema options @core @errors-messages', async (I) => {
|
|
363
|
+
Scenario('should override error messages if specified in schema options @core @errors-messages', async ({ I }) => {
|
|
364
364
|
I.amOnPage('error-messages.html')
|
|
365
365
|
I.waitForText('Error Messages')
|
|
366
366
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
Feature('Advanced Editor');
|
|
3
3
|
|
|
4
|
-
Scenario('test validation & delete', (I) => {
|
|
4
|
+
Scenario('test validation & delete', ({ I }) => {
|
|
5
5
|
I.amOnPage('advanced.html');
|
|
6
6
|
I.retry({ retries: 5, minTimeout: 500 }).seeElement('#valid_indicator');
|
|
7
7
|
I.see('valid', '#valid_indicator');
|
|
@@ -2,13 +2,13 @@ var assert = require('assert');
|
|
|
2
2
|
|
|
3
3
|
Feature('anyof in array');
|
|
4
4
|
|
|
5
|
-
Scenario('should have correct initial value', async (I) => {
|
|
5
|
+
Scenario('should have correct initial value', async ({ I }) => {
|
|
6
6
|
I.amOnPage('array-anyof.html');
|
|
7
7
|
I.click('.get-value');
|
|
8
8
|
assert.equal(await I.grabValueFrom('.debug'), '{"correct":"","items":[]}');
|
|
9
9
|
});
|
|
10
10
|
|
|
11
|
-
Scenario('should show errors @optional', async (I) => {
|
|
11
|
+
Scenario('should show errors @optional', async ({ I }) => {
|
|
12
12
|
I.amOnPage('array-anyof.html');
|
|
13
13
|
I.seeElement('[data-schemapath="root"]');
|
|
14
14
|
I.seeElement('[data-schemapath="root.items"]');
|
|
@@ -5,13 +5,13 @@ const { DEFAULT_WAIT_TIME } = require('../test-config')
|
|
|
5
5
|
|
|
6
6
|
Feature('array');
|
|
7
7
|
|
|
8
|
-
Scenario('should have correct initial value', async (I) => {
|
|
8
|
+
Scenario('should have correct initial value', async ({ I }) => {
|
|
9
9
|
I.amOnPage('array.html');
|
|
10
10
|
I.click('.get-value');
|
|
11
11
|
assert.equal(await I.grabValueFrom('.debug'), '[]');
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
-
Scenario('unique items arrays sorting @unique-itmes-sorting', async (I) => {
|
|
14
|
+
Scenario('unique items arrays sorting @unique-itmes-sorting', async ({ I }) => {
|
|
15
15
|
I.amOnPage('array-unique-items-sort.html')
|
|
16
16
|
I.waitForElement('.je-ready', DEFAULT_WAIT_TIME)
|
|
17
17
|
I.click('[data-schemapath="root.items"] .form-control:nth-of-type(1)')
|
|
@@ -61,7 +61,7 @@ Scenario('unique items arrays sorting @unique-itmes-sorting', async (I) => {
|
|
|
61
61
|
assert.equal(await I.grabValueFrom('.debug'), '{"items":["01","02","03","04","05","06","07","08","09","10","11","12","13","14","15"]}')
|
|
62
62
|
});
|
|
63
63
|
|
|
64
|
-
Scenario('should array editor events (table) @array-events', async (I) => {
|
|
64
|
+
Scenario('should array editor events (table) @array-events', async ({ I }) => {
|
|
65
65
|
I.amOnPage('array-events-table.html');
|
|
66
66
|
I.seeElement('[data-schemapath="root.0"]');
|
|
67
67
|
I.seeElement('[data-schemapath="root.1"]');
|
|
@@ -133,7 +133,7 @@ Scenario('should array editor events (table) @array-events', async (I) => {
|
|
|
133
133
|
assert.equal(value, '[]');
|
|
134
134
|
});
|
|
135
135
|
|
|
136
|
-
Scenario('should array editor events @array-events', async (I) => {
|
|
136
|
+
Scenario('should array editor events @array-events', async ({ I }) => {
|
|
137
137
|
I.amOnPage('array-events.html');
|
|
138
138
|
I.seeElement('[data-schemapath="root.0"]');
|
|
139
139
|
I.seeElement('[data-schemapath="root.1"]');
|
|
@@ -172,7 +172,7 @@ Scenario('should array editor events @array-events', async (I) => {
|
|
|
172
172
|
assert.equal(await I.grabValueFrom('.debug'), '[]');
|
|
173
173
|
});
|
|
174
174
|
|
|
175
|
-
Scenario('should work well with string editors', async (I) => {
|
|
175
|
+
Scenario('should work well with string editors', async ({ I }) => {
|
|
176
176
|
I.amOnPage('array-strings.html');
|
|
177
177
|
I.click('Add String');
|
|
178
178
|
I.click('Add String');
|
|
@@ -245,7 +245,7 @@ Scenario('should work well with string editors', async (I) => {
|
|
|
245
245
|
I.dontSee('String 3');
|
|
246
246
|
});
|
|
247
247
|
|
|
248
|
-
Scenario('should work well with number editors', async (I) => {
|
|
248
|
+
Scenario('should work well with number editors', async ({ I }) => {
|
|
249
249
|
I.amOnPage('array-numbers.html');
|
|
250
250
|
I.click('Add Number');
|
|
251
251
|
I.click('Add Number');
|
|
@@ -318,7 +318,7 @@ Scenario('should work well with number editors', async (I) => {
|
|
|
318
318
|
I.dontSee('Number 3');
|
|
319
319
|
});
|
|
320
320
|
|
|
321
|
-
Scenario('should work well with integer editors', async (I) => {
|
|
321
|
+
Scenario('should work well with integer editors', async ({ I }) => {
|
|
322
322
|
I.amOnPage('array-integers.html');
|
|
323
323
|
I.click('Add Integer');
|
|
324
324
|
I.click('Add Integer');
|
|
@@ -391,7 +391,7 @@ Scenario('should work well with integer editors', async (I) => {
|
|
|
391
391
|
I.dontSee('Integer 3');
|
|
392
392
|
});
|
|
393
393
|
|
|
394
|
-
Scenario('should work well with select editors', async (I) => {
|
|
394
|
+
Scenario('should work well with select editors', async ({ I }) => {
|
|
395
395
|
I.amOnPage('array-selects.html');
|
|
396
396
|
I.click('Add Select');
|
|
397
397
|
I.click('Add Select');
|
|
@@ -456,7 +456,7 @@ Scenario('should work well with select editors', async (I) => {
|
|
|
456
456
|
I.dontSee('Select 3');
|
|
457
457
|
});
|
|
458
458
|
|
|
459
|
-
Scenario('should work well with checkbox editors', async (I) => {
|
|
459
|
+
Scenario('should work well with checkbox editors', async ({ I }) => {
|
|
460
460
|
I.amOnPage('array-checkboxes.html');
|
|
461
461
|
I.click('Add Checkbox');
|
|
462
462
|
I.click('Add Checkbox');
|
|
@@ -529,7 +529,7 @@ Scenario('should work well with checkbox editors', async (I) => {
|
|
|
529
529
|
I.dontSee('Checkbox 3');
|
|
530
530
|
});
|
|
531
531
|
|
|
532
|
-
Scenario('should work well with checkbox editors with infoText', async (I) => {
|
|
532
|
+
Scenario('should work well with checkbox editors with infoText', async ({ I }) => {
|
|
533
533
|
I.amOnPage('array-checkboxes-infotext.html')
|
|
534
534
|
|
|
535
535
|
function check (checkboxId, title, infoText) {
|
|
@@ -553,7 +553,7 @@ Scenario('should work well with checkbox editors with infoText', async (I) => {
|
|
|
553
553
|
check('root4', 'e', 'ee')
|
|
554
554
|
})
|
|
555
555
|
|
|
556
|
-
Scenario('should work well with rating editors', async (I) => {
|
|
556
|
+
Scenario('should work well with rating editors', async ({ I }) => {
|
|
557
557
|
I.amOnPage('array-ratings.html');
|
|
558
558
|
I.seeElement('[data-schemapath="root.0"]');
|
|
559
559
|
I.seeElement('[data-schemapath="root.1"]');
|
|
@@ -616,7 +616,7 @@ Scenario('should work well with rating editors', async (I) => {
|
|
|
616
616
|
I.dontSee('Rating 3');
|
|
617
617
|
});
|
|
618
618
|
|
|
619
|
-
Scenario('should work well with multiselect editors', async (I) => {
|
|
619
|
+
Scenario('should work well with multiselect editors', async ({ I }) => {
|
|
620
620
|
I.amOnPage('array-multiselects.html');
|
|
621
621
|
I.click('Add Multiselect');
|
|
622
622
|
I.click('Add Multiselect');
|
|
@@ -688,7 +688,7 @@ Scenario('should work well with multiselect editors', async (I) => {
|
|
|
688
688
|
I.dontSee('Multiselect 3');
|
|
689
689
|
});
|
|
690
690
|
|
|
691
|
-
Scenario('should work well with object editors', async (I) => {
|
|
691
|
+
Scenario('should work well with object editors', async ({ I }) => {
|
|
692
692
|
I.amOnPage('array-objects.html');
|
|
693
693
|
I.click('Add Object');
|
|
694
694
|
I.click('Add Object');
|
|
@@ -761,7 +761,7 @@ Scenario('should work well with object editors', async (I) => {
|
|
|
761
761
|
I.dontSee('Object 3');
|
|
762
762
|
});
|
|
763
763
|
|
|
764
|
-
Scenario('should work well with nested array editors', async (I) => {
|
|
764
|
+
Scenario('should work well with nested array editors', async ({ I }) => {
|
|
765
765
|
I.amOnPage('array-nested-arrays.html');
|
|
766
766
|
I.click('Add Array');
|
|
767
767
|
I.click('Add Array');
|
|
@@ -947,7 +947,7 @@ Scenario('should work well with nested array editors', async (I) => {
|
|
|
947
947
|
assert.equal(await I.grabValueFrom('.debug'), '[[],[],[],[],[]]');
|
|
948
948
|
});
|
|
949
949
|
|
|
950
|
-
Scenario('should work well with selectize multiselect editors', async (I) => {
|
|
950
|
+
Scenario('should work well with selectize multiselect editors', async ({ I }) => {
|
|
951
951
|
I.amOnPage('array-selectize.html');
|
|
952
952
|
I.click('Add item');
|
|
953
953
|
await I.seeElement('[data-schemapath="root.0"]');
|
|
@@ -4,12 +4,12 @@ var assert = require('assert')
|
|
|
4
4
|
|
|
5
5
|
Feature('autocomplete')
|
|
6
6
|
|
|
7
|
-
Scenario('autocomplete should work @autocomplete', async (I) => {
|
|
7
|
+
Scenario('autocomplete should work @autocomplete', async ({ I }) => {
|
|
8
8
|
I.amOnPage('autocomplete.html')
|
|
9
9
|
I.waitForElement('.je-ready', 10)
|
|
10
10
|
I.fillField('root', 'ir')
|
|
11
|
-
I.waitForText('iran',
|
|
12
|
-
I.waitForText('iraq',
|
|
11
|
+
I.waitForText('iran', 20, '.autocomplete-result-list')
|
|
12
|
+
I.waitForText('iraq', 20, '.autocomplete-result-list')
|
|
13
13
|
I.click('iraq', '.autocomplete-result:nth-child(2)')
|
|
14
14
|
I.wait(1)
|
|
15
15
|
assert.equal(await I.grabValueFrom('.value'), '"iraq"')
|
|
@@ -3,7 +3,7 @@ const { DEFAULT_WAIT_TIME } = require('../test-config')
|
|
|
3
3
|
|
|
4
4
|
Feature('button');
|
|
5
5
|
|
|
6
|
-
Scenario('should work with button editor callbacks', async (I) => {
|
|
6
|
+
Scenario('should work with button editor callbacks', async ({ I }) => {
|
|
7
7
|
I.amOnPage('button-callbacks.html');
|
|
8
8
|
I.waitForElement('.je-ready', DEFAULT_WAIT_TIME)
|
|
9
9
|
I.seeElement('[data-schemapath="root.button1"] button');
|
|
@@ -11,7 +11,7 @@ Scenario('should work with button editor callbacks', async (I) => {
|
|
|
11
11
|
assert.equal(await I.grabValueFrom('.value'), 'button1CB');
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
-
Scenario('should work with option "validated"', async (I) => {
|
|
14
|
+
Scenario('should work with option "validated" @validated', async ({ I }) => {
|
|
15
15
|
I.amOnPage('button-callbacks.html');
|
|
16
16
|
I.waitForElement('.je-ready', DEFAULT_WAIT_TIME)
|
|
17
17
|
I.seeElement('[data-schemapath="root.button1"] button');
|
|
@@ -23,20 +23,20 @@ Scenario('should work with option "validated"', async (I) => {
|
|
|
23
23
|
assert.equal(await I.grabValueFrom('.value'), 'button2CB');
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
-
Scenario('should not leave any footprints in result', async (I) => {
|
|
26
|
+
Scenario('should not leave any footprints in result', async ({ I }) => {
|
|
27
27
|
I.amOnPage('button-callbacks.html');
|
|
28
28
|
I.waitForElement('.je-ready', DEFAULT_WAIT_TIME)
|
|
29
29
|
I.click('.get-value');
|
|
30
30
|
assert.equal(await I.grabValueFrom('.value'), JSON.stringify({"textinput":""}));
|
|
31
31
|
});
|
|
32
32
|
|
|
33
|
-
Scenario('should be disabled if "readonly" is specified', async (I) => {
|
|
33
|
+
Scenario('should be disabled if "readonly" is specified', async ({ I }) => {
|
|
34
34
|
I.amOnPage('read-only.html');
|
|
35
35
|
I.waitForElement('.je-ready', DEFAULT_WAIT_TIME)
|
|
36
36
|
I.seeDisabledAttribute('[data-schemapath="root.button"] button');
|
|
37
37
|
});
|
|
38
38
|
|
|
39
|
-
Scenario('should set icon @button @button-icon', async (I) => {
|
|
39
|
+
Scenario('should set icon @button @button-icon', async ({ I }) => {
|
|
40
40
|
I.amOnPage('button-icons.html')
|
|
41
41
|
I.waitForElement('.je-ready', DEFAULT_WAIT_TIME)
|
|
42
42
|
I.waitForElement('i.fas.fa-search', DEFAULT_WAIT_TIME)
|
|
@@ -3,13 +3,13 @@ const { DEFAULT_WAIT_TIME } = require('../test-config')
|
|
|
3
3
|
|
|
4
4
|
Feature('checkbox');
|
|
5
5
|
|
|
6
|
-
Scenario('should be disabled if "readonly" is specified', async (I) => {
|
|
6
|
+
Scenario('should be disabled if "readonly" is specified', async ({ I }) => {
|
|
7
7
|
I.amOnPage('read-only.html');
|
|
8
8
|
I.waitForText('READY', DEFAULT_WAIT_TIME, '.state');
|
|
9
9
|
I.seeDisabledAttribute('[name="root[checkbox]"]');
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
Scenario('label should be visible for items at top level, but not in tables', async (I) => {
|
|
12
|
+
Scenario('label should be visible for items at top level, but not in tables', async ({ I }) => {
|
|
13
13
|
I.amOnPage('checkbox-labels.html');
|
|
14
14
|
I.waitForText('READY', DEFAULT_WAIT_TIME, '.state');
|
|
15
15
|
I.seeElement('//label[contains(@for, "root[Awesome Compact]")]');
|
|
@@ -2,14 +2,14 @@ var assert = require('assert');
|
|
|
2
2
|
|
|
3
3
|
Feature('colorpicker');
|
|
4
4
|
|
|
5
|
-
Scenario('test ColorPicker Editor without third party library', async (I) => {
|
|
5
|
+
Scenario('test ColorPicker Editor without third party library', async ({ I }) => {
|
|
6
6
|
I.amOnPage('colorpicker-no-3rd-party.html');
|
|
7
7
|
I.seeElement('[name="root[colorpicker]');
|
|
8
8
|
I.click('.get-value');
|
|
9
9
|
assert.equal(await I.grabValueFrom('.debug'), JSON.stringify({"colorpicker":"#efefef"}));
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
Scenario('test ColorPicker Editor using vanilla-picker', async (I) => {
|
|
12
|
+
Scenario('test ColorPicker Editor using vanilla-picker', async ({ I }) => {
|
|
13
13
|
I.amOnPage('colorpicker-use-vanilla-picker.html');
|
|
14
14
|
I.click('.get-value');
|
|
15
15
|
assert.equal(await I.grabValueFrom('.debug'), JSON.stringify({"colorpicker":"rgba(0,0,0,1)"}));
|