@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.
Files changed (60) hide show
  1. package/.github/workflows/build.yml +2 -0
  2. package/CHANGELOG.md +11 -7
  3. package/config/codeceptjs_helpers.js +4 -8
  4. package/config/karma.conf.js +0 -4
  5. package/config/webpack.common.js +1 -1
  6. package/config/webpack.dev.js +1 -1
  7. package/config/webpack.nonmin.js +1 -1
  8. package/config/webpack.prod.js +0 -1
  9. package/dist/dev/jsoneditor.js +3687 -0
  10. package/dist/jsoneditor.js +2 -14
  11. package/dist/jsoneditor.js.LICENSE.txt +1 -1
  12. package/dist/jsoneditor.js.map +1 -1
  13. package/dist/nonmin/jsoneditor.js +25354 -26381
  14. package/dist/nonmin/jsoneditor.js.map +1 -1
  15. package/docs/datetime.html +37 -2
  16. package/package.json +26 -24
  17. package/src/editors/integer.js +5 -3
  18. package/src/editors/multiple.js +3 -1
  19. package/src/editors/number.js +5 -3
  20. package/src/editors/radio.js +4 -6
  21. package/src/editors/select.js +0 -6
  22. package/tests/codeceptjs/core_test.js +20 -20
  23. package/tests/codeceptjs/editors/advanced_test.js +1 -1
  24. package/tests/codeceptjs/editors/array_any_of_test.js +2 -2
  25. package/tests/codeceptjs/editors/array_test.js +15 -15
  26. package/tests/codeceptjs/editors/autocomplete_test.js +3 -3
  27. package/tests/codeceptjs/editors/button_test.js +5 -5
  28. package/tests/codeceptjs/editors/checkbox_test.js +2 -2
  29. package/tests/codeceptjs/editors/colorpicker_test.js +2 -2
  30. package/tests/codeceptjs/editors/datetime_test.js +4 -4
  31. package/tests/codeceptjs/editors/inheritance_test.js +1 -1
  32. package/tests/codeceptjs/editors/integer_test.js +6 -6
  33. package/tests/codeceptjs/editors/issues/issue-gh-1133_test.js +11 -0
  34. package/tests/codeceptjs/editors/issues/issue-gh-1158_test.js +1 -1
  35. package/tests/codeceptjs/editors/issues/issue-gh-1164_test.js +12 -0
  36. package/tests/codeceptjs/editors/issues/issue-gh-1257_test.js +1 -1
  37. package/tests/codeceptjs/editors/issues/issue-gh-812_test.js +1 -1
  38. package/tests/codeceptjs/editors/jodit_test.js +2 -2
  39. package/tests/codeceptjs/editors/multiselect_test.js +1 -1
  40. package/tests/codeceptjs/editors/number_test.js +14 -12
  41. package/tests/codeceptjs/editors/object_test.js +13 -13
  42. package/tests/codeceptjs/editors/option-no_default_values_test.js +2 -2
  43. package/tests/codeceptjs/editors/programmatic-changes_test.js +2 -2
  44. package/tests/codeceptjs/editors/radio_test.js +1 -1
  45. package/tests/codeceptjs/editors/range_test.js +1 -1
  46. package/tests/codeceptjs/editors/rating_test.js +1 -1
  47. package/tests/codeceptjs/editors/select_test.js +2 -2
  48. package/tests/codeceptjs/editors/stepper_test.js +3 -3
  49. package/tests/codeceptjs/editors/string_test.js +8 -8
  50. package/tests/codeceptjs/editors/table-confirm-delete_test.js +4 -4
  51. package/tests/codeceptjs/editors/tabs_test.js +1 -1
  52. package/tests/codeceptjs/editors/uuid_test.js +5 -5
  53. package/tests/codeceptjs/editors/validation_test.js +1 -1
  54. package/tests/codeceptjs/meta-schema_test.js +4 -4
  55. package/tests/codeceptjs/schemaloader_test.js +1 -1
  56. package/tests/codeceptjs/themes_test.js +9 -9
  57. package/tests/pages/issues/issue-gh-1133.html +64 -0
  58. package/tests/pages/issues/issue-gh-1164.html +71 -0
  59. package/tests/pages/number.html +18 -0
  60. package/tests/unit/core.spec.js +6 -5
@@ -10,24 +10,24 @@ const today = (offset) => {
10
10
 
11
11
  Feature('datetime')
12
12
 
13
- Scenario('should have correct initial value @datetime', async (I) => {
13
+ Scenario('should have correct initial value @datetime', async ({ I }) => {
14
14
  I.amOnPage('datetime.html')
15
15
  I.wait(1)
16
16
  I.click('#get-value')
17
17
  assert.equal(await I.grabValueFrom('#value'), '{"time":"12:00","date":"' + today() + '","datetimelocal":"' + today() + 'T00:00' + '"}')
18
18
  })
19
19
 
20
- Scenario('time should have max and min attributes @datetime', async (I) => {
20
+ Scenario('time should have max and min attributes @datetime', async ({ I }) => {
21
21
  assert.equal(await I.grabAttributeFrom('[name="root[time]"]', 'min'), '11:00')
22
22
  assert.equal(await I.grabAttributeFrom('[name="root[time]"]', 'max'), '13:00')
23
23
  })
24
24
 
25
- Scenario('date should have max and min attributes @datetime', async (I) => {
25
+ Scenario('date should have max and min attributes @datetime', async ({ I }) => {
26
26
  assert.equal(await I.grabAttributeFrom('[name="root[date]"]', 'min'), '1970-01-01')
27
27
  assert.equal(await I.grabAttributeFrom('[name="root[date]"]', 'max'), '2100-01-01')
28
28
  })
29
29
 
30
- Scenario('datetimelocal should have max and min attributes @datetime', async (I) => {
30
+ Scenario('datetimelocal should have max and min attributes @datetime', async ({ I }) => {
31
31
  assert.equal(await I.grabAttributeFrom('[name="root[datetimelocal]"]', 'min'), '1970-01-01T00:00')
32
32
  assert.equal(await I.grabAttributeFrom('[name="root[datetimelocal]"]', 'max'), '2100-01-01T00:00')
33
33
  })
@@ -2,7 +2,7 @@ var assert = require('assert');
2
2
 
3
3
  Feature('inheritance');
4
4
 
5
- Scenario('should display all required fields in the allOf hierarchy', async (I) => {
5
+ Scenario('should display all required fields in the allOf hierarchy', async ({ I }) => {
6
6
  I.amOnPage('inheritance.html');
7
7
  I.seeElement('[data-schemapath="root.breed"]');
8
8
  I.seeElement('[data-schemapath="root.numLegs"]');
@@ -3,13 +3,13 @@ const { DEFAULT_WAIT_TIME } = require('../test-config')
3
3
 
4
4
  Feature('integer');
5
5
 
6
- Scenario('should have correct initial value', async (I) => {
6
+ Scenario('should have correct initial value', async ({ I }) => {
7
7
  I.amOnPage('integer.html');
8
8
  I.click('.get-value');
9
9
  assert.equal(await I.grabValueFrom('.value'), '{"integer":5,"integer_number":5,"integer_range":5}');
10
10
  });
11
11
 
12
- Scenario('should respect step by incrementing and decrementing the value of a number', async (I) => {
12
+ Scenario('should respect step by incrementing and decrementing the value of a number', async ({ I }) => {
13
13
  I.amOnPage('integer.html');
14
14
  I.seeElement('[data-schemapath="root.integer"] input');
15
15
  I.executeScript(function() {
@@ -36,7 +36,7 @@ Scenario('should respect step by incrementing and decrementing the value of a nu
36
36
  assert.equal(await I.grabValueFrom('.value'), '{"integer":5,"integer_number":5,"integer_range":5}');
37
37
  });
38
38
 
39
- Scenario('should respect step by incrementing and decrementing the value of a range', async (I) => {
39
+ Scenario('should respect step by incrementing and decrementing the value of a range', async ({ I }) => {
40
40
  I.amOnPage('integer.html');
41
41
  I.seeElement('[data-schemapath="root.integer_range"] input');
42
42
  I.executeScript(function() {
@@ -63,12 +63,12 @@ Scenario('should respect step by incrementing and decrementing the value of a ra
63
63
  assert.equal(await I.grabValueFrom('.value'), '{"integer":5,"integer_number":5,"integer_range":5}');
64
64
  });
65
65
 
66
- Scenario('should be readonly if specified and not disabled', async (I) => {
66
+ Scenario('should be readonly if specified and not disabled', async ({ I }) => {
67
67
  I.amOnPage('read-only.html');
68
68
  I.seeReadOnlyAttribute('[name="root[integer]"]');
69
69
  });
70
70
 
71
- Scenario('should update output when (method) setValue is called', async (I) => {
71
+ Scenario('should update output when (method) setValue is called', async ({ I }) => {
72
72
  I.amOnPage('integer.html');
73
73
  I.saveScreenshot('integer-setvalue-1.png')
74
74
  I.waitForText('5', DEFAULT_WAIT_TIME, '[data-schemapath="root.integer_range"] output');
@@ -79,7 +79,7 @@ Scenario('should update output when (method) setValue is called', async (I) => {
79
79
  I.saveScreenshot('integer-setvalue-4.png')
80
80
  });
81
81
 
82
- Scenario('should validate value', async (I) => {
82
+ Scenario('should validate value', async ({ I }) => {
83
83
  I.amOnPage('integer.html');
84
84
  await I.fillField('[name="root[integer]"]', '5-5');
85
85
  I.click('.get-value');
@@ -0,0 +1,11 @@
1
+ /* global Feature Scenario */
2
+
3
+ const assert = require('assert')
4
+
5
+ Feature('GitHub issue 1133')
6
+
7
+ Scenario('GitHub issue 1133 should remain fixed @issue-1133', async ({ I }) => {
8
+ I.amOnPage('issues/issue-gh-1133.html')
9
+ I.waitForElement('.je-ready')
10
+ assert.equal(await I.grabValueFrom('#value'), '{"SaveDataMask":"DP"}')
11
+ })
@@ -4,7 +4,7 @@ const assert = require('assert')
4
4
 
5
5
  Feature('issues')
6
6
 
7
- Scenario('GitHub issue 1158 should remain fixed @issue-1158 @optional', async (I) => {
7
+ Scenario('GitHub issue 1158 should remain fixed @issue-1158 @optional', async ({ I }) => {
8
8
  I.amOnPage('issues/issue-gh-1158.html')
9
9
  I.seeElement('[name="root[name]"]')
10
10
  })
@@ -0,0 +1,12 @@
1
+ /* global Feature Scenario */
2
+
3
+ const assert = require('assert')
4
+
5
+ Feature('GitHub issue 1164')
6
+
7
+ Scenario('GitHub issue 1164 should remain fixed @issue-1164', async ({ I }) => {
8
+ I.amOnPage('issues/issue-gh-1164.html')
9
+ I.waitForElement('.je-ready')
10
+ I.waitForInvisible('option[value="undefined"]')
11
+ assert.equal(await I.grabValueFrom('#value'), '{"arrayEnumSelect":["one"],"stringEnumRadio":"one","numberEnumRadio":1.1,"integerEnumRadio":1}')
12
+ })
@@ -4,7 +4,7 @@ const assert = require('assert')
4
4
 
5
5
  Feature('GitHub issue 1257')
6
6
 
7
- Scenario('GitHub issue 1257 should remain fixed @issue-1257', async (I) => {
7
+ Scenario('GitHub issue 1257 should remain fixed @issue-1257', async ({ I }) => {
8
8
  I.amOnPage('issues/issue-gh-1257.html')
9
9
  I.waitForElement('.je-ready')
10
10
  I.click('[data-schemapath="root.colors"] .json-editor-btntype-add')
@@ -5,7 +5,7 @@ let value
5
5
 
6
6
  Feature('issues')
7
7
 
8
- Scenario('GitHub issue 812 should remain fixed @issue-812', async (I) => {
8
+ Scenario('GitHub issue 812 should remain fixed @issue-812', async ({ I }) => {
9
9
  I.amOnPage('issues/issue-gh-812.html')
10
10
 
11
11
  I.click('.get-value')
@@ -2,13 +2,13 @@ var assert = require('assert');
2
2
 
3
3
  Feature('jodit');
4
4
 
5
- Scenario('should have correct initial value', async (I) => {
5
+ Scenario('should have correct initial value', async ({ I }) => {
6
6
  I.amOnPage('string-jodit-editor.html');
7
7
  I.click('.get-value');
8
8
  assert.equal(await I.grabValueFrom('.debug'), '[]');
9
9
  });
10
10
 
11
- Scenario('should have coerent values', async (I) => {
11
+ Scenario('should have coerent values', async ({ I }) => {
12
12
  I.amOnPage('string-jodit-editor.html');
13
13
  I.click('Add item');
14
14
  I.see('item 1');
@@ -2,7 +2,7 @@ var assert = require('assert');
2
2
 
3
3
  Feature('multiselect');
4
4
 
5
- Scenario('should be disabled if "readonly" is specified', async (I) => {
5
+ Scenario('should be disabled if "readonly" is specified', async ({ I }) => {
6
6
  I.amOnPage('read-only.html');
7
7
  I.seeDisabledAttribute('[name="root[multiselect]"]');
8
8
  });
@@ -1,23 +1,25 @@
1
+ /* global Feature Scenario Event */
2
+
1
3
  var assert = require('assert');
2
4
  const { DEFAULT_WAIT_TIME } = require('../test-config')
3
5
 
4
6
  Feature('number');
5
7
 
6
- Scenario('should have correct initial value', async (I) => {
8
+ Scenario('should have correct initial value @number', async ({ I }) => {
7
9
  I.amOnPage('number.html');
8
10
  I.click('.get-value');
9
- assert.equal(await I.grabValueFrom('.value'), '{"number":5.75,"number_number":5.75,"number_range":5.75}');
11
+ assert.equal(await I.grabValueFrom('.value'), '{"number":5.75,"number_number":5.75,"number_range":5.75,"stepper_number_default":5,"stepper_integer_default":5}');
10
12
  });
11
13
 
12
- Scenario('should validate value', async (I) => {
14
+ Scenario('should validate value @number', async ({ I }) => {
13
15
  I.amOnPage('number.html');
14
16
  await I.fillField('[name="root[number]"]', '12-12');
15
17
  I.click('.get-value');
16
18
  I.waitForText('Value must be of type number.', DEFAULT_WAIT_TIME, '[data-schemapath="root.number"] .invalid-feedback');
17
- assert.equal(await I.grabValueFrom('.value'), '{"number":"12-12","number_number":5.75,"number_range":5.75}');
19
+ assert.equal(await I.grabValueFrom('.value'), '{"number":"12-12","number_number":5.75,"number_range":5.75,"stepper_number_default":5,"stepper_integer_default":5}');
18
20
  });
19
21
 
20
- Scenario('should respect step by incrementing and decrementing the value of a number', async (I) => {
22
+ Scenario('should respect step by incrementing and decrementing the value of a @number', async ({ I }) => {
21
23
  I.amOnPage('number.html');
22
24
  I.seeElement('[data-schemapath="root.number_number"] input');
23
25
  I.executeScript(function() {
@@ -30,7 +32,7 @@ Scenario('should respect step by incrementing and decrementing the value of a nu
30
32
  range.dispatchEvent(event);
31
33
  });
32
34
  I.click('.get-value');
33
- assert.equal(await I.grabValueFrom('.value'), '{"number":5.75,"number_number":6,"number_range":5.75}');
35
+ assert.equal(await I.grabValueFrom('.value'), '{"number":5.75,"number_number":6,"number_range":5.75,"stepper_number_default":5,"stepper_integer_default":5}');
34
36
  I.executeScript(function() {
35
37
  var range = document.querySelector('[data-schemapath="root.number_number"] input');
36
38
  range.stepDown();
@@ -41,10 +43,10 @@ Scenario('should respect step by incrementing and decrementing the value of a nu
41
43
  range.dispatchEvent(event);
42
44
  });
43
45
  I.click('.get-value');
44
- assert.equal(await I.grabValueFrom('.value'), '{"number":5.75,"number_number":5.75,"number_range":5.75}');
46
+ assert.equal(await I.grabValueFrom('.value'), '{"number":5.75,"number_number":5.75,"number_range":5.75,"stepper_number_default":5,"stepper_integer_default":5}');
45
47
  });
46
48
 
47
- Scenario('should respect step by incrementing and decrementing the value of a range', async (I) => {
49
+ Scenario('should respect step by incrementing and decrementing the value of a range @number', async ({ I }) => {
48
50
  I.amOnPage('number.html');
49
51
  I.seeElement('[data-schemapath="root.number_range"] input');
50
52
  I.executeScript(function() {
@@ -57,7 +59,7 @@ Scenario('should respect step by incrementing and decrementing the value of a ra
57
59
  range.dispatchEvent(event);
58
60
  });
59
61
  I.click('.get-value');
60
- assert.equal(await I.grabValueFrom('.value'), '{"number":5.75,"number_number":5.75,"number_range":6}');
62
+ assert.equal(await I.grabValueFrom('.value'), '{"number":5.75,"number_number":5.75,"number_range":6,"stepper_number_default":5,"stepper_integer_default":5}');
61
63
  I.executeScript(function() {
62
64
  var range = document.querySelector('[data-schemapath="root.number_range"] input');
63
65
  range.stepDown();
@@ -68,15 +70,15 @@ Scenario('should respect step by incrementing and decrementing the value of a ra
68
70
  range.dispatchEvent(event);
69
71
  });
70
72
  I.click('.get-value');
71
- assert.equal(await I.grabValueFrom('.value'), '{"number":5.75,"number_number":5.75,"number_range":5.75}');
73
+ assert.equal(await I.grabValueFrom('.value'), '{"number":5.75,"number_number":5.75,"number_range":5.75,"stepper_number_default":5,"stepper_integer_default":5}');
72
74
  });
73
75
 
74
- Scenario('should be readonly if specified and not disabled', async (I) => {
76
+ Scenario('should be readonly if specified and not disabled @number', async ({ I }) => {
75
77
  I.amOnPage('read-only.html');
76
78
  I.seeReadOnlyAttribute('[name="root[number]"]');
77
79
  });
78
80
 
79
- Scenario('should update output when setValue is called', async (I) => {
81
+ Scenario('should update output when setValue is called @number', async ({ I }) => {
80
82
  I.amOnPage('number.html');
81
83
  I.click('.set-value');
82
84
  I.see('2', '[data-schemapath="root.number_range"] output');
@@ -5,7 +5,7 @@ const { DEFAULT_WAIT_TIME } = require('../test-config')
5
5
 
6
6
  Feature('object')
7
7
 
8
- Scenario('should respect property orders', async (I) => {
8
+ Scenario('should respect property orders', async ({ I }) => {
9
9
  I.amOnPage('object.html')
10
10
  assert.equal(await I.grabAttributeFrom('[data-schemapath^="root"] .row:nth-of-type(1) [data-schemapath^="root."]', 'data-schemapath'), 'root.age')
11
11
  assert.equal(await I.grabAttributeFrom('[data-schemapath^="root"] .row:nth-of-type(2) [data-schemapath^="root."]', 'data-schemapath'), 'root.name')
@@ -14,17 +14,17 @@ Scenario('should respect property orders', async (I) => {
14
14
  assert.equal(await I.grabAttributeFrom('[data-schemapath^="root"] .row:nth-of-type(5) [data-schemapath^="root."]', 'data-schemapath'), 'root.zodiac')
15
15
  })
16
16
 
17
- Scenario('should validate required properties', async (I) => {
17
+ Scenario('should validate required properties', async ({ I }) => {
18
18
  I.amOnPage('object.html')
19
19
  I.see('Value must be at least 18.')
20
20
  })
21
21
 
22
- Scenario('should validate also not required properties', async (I) => {
22
+ Scenario('should validate also not required properties', async ({ I }) => {
23
23
  I.amOnPage('object.html')
24
24
  I.see('Value must be at least 3 characters long.')
25
25
  })
26
26
 
27
- Scenario('grid-strict rows and columns', (I) => {
27
+ Scenario('grid-strict rows and columns', ({ I }) => {
28
28
  I.amOnPage('grid-strict.html')
29
29
  I.seeNumberOfVisibleElements('.row', 13)
30
30
  I.seeElement('.col-md-1')
@@ -52,7 +52,7 @@ Scenario('grid-strict rows and columns', (I) => {
52
52
  I.seeElement('.col-md-1.offset-md-11')
53
53
  })
54
54
 
55
- Scenario('grid rows and columns', (I) => {
55
+ Scenario('grid rows and columns', ({ I }) => {
56
56
  I.amOnPage('grid.html')
57
57
  I.seeNumberOfVisibleElements('.row', 6)
58
58
  I.seeNumberOfVisibleElements('.col-md-12', 1)
@@ -63,7 +63,7 @@ Scenario('grid rows and columns', (I) => {
63
63
  I.seeNumberOfVisibleElements('.col-md-1', 6)
64
64
  })
65
65
 
66
- Scenario('opt in optional properties @show_opt_in', async (I) => {
66
+ Scenario('opt in optional properties @show_opt_in', async ({ I }) => {
67
67
  I.amOnPage('object-required-properties.html')
68
68
 
69
69
  // if an editor type "object" is disabled, also the child editors opt-in controls will be disabled.
@@ -139,7 +139,7 @@ Scenario('opt in optional properties @show_opt_in', async (I) => {
139
139
  I.dontSeeDisabledAttribute('[data-schemapath="root.object.radio"] .json-editor-opt-in')
140
140
  })
141
141
 
142
- Scenario('set value opt in optional properties @show_opt_in', async (I) => {
142
+ Scenario('set value opt in optional properties @show_opt_in', async ({ I }) => {
143
143
  I.amOnPage('object-required-properties.html')
144
144
 
145
145
  // all editors visible
@@ -177,7 +177,7 @@ Scenario('set value opt in optional properties @show_opt_in', async (I) => {
177
177
  I.waitForElement('[data-schemapath="root.object.radio"]', DEFAULT_WAIT_TIME)
178
178
  })
179
179
 
180
- Scenario('set value opt in optional properties @show_opt_in_schema', async (I) => {
180
+ Scenario('set value opt in optional properties @show_opt_in_schema', async ({ I }) => {
181
181
  I.amOnPage('object-show-opt-in.html')
182
182
 
183
183
  // all editors visible
@@ -209,7 +209,7 @@ Scenario('set value opt in optional properties @show_opt_in_schema', async (I) =
209
209
  I.dontSeeElement('[data-schemapath="root.option_show_opt_in_false.string"] .json-editor-opt-in') // global show_opt_in: true && parent editor show_opt_in: false
210
210
  })
211
211
 
212
- Scenario('objects should contain properties defined with the properties keyword unless the property "additionalProperties: true" is specified in the object schema @additional-properties', async (I) => {
212
+ Scenario('objects should contain properties defined with the properties keyword unless the property "additionalProperties: true" is specified in the object schema @additional-properties', async ({ I }) => {
213
213
  I.amOnPage('object-no-additional-properties.html')
214
214
  I.seeElement('[data-schemapath="root.aptrue.name"] input')
215
215
  I.seeElement('[data-schemapath="root.aptrue.age"] input')
@@ -219,7 +219,7 @@ Scenario('objects should contain properties defined with the properties keyword
219
219
  assert.equal(await I.grabValueFrom('.value'), '{"aptrue":{"name":"Albert","age":0},"apfalse":{"name":"Albert"}}')
220
220
  })
221
221
 
222
- Scenario('should have unique ids', (I) => {
222
+ Scenario('should have unique ids', ({ I }) => {
223
223
  I.amOnPage('object-no-duplicated-id.html')
224
224
  I.donSeeDuplicatedIds()
225
225
  I.waitForText('i am actually a cat')
@@ -232,7 +232,7 @@ Scenario('should have unique ids', (I) => {
232
232
  I.waitForText('i am actually a cat')
233
233
  })
234
234
 
235
- Scenario('should hide properties with unfulfilled dependencies @dependencies', (I) => {
235
+ Scenario('should hide properties with unfulfilled dependencies @dependencies', ({ I }) => {
236
236
  I.amOnPage('object-with-dependencies.html')
237
237
  I.seeElement('[data-schemapath="root.enable_option"] input')
238
238
  I.dontSeeElement('[data-schemapath="root.make_new"] input')
@@ -244,7 +244,7 @@ Scenario('should hide properties with unfulfilled dependencies @dependencies', (
244
244
  I.dontSeeElement('[data-schemapath="root.existing_name"] input')
245
245
  })
246
246
 
247
- Scenario('should respect multiple dependency values @dependencies', (I) => {
247
+ Scenario('should respect multiple dependency values @dependencies', ({ I }) => {
248
248
  I.amOnPage('object-with-dependencies-array.html')
249
249
  I.waitForVisible('[data-schemapath="root.question_1"] select', DEFAULT_WAIT_TIME)
250
250
  I.selectOption('[name="root[question_1]"]', 'a')
@@ -266,7 +266,7 @@ Scenario('should respect multiple dependency values @dependencies', (I) => {
266
266
  I.waitForInvisible('[data-schemapath="root.question_2_feedback"]', DEFAULT_WAIT_TIME)
267
267
  })
268
268
 
269
- Scenario('should open and close the properties modal', (I) => {
269
+ Scenario('should open and close the properties modal', ({ I }) => {
270
270
  I.amOnPage('object.html')
271
271
  I.seeElement('.json-editor-btn-edit_properties')
272
272
  I.click('.json-editor-btn-edit_properties')
@@ -2,7 +2,7 @@ var assert = require('assert')
2
2
 
3
3
  Feature('option no_default_values')
4
4
 
5
- Scenario('should have correct initial value @no_default_values', async (I) => {
5
+ Scenario('should have correct initial value @no_default_values', async ({ I }) => {
6
6
  I.amOnPage('option-no_default_values.html')
7
7
  I.click('.get-value')
8
8
  assert.equal(await I.grabValueFrom('.debug'), JSON.stringify({
@@ -12,7 +12,7 @@ Scenario('should have correct initial value @no_default_values', async (I) => {
12
12
  }))
13
13
  })
14
14
 
15
- Scenario('should have correct values on empty dirty field', async (I) => {
15
+ Scenario('should have correct values on empty dirty field', async ({ I }) => {
16
16
  I.amOnPage('option-no_default_values.html')
17
17
  I.click('.get-value')
18
18
 
@@ -5,14 +5,14 @@ const { DEFAULT_WAIT_TIME } = require('../test-config')
5
5
 
6
6
  Feature('Programmatic changes')
7
7
 
8
- Scenario('should have correct initial value', async (I) => {
8
+ Scenario('should have correct initial value', async ({ I }) => {
9
9
  I.amOnPage('programmatic-changes.html')
10
10
  I.waitForText('READY', DEFAULT_WAIT_TIME, '.state')
11
11
  I.click('.get-value')
12
12
  assert.equal(await I.grabValueFrom('.value'), '{"boolean":false,"boolean_checkbox":false,"string":"","integer":0,"number":0,"array":[],"array_checkbox":[],"array_select":[]}')
13
13
  })
14
14
 
15
- Scenario('should have correct values after setting them programmatically', async (I) => {
15
+ Scenario('should have correct values after setting them programmatically', async ({ I }) => {
16
16
  I.amOnPage('programmatic-changes.html')
17
17
  I.waitForText('READY', DEFAULT_WAIT_TIME, '.state')
18
18
  I.click('.set-values')
@@ -2,7 +2,7 @@
2
2
 
3
3
  Feature('radio')
4
4
 
5
- Scenario('should be disabled if "readonly" is specified', async (I) => {
5
+ Scenario('should be disabled if "readonly" is specified', async ({ I }) => {
6
6
  I.amOnPage('read-only.html')
7
7
 
8
8
  I.seeDisabledAttribute('[id="root[radio][0]"]')
@@ -4,7 +4,7 @@ var assert = require('assert')
4
4
 
5
5
  Feature('range')
6
6
 
7
- Scenario('should have and display initial value @range', async (I) => {
7
+ Scenario('should have and display initial value @range', async ({ I }) => {
8
8
  I.amOnPage('range.html')
9
9
  I.click('.get-value')
10
10
  assert.equal(await I.grabValueFrom('.value'), '{"speed":1}')
@@ -2,7 +2,7 @@
2
2
 
3
3
  Feature('rating')
4
4
 
5
- Scenario('should be disabled if "readonly" is specified', async (I) => {
5
+ Scenario('should be disabled if "readonly" is specified', async ({ I }) => {
6
6
  I.amOnPage('read-only.html')
7
7
 
8
8
  I.seeDisabledAttribute('[id="root[rating]5"]')
@@ -4,7 +4,7 @@ var assert = require('assert')
4
4
 
5
5
  Feature('select')
6
6
 
7
- Scenario('should return correct booleans values when selected', async (I) => {
7
+ Scenario('should return correct booleans values when selected', async ({ I }) => {
8
8
  I.amOnPage('select.html')
9
9
  I.click('.get-value')
10
10
  assert.equal(await I.grabValueFrom('.value'), '{"boolean":true}')
@@ -16,7 +16,7 @@ Scenario('should return correct booleans values when selected', async (I) => {
16
16
  assert.equal(await I.grabValueFrom('.value'), '{"boolean":true}')
17
17
  })
18
18
 
19
- Scenario('should be disabled if "readonly" is specified', async (I) => {
19
+ Scenario('should be disabled if "readonly" is specified', async ({ I }) => {
20
20
  I.amOnPage('read-only.html')
21
21
  I.seeDisabledAttribute('[name="root[select]"]')
22
22
  })
@@ -4,14 +4,14 @@ var assert = require('assert')
4
4
 
5
5
  Feature('stepper')
6
6
 
7
- Scenario('should validate value @stepper', async (I) => {
7
+ Scenario('should validate value @stepper', async ({ I }) => {
8
8
  I.amOnPage('stepper.html')
9
9
  I.click('.get-value')
10
10
  I.see('Property must be set.', '[data-schemapath="root.stepper"] div')
11
11
  assert.equal(await I.grabValueFrom('.value'), '{}')
12
12
  })
13
13
 
14
- Scenario('should be constrained to maximun and minimun values when stepped @stepper', async (I) => {
14
+ Scenario('should be constrained to maximun and minimun values when stepped @stepper', async ({ I }) => {
15
15
  I.amOnPage('stepper.html')
16
16
  I.click('.stepper-up')
17
17
  I.click('.stepper-up')
@@ -26,7 +26,7 @@ Scenario('should be constrained to maximun and minimun values when stepped @step
26
26
  assert.equal(await I.grabValueFrom('.value'), '{"stepper":5}')
27
27
  })
28
28
 
29
- Scenario('should be correct initialized when manually set @stepper', async (I) => {
29
+ Scenario('should be correct initialized when manually set @stepper', async ({ I }) => {
30
30
  I.amOnPage('stepper-manual.html')
31
31
  I.fillField('[name="root[stepper]"]', 10)
32
32
  I.click('.stepper-up')
@@ -4,13 +4,13 @@ var assert = require('assert')
4
4
 
5
5
  Feature('string')
6
6
 
7
- Scenario('should have correct initial value', async (I) => {
7
+ Scenario('ace editor should have correct initial value', async ({ I }) => {
8
8
  I.amOnPage('string-ace-editor.html')
9
9
  I.click('.get-value')
10
10
  assert.equal(await I.grabValueFrom('.debug'), '[]')
11
11
  })
12
12
 
13
- Scenario('should have coerent values', async (I) => {
13
+ Scenario('should have coerent values', async ({ I }) => {
14
14
  I.amOnPage('string-ace-editor.html')
15
15
  I.click('Add item')
16
16
  I.see('item 1')
@@ -24,13 +24,13 @@ Scenario('should have coerent values', async (I) => {
24
24
  assert.equal(await I.grabValueFrom('.debug'), JSON.stringify([{ editor: '__YELLOW__' }]))
25
25
  })
26
26
 
27
- Scenario('should have correct initial value', async (I) => {
27
+ Scenario('sceditor should have correct initial value', async ({ I }) => {
28
28
  I.amOnPage('string-sceditor.html')
29
29
  I.click('.get-value')
30
30
  assert.equal(await I.grabValueFrom('.debug'), '[]')
31
31
  })
32
32
 
33
- Scenario('editor value and String editor should have coerent values @optional', async (I) => {
33
+ Scenario('editor value and String editor should have coerent values @optional', async ({ I }) => {
34
34
  I.amOnPage('string-sceditor.html')
35
35
  I.click('Add item')
36
36
  I.see('item 1')
@@ -46,7 +46,7 @@ Scenario('editor value and String editor should have coerent values @optional',
46
46
  assert.equal(await I.grabValueFrom('.debug'), JSON.stringify([{ editor: '<p>__YELLOW__</p>' }]))
47
47
  })
48
48
 
49
- Scenario('Should work correctly in arrays @optional', async (I) => {
49
+ Scenario('Should work correctly in arrays @optional', async ({ I }) => {
50
50
  I.amOnPage('string-sceditor.html')
51
51
  I.click('Add item')
52
52
  I.click('Add item')
@@ -98,18 +98,18 @@ Scenario('Should work correctly in arrays @optional', async (I) => {
98
98
  I.switchTo()
99
99
  })
100
100
 
101
- Scenario('should be readonly if specified and not disabled', async (I) => {
101
+ Scenario('should be readonly if specified and not disabled', async ({ I }) => {
102
102
  I.amOnPage('read-only.html')
103
103
  I.seeReadOnlyAttribute('[name="root[string]"]')
104
104
  })
105
105
 
106
- Scenario('should have a custom attribute with custom value', async (I) => {
106
+ Scenario('should have a custom attribute with custom value', async ({ I }) => {
107
107
  I.amOnPage('string-custom-attributes.html')
108
108
  I.seeElement('[name="root[custom_attributes]"]')
109
109
  assert.equal(await I.grabAttributeFrom('[name="root[custom_attributes]"]', 'custom-attribute'), 'custom-value')
110
110
  })
111
111
 
112
- Scenario('should work with cleave.js library', async (I) => {
112
+ Scenario('should work with cleave.js library', async ({ I }) => {
113
113
  I.amOnPage('string-cleave.html')
114
114
  I.seeElement('[name="root[cleave_test]"]')
115
115
  await I.fillField('[name="root[cleave_test]"]', '12345678901234567890')
@@ -4,13 +4,13 @@ var assert = require('assert')
4
4
 
5
5
  Feature('table')
6
6
 
7
- Scenario('should have correct initial value', async (I) => {
7
+ Scenario('should have correct initial value', async ({ I }) => {
8
8
  I.amOnPage('table.html')
9
9
  I.click('.get-value')
10
10
  assert.equal(await I.grabValueFrom('.debug'), '[]')
11
11
  })
12
12
 
13
- Scenario('should ask for confirmation on node delete', async (I) => {
13
+ Scenario('should ask for confirmation on node delete', async ({ I }) => {
14
14
  I.amOnPage('table.html')
15
15
  I.click('Add Node')
16
16
  I.seeElement('[data-schemapath="root.0"] .json-editor-btn-delete')
@@ -26,7 +26,7 @@ Scenario('should ask for confirmation on node delete', async (I) => {
26
26
  I.dontSeeElement('[data-schemapath="root.0"] .json-editor-btn-delete')
27
27
  })
28
28
 
29
- Scenario('should ask for confirmation on node delete last', async (I) => {
29
+ Scenario('should ask for confirmation on node delete last', async ({ I }) => {
30
30
  I.amOnPage('table.html')
31
31
  I.click('Add Node')
32
32
  I.click('Add Node')
@@ -46,7 +46,7 @@ Scenario('should ask for confirmation on node delete last', async (I) => {
46
46
  I.dontSeeElement('[data-schemapath="root.1"] .json-editor-btn-delete')
47
47
  })
48
48
 
49
- Scenario('should ask for confirmation on node delete all', async (I) => {
49
+ Scenario('should ask for confirmation on node delete all', async ({ I }) => {
50
50
  I.amOnPage('table.html')
51
51
  I.click('Add Node')
52
52
  I.click('Add Node')
@@ -4,7 +4,7 @@ const { DEFAULT_WAIT_TIME } = require('../test-config')
4
4
 
5
5
  Feature('Tabs')
6
6
 
7
- Scenario('test top-tabs', (I) => {
7
+ Scenario('test top-tabs', ({ I }) => {
8
8
  I.amOnPage('tabs.html')
9
9
  I.waitForElement('[data-schemapath="root"] .json-editor-btn-add')
10
10
  I.click('[data-schemapath="root"] .json-editor-btn-add')
@@ -4,14 +4,14 @@ const assert = require('assert')
4
4
 
5
5
  Feature('uuid')
6
6
 
7
- Scenario('should have initial value matching uuid @uuid', async (I) => {
7
+ Scenario('should have initial value matching uuid @uuid', async ({ I }) => {
8
8
  I.amOnPage('uuid.html')
9
9
  I.wait(1)
10
10
  const value = await I.grabValueFrom('[name="root[uuid]"]')
11
11
  assert.equal((/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value)), true)
12
12
  })
13
13
 
14
- Scenario('should have initial value matching uuid in arrays @uuid', async (I) => {
14
+ Scenario('should have initial value matching uuid in arrays @uuid', async ({ I }) => {
15
15
  I.click('Add uuid string array item')
16
16
  I.click('Add uuid string array item')
17
17
  const value0 = await I.grabValueFrom('[name="root[uuidStringArray][0]"]')
@@ -20,7 +20,7 @@ Scenario('should have initial value matching uuid in arrays @uuid', async (I) =>
20
20
  assert.equal((/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value1)), true)
21
21
  })
22
22
 
23
- Scenario('should have initial value matching uuid in arrays of objects with @uuid', async (I) => {
23
+ Scenario('should have initial value matching uuid in arrays of objects with @uuid', async ({ I }) => {
24
24
  I.click('Add uuid object array item')
25
25
  I.click('Add uuid object array item')
26
26
  const value0 = await I.grabValueFrom('[name="root[uuidObjectArray][0][uuid]"]')
@@ -29,7 +29,7 @@ Scenario('should have initial value matching uuid in arrays of objects with @uui
29
29
  assert.equal((/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value1)), true)
30
30
  })
31
31
 
32
- Scenario('should have initial value matching uuid in arrays (table) of strings with @uuid', async (I) => {
32
+ Scenario('should have initial value matching uuid in arrays (table) of strings with @uuid', async ({ I }) => {
33
33
  I.click('Add uuid string table item')
34
34
  I.click('Add uuid string table item')
35
35
  const value0 = await I.grabValueFrom('[name="root[uuidStringTable][0]')
@@ -38,7 +38,7 @@ Scenario('should have initial value matching uuid in arrays (table) of strings w
38
38
  assert.equal((/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value1)), true)
39
39
  })
40
40
 
41
- Scenario('should have initial value matching uuid in arrays (table) of objects with @uuid', async (I) => {
41
+ Scenario('should have initial value matching uuid in arrays (table) of objects with @uuid', async ({ I }) => {
42
42
  I.click('Add uuid object table item')
43
43
  I.click('Add uuid object table item')
44
44
  const value0 = await I.grabValueFrom('[name="root[uuidObjectTable][0][uuid]"]')
@@ -6,7 +6,7 @@ const { DEFAULT_WAIT_TIME } = require('../test-config')
6
6
 
7
7
  Feature('Validations')
8
8
 
9
- Scenario('test validations in validation.html', (I) => {
9
+ Scenario('test validations in validation.html', ({ I }) => {
10
10
  I.amOnPage('validation.html')
11
11
  var numberOfTestItemsExpected = 158
12
12
  I.waitForElement('#output div:nth-child(' + numberOfTestItemsExpected + ')', DEFAULT_WAIT_TIME)