@json-editor/json-editor 2.5.2 → 2.6.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 (99) hide show
  1. package/.eslintrc +5 -2
  2. package/.github/PULL_REQUEST_TEMPLATE.md +6 -6
  3. package/.github/workflows/build.yml +58 -0
  4. package/CHANGELOG.md +41 -1
  5. package/CONTRIBUTING.md +1 -1
  6. package/README.md +39 -4
  7. package/README_ADDON.md +65 -0
  8. package/config/codeceptjs_helpers.js +4 -0
  9. package/dist/jsoneditor.js +2 -2
  10. package/dist/nonmin/jsoneditor.js +3711 -3324
  11. package/dist/nonmin/jsoneditor.js.map +1 -1
  12. package/docs/cleave.html +1 -1
  13. package/docs/datetime.html +1 -1
  14. package/docs/describedby.html +1 -1
  15. package/docs/index.html +4 -2
  16. package/docs/materialize_css.html +1 -1
  17. package/docs/meta_schema.json +0 -1
  18. package/docs/radio.html +1 -1
  19. package/docs/select2.html +1 -1
  20. package/docs/selectize.html +1 -1
  21. package/docs/starrating.html +1 -1
  22. package/docs/wysiwyg.html +1 -1
  23. package/package.json +27 -26
  24. package/release-notes.md +9 -9
  25. package/src/core.js +1 -0
  26. package/src/defaults.js +182 -94
  27. package/src/editor.js +28 -9
  28. package/src/editors/array.js +20 -16
  29. package/src/editors/autocomplete.js +1 -0
  30. package/src/editors/base64.js +5 -4
  31. package/src/editors/button.js +2 -2
  32. package/src/editors/checkbox.js +3 -3
  33. package/src/editors/datetime.js +2 -2
  34. package/src/editors/info.js +1 -1
  35. package/src/editors/multiple.js +8 -2
  36. package/src/editors/multiselect.js +5 -3
  37. package/src/editors/object.js +35 -21
  38. package/src/editors/radio.js +9 -4
  39. package/src/editors/select.js +6 -6
  40. package/src/editors/signature.js +3 -2
  41. package/src/editors/starrating.js +5 -5
  42. package/src/editors/string.js +6 -4
  43. package/src/editors/table.js +24 -14
  44. package/src/editors/upload.js +4 -3
  45. package/src/editors/uuid.js +1 -1
  46. package/src/iconlibs/index.js +2 -0
  47. package/src/iconlibs/openiconic.js +28 -0
  48. package/src/schemaloader.js +112 -28
  49. package/src/theme.js +6 -3
  50. package/src/themes/bootstrap3.js +4 -4
  51. package/src/themes/bootstrap4.js +11 -3
  52. package/src/themes/html.js +1 -2
  53. package/src/themes/materialize.js +1 -1
  54. package/src/themes/spectre.js +11 -8
  55. package/src/themes/tailwind.js +1 -1
  56. package/src/validator.js +128 -16
  57. package/tests/codeceptjs/core_test.js +125 -1
  58. package/tests/codeceptjs/editors/array_test.js +13 -11
  59. package/tests/codeceptjs/editors/button_test.js +6 -1
  60. package/tests/codeceptjs/editors/issues/issue-gh-812_test.js +32 -0
  61. package/tests/codeceptjs/editors/number_test.js +1 -1
  62. package/tests/codeceptjs/editors/object_test.js +216 -100
  63. package/tests/codeceptjs/editors/programmatic-changes_test.js +3 -1
  64. package/tests/codeceptjs/editors/radio_test.js +10 -0
  65. package/tests/codeceptjs/editors/rating_test.js +10 -11
  66. package/tests/codeceptjs/editors/select_test.js +17 -15
  67. package/tests/codeceptjs/editors/stepper_test.js +13 -1
  68. package/tests/codeceptjs/editors/string_test.js +81 -80
  69. package/tests/codeceptjs/editors/table-confirm-delete_test.js +58 -56
  70. package/tests/codeceptjs/editors/tabs_test.js +12 -10
  71. package/tests/codeceptjs/editors/validation_test.js +10 -8
  72. package/tests/codeceptjs/meta-schema_test.js +13 -14
  73. package/tests/codeceptjs/schemaloader_test.js +13 -0
  74. package/tests/codeceptjs/steps_file.js +4 -3
  75. package/tests/codeceptjs/themes_test.js +31 -0
  76. package/tests/docker-compose.yml +4 -3
  77. package/tests/fixtures/validation.json +382 -1
  78. package/tests/pages/_demo.html +2 -0
  79. package/tests/pages/anyof.html +80 -0
  80. package/tests/pages/issues/issue-gh-812.html +110 -0
  81. package/tests/pages/issues/issue-gh-848.html +81 -0
  82. package/tests/pages/meta_schema.json +0 -1
  83. package/tests/pages/object-no-additional-properties.html +27 -12
  84. package/tests/pages/object-required-properties.html +43 -9
  85. package/tests/pages/object-show-opt-in.html +110 -0
  86. package/tests/pages/object-with-dependencies-array.html +56 -0
  87. package/tests/pages/oneof.html +103 -0
  88. package/tests/pages/read-only.html +19 -4
  89. package/tests/pages/stepper-manual.html +57 -0
  90. package/tests/pages/themes.html +2 -0
  91. package/tests/pages/translate-property.html +247 -0
  92. package/tests/pages/urn.html +93 -0
  93. package/tests/unit/core.spec.js +2 -0
  94. package/tests/unit/defaults.spec.js +4 -2
  95. package/tests/unit/editor.spec.js +2 -0
  96. package/tests/unit/editors/array.spec.js +86 -0
  97. package/tests/unit/editors/table.spec.js +91 -0
  98. package/tests/unit/schemaloader.spec.js +362 -3
  99. package/tests/unit/validator.spec.js +14 -2
@@ -1,117 +1,118 @@
1
- var assert = require('assert');
1
+ /* global Feature Scenario */
2
2
 
3
- Feature('string');
3
+ var assert = require('assert')
4
+
5
+ Feature('string')
4
6
 
5
7
  Scenario('should have correct initial value', async (I) => {
6
- I.amOnPage('string-ace-editor.html');
7
- I.click('.get-value');
8
- assert.equal(await I.grabValueFrom('.debug'), '[]');
9
- });
8
+ I.amOnPage('string-ace-editor.html')
9
+ I.click('.get-value')
10
+ assert.equal(await I.grabValueFrom('.debug'), '[]')
11
+ })
10
12
 
11
13
  Scenario('should have coerent values', async (I) => {
12
- I.amOnPage('string-ace-editor.html');
13
- I.click('Add item');
14
- I.see('item 1');
15
- I.seeElement('.ace_editor');
16
- I.click('.ace_editor');
17
- I.pressKeys('__YELLOW__');
18
- I.click('.ace_editor');
19
- I.see('__YELLOW__');
20
-
21
- I.click('.get-value');
22
- assert.equal(await I.grabValueFrom('.debug'), JSON.stringify([{"editor":"__YELLOW__"}]));
23
- });
14
+ I.amOnPage('string-ace-editor.html')
15
+ I.click('Add item')
16
+ I.see('item 1')
17
+ I.seeElement('.ace_editor')
18
+ I.click('.ace_editor')
19
+ I.pressKeys('__YELLOW__')
20
+ I.click('.ace_editor')
21
+ I.see('__YELLOW__')
22
+
23
+ I.click('.get-value')
24
+ assert.equal(await I.grabValueFrom('.debug'), JSON.stringify([{ editor: '__YELLOW__' }]))
25
+ })
24
26
 
25
27
  Scenario('should have correct initial value', async (I) => {
26
- I.amOnPage('string-sceditor.html');
27
- I.click('.get-value');
28
- assert.equal(await I.grabValueFrom('.debug'), '[]');
29
- });
28
+ I.amOnPage('string-sceditor.html')
29
+ I.click('.get-value')
30
+ assert.equal(await I.grabValueFrom('.debug'), '[]')
31
+ })
30
32
 
31
33
  Scenario('editor value and String editor should have coerent values @optional', async (I) => {
32
- I.amOnPage('string-sceditor.html');
33
- I.click('Add item');
34
- I.see('item 1');
34
+ I.amOnPage('string-sceditor.html')
35
+ I.click('Add item')
36
+ I.see('item 1')
35
37
 
36
38
  // enters first iframe, writes text on the body and then exits
37
- I.switchTo(0);
38
- I.click('body');
39
- I.pressKeys('__YELLOW__');
40
- I.see('__YELLOW__');
41
- I.switchTo();
39
+ I.switchTo(0)
40
+ I.click('body')
41
+ I.pressKeys('__YELLOW__')
42
+ I.see('__YELLOW__')
43
+ I.switchTo()
42
44
 
43
- I.click('.get-value');
44
- assert.equal(await I.grabValueFrom('.debug'), JSON.stringify([{"editor":"<p>__YELLOW__</p>"}]));
45
- });
45
+ I.click('.get-value')
46
+ assert.equal(await I.grabValueFrom('.debug'), JSON.stringify([{ editor: '<p>__YELLOW__</p>' }]))
47
+ })
46
48
 
47
49
  Scenario('Should work correctly in arrays @optional', async (I) => {
48
- I.amOnPage('string-sceditor.html');
49
- I.click('Add item');
50
- I.click('Add item');
51
- I.see('item 1');
52
- I.see('item 2');
50
+ I.amOnPage('string-sceditor.html')
51
+ I.click('Add item')
52
+ I.click('Add item')
53
+ I.see('item 1')
54
+ I.see('item 2')
53
55
 
54
56
  // enters first iframe, writes text on the body and then exits
55
- I.switchTo(0);
56
- I.click('body');
57
- I.pressKeys('__YELLOW__');
58
- I.see('__YELLOW__');
59
- I.switchTo();
57
+ I.switchTo(0)
58
+ I.click('body')
59
+ I.pressKeys('__YELLOW__')
60
+ I.see('__YELLOW__')
61
+ I.switchTo()
60
62
 
61
63
  // enters first iframe and read text
62
- I.switchTo(0);
63
- I.see('__YELLOW__');
64
- I.switchTo();
64
+ I.switchTo(0)
65
+ I.see('__YELLOW__')
66
+ I.switchTo()
65
67
 
66
68
  // enters second iframe, writes text on the body and then exits
67
- I.switchTo(1);
68
- I.click('body');
69
- I.pressKeys('__BLUE__');
69
+ I.switchTo(1)
70
+ I.click('body')
71
+ I.pressKeys('__BLUE__')
70
72
 
71
- I.see('__BLUE__');
72
- I.switchTo();
73
+ I.see('__BLUE__')
74
+ I.switchTo()
73
75
 
74
76
  // enters second iframe and read text
75
- I.switchTo(1);
76
- I.see('__BLUE__');
77
- I.switchTo();
77
+ I.switchTo(1)
78
+ I.see('__BLUE__')
79
+ I.switchTo()
78
80
 
79
- I.click('.get-value');
80
- assert.equal(await I.grabValueFrom('.debug'), JSON.stringify([{"editor":"<p>__YELLOW__<br></p>"},{"editor":"<p>__BLUE__<br></p>"}]));
81
+ I.click('.get-value')
82
+ assert.equal(await I.grabValueFrom('.debug'), JSON.stringify([{ editor: '<p>__YELLOW__<br></p>' }, { editor: '<p>__BLUE__<br></p>' }]))
81
83
 
82
- I.click('.json-editor-btn-movedown');
83
- I.click('.get-value');
84
- assert.equal(await I.grabValueFrom('.debug'), JSON.stringify([{"editor":"<p>__BLUE__<br></p>"},{"editor":"<p>__YELLOW__<br></p>"}]));
84
+ I.click('.json-editor-btn-movedown')
85
+ I.click('.get-value')
86
+ assert.equal(await I.grabValueFrom('.debug'), JSON.stringify([{ editor: '<p>__BLUE__<br></p>' }, { editor: '<p>__YELLOW__<br></p>' }]))
85
87
 
86
88
  // the last 2 tests will fail because Sceditors iframes loose their content when the iframe is reloaded.
87
89
 
88
90
  // enters first iframe and read text
89
- I.switchTo(0);
90
- I.see('__BLUE__');
91
- I.switchTo();
91
+ I.switchTo(0)
92
+ I.see('__BLUE__')
93
+ I.switchTo()
92
94
 
93
95
  // enters second iframe and read text
94
- I.switchTo(1);
95
- I.see('__YELLOW__');
96
- I.switchTo();
97
-
98
- });
96
+ I.switchTo(1)
97
+ I.see('__YELLOW__')
98
+ I.switchTo()
99
+ })
99
100
 
100
101
  Scenario('should be readonly if specified and not disabled', async (I) => {
101
- I.amOnPage('read-only.html');
102
- I.seeReadOnlyAttribute('[name="root[string]"]');
103
- });
102
+ I.amOnPage('read-only.html')
103
+ I.seeReadOnlyAttribute('[name="root[string]"]')
104
+ })
104
105
 
105
106
  Scenario('should have a custom attribute with custom value', async (I) => {
106
- I.amOnPage('string-custom-attributes.html');
107
- I.seeElement('[name="root[custom_attributes]"]');
108
- assert.equal(await I.grabAttributeFrom('[name="root[custom_attributes]"]', 'custom-attribute'), 'custom-value');
109
- });
107
+ I.amOnPage('string-custom-attributes.html')
108
+ I.seeElement('[name="root[custom_attributes]"]')
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
- I.amOnPage('string-cleave.html');
113
- I.seeElement('[name="root[cleave_test]"]');
114
- await I.fillField('[name="root[cleave_test]"]', '12345678901234567890');
115
- I.click('.get-value');
116
- assert.equal(await I.grabValueFrom('.debug'), JSON.stringify({"cleave_test":"1234.567.890-1234"}));
117
- });
113
+ I.amOnPage('string-cleave.html')
114
+ I.seeElement('[name="root[cleave_test]"]')
115
+ await I.fillField('[name="root[cleave_test]"]', '12345678901234567890')
116
+ I.click('.get-value')
117
+ assert.equal(await I.grabValueFrom('.debug'), JSON.stringify({ cleave_test: '1234.567.890-1234' }))
118
+ })
@@ -1,65 +1,67 @@
1
- var assert = require('assert');
1
+ /* global Feature Scenario */
2
2
 
3
- Feature('table');
3
+ var assert = require('assert')
4
+
5
+ Feature('table')
4
6
 
5
7
  Scenario('should have correct initial value', async (I) => {
6
- I.amOnPage('table.html');
7
- I.click('.get-value');
8
- assert.equal(await I.grabValueFrom('.debug'), '[]');
9
- });
8
+ I.amOnPage('table.html')
9
+ I.click('.get-value')
10
+ assert.equal(await I.grabValueFrom('.debug'), '[]')
11
+ })
10
12
 
11
13
  Scenario('should ask for confirmation on node delete', async (I) => {
12
- I.amOnPage('table.html');
13
- I.click('Add Node');
14
- I.seeElement('[data-schemapath="root.0"] .json-editor-btn-delete');
15
- I.amCancellingPopups();
16
- I.click('[data-schemapath="root.0"] .json-editor-btn-delete');
17
- I.seeInPopup('Are you sure you want to remove this node?');
18
- I.cancelPopup();
19
- I.seeElement('[data-schemapath="root.0"] .json-editor-btn-delete');
20
- I.amAcceptingPopups();
21
- I.click('[data-schemapath="root.0"] .json-editor-btn-delete');
22
- I.seeInPopup('Are you sure you want to remove this node?');
23
- I.acceptPopup();
24
- I.dontSeeElement('[data-schemapath="root.0"] .json-editor-btn-delete');
25
- });
14
+ I.amOnPage('table.html')
15
+ I.click('Add Node')
16
+ I.seeElement('[data-schemapath="root.0"] .json-editor-btn-delete')
17
+ I.amCancellingPopups()
18
+ I.click('[data-schemapath="root.0"] .json-editor-btn-delete')
19
+ I.seeInPopup('Are you sure you want to remove this node?')
20
+ I.cancelPopup()
21
+ I.seeElement('[data-schemapath="root.0"] .json-editor-btn-delete')
22
+ I.amAcceptingPopups()
23
+ I.click('[data-schemapath="root.0"] .json-editor-btn-delete')
24
+ I.seeInPopup('Are you sure you want to remove this node?')
25
+ I.acceptPopup()
26
+ I.dontSeeElement('[data-schemapath="root.0"] .json-editor-btn-delete')
27
+ })
26
28
 
27
29
  Scenario('should ask for confirmation on node delete last', async (I) => {
28
- I.amOnPage('table.html');
29
- I.click('Add Node');
30
- I.click('Add Node');
31
- I.seeElement('[data-schemapath="root.0"] .json-editor-btn-delete');
32
- I.seeElement('[data-schemapath="root.1"] .json-editor-btn-delete');
33
- I.amCancellingPopups();
34
- I.click('Delete Last Node');
35
- I.seeInPopup('Are you sure you want to remove this node?');
36
- I.cancelPopup();
37
- I.seeElement('[data-schemapath="root.0"] .json-editor-btn-delete');
38
- I.seeElement('[data-schemapath="root.1"] .json-editor-btn-delete');
39
- I.amAcceptingPopups();
40
- I.click('Delete Last Node');
41
- I.seeInPopup('Are you sure you want to remove this node?');
42
- I.acceptPopup();
43
- I.seeElement('[data-schemapath="root.0"] .json-editor-btn-delete');
44
- I.dontSeeElement('[data-schemapath="root.1"] .json-editor-btn-delete');
45
- });
30
+ I.amOnPage('table.html')
31
+ I.click('Add Node')
32
+ I.click('Add Node')
33
+ I.seeElement('[data-schemapath="root.0"] .json-editor-btn-delete')
34
+ I.seeElement('[data-schemapath="root.1"] .json-editor-btn-delete')
35
+ I.amCancellingPopups()
36
+ I.click('Delete Last Node')
37
+ I.seeInPopup('Are you sure you want to remove this node?')
38
+ I.cancelPopup()
39
+ I.seeElement('[data-schemapath="root.0"] .json-editor-btn-delete')
40
+ I.seeElement('[data-schemapath="root.1"] .json-editor-btn-delete')
41
+ I.amAcceptingPopups()
42
+ I.click('Delete Last Node')
43
+ I.seeInPopup('Are you sure you want to remove this node?')
44
+ I.acceptPopup()
45
+ I.seeElement('[data-schemapath="root.0"] .json-editor-btn-delete')
46
+ I.dontSeeElement('[data-schemapath="root.1"] .json-editor-btn-delete')
47
+ })
46
48
 
47
49
  Scenario('should ask for confirmation on node delete all', async (I) => {
48
- I.amOnPage('table.html');
49
- I.click('Add Node');
50
- I.click('Add Node');
51
- I.seeElement('[data-schemapath="root.0"] .json-editor-btn-delete');
52
- I.seeElement('[data-schemapath="root.1"] .json-editor-btn-delete');
53
- I.amCancellingPopups();
54
- I.click('Delete All');
55
- I.seeInPopup('Are you sure you want to remove this node?');
56
- I.cancelPopup();
57
- I.seeElement('[data-schemapath="root.0"] .json-editor-btn-delete');
58
- I.seeElement('[data-schemapath="root.1"] .json-editor-btn-delete');
59
- I.amAcceptingPopups();
60
- I.click('Delete All');
61
- I.seeInPopup('Are you sure you want to remove this node?');
62
- I.acceptPopup();
63
- I.dontSeeElement('[data-schemapath="root.0"] .json-editor-btn-delete');
64
- I.dontSeeElement('[data-schemapath="root.1"] .json-editor-btn-delete');
65
- });
50
+ I.amOnPage('table.html')
51
+ I.click('Add Node')
52
+ I.click('Add Node')
53
+ I.seeElement('[data-schemapath="root.0"] .json-editor-btn-delete')
54
+ I.seeElement('[data-schemapath="root.1"] .json-editor-btn-delete')
55
+ I.amCancellingPopups()
56
+ I.click('Delete All')
57
+ I.seeInPopup('Are you sure you want to remove this node?')
58
+ I.cancelPopup()
59
+ I.seeElement('[data-schemapath="root.0"] .json-editor-btn-delete')
60
+ I.seeElement('[data-schemapath="root.1"] .json-editor-btn-delete')
61
+ I.amAcceptingPopups()
62
+ I.click('Delete All')
63
+ I.seeInPopup('Are you sure you want to remove this node?')
64
+ I.acceptPopup()
65
+ I.dontSeeElement('[data-schemapath="root.0"] .json-editor-btn-delete')
66
+ I.dontSeeElement('[data-schemapath="root.1"] .json-editor-btn-delete')
67
+ })
@@ -1,12 +1,14 @@
1
- Feature('Tabs');
1
+ /* global Feature Scenario */
2
+
3
+ Feature('Tabs')
2
4
 
3
5
  Scenario('test top-tabs', (I) => {
4
- I.amOnPage('tabs.html');
5
- I.waitForElement('[data-schemapath="root"] .json-editor-btn-add');
6
- I.click('[data-schemapath="root"] .json-editor-btn-add');
7
- I.see('1 -');
8
- I.see('validation failed');
9
- I.fillField('root[1][name]', 'Somebody');
10
- I.pressKey('Tab');
11
- I.see('validation passed');
12
- });
6
+ I.amOnPage('tabs.html')
7
+ I.waitForElement('[data-schemapath="root"] .json-editor-btn-add')
8
+ I.click('[data-schemapath="root"] .json-editor-btn-add')
9
+ I.waitForText('1 -', 5)
10
+ I.waitForText('validation failed', 5)
11
+ I.fillField('root[1][name]', 'Somebody')
12
+ I.pressKey('Tab')
13
+ I.waitForText('validation passed', 5)
14
+ })
@@ -1,12 +1,14 @@
1
+ /* global Feature Scenario */
2
+
1
3
  // Note: validation.html has its own way of testing; this test simply tests if the output of that test conforms to the expected output
2
4
 
3
- Feature('Validations');
5
+ Feature('Validations')
4
6
 
5
7
  Scenario('test validations in validation.html', (I) => {
6
- I.amOnPage('validation.html');
7
- var numberOfTestItemsExpected = 136;
8
- I.waitForElement("#output div:nth-child("+numberOfTestItemsExpected+")", 10);
9
- I.seeNumberOfElements("#output div", numberOfTestItemsExpected);
10
- I.see("success");
11
- I.dontSee('fail');
12
- });
8
+ I.amOnPage('validation.html')
9
+ var numberOfTestItemsExpected = 158
10
+ I.waitForElement('#output div:nth-child(' + numberOfTestItemsExpected + ')', 10)
11
+ I.seeNumberOfElements('#output div', numberOfTestItemsExpected)
12
+ I.see('success')
13
+ I.dontSee('fail')
14
+ })
@@ -1,18 +1,17 @@
1
- var assert = require('assert');
1
+ /* global Feature Scenario */
2
2
 
3
- Feature('core');
3
+ Feature('core')
4
4
 
5
5
  // https://github.com/json-editor/json-editor/issues/823
6
6
  Scenario('work with json-schema meta-schema', async (I) => {
7
- I.amOnPage('issues/issue-gh-823-meta-schema.html');
8
- I.waitForElement('[data-schemapath="root"] h3', 10);
9
- I.click('Object Properties');
10
- I.click('options');
11
- I.see('$ref');
12
- I.see('options');
13
- //pause();
14
- I.click('Object Properties');
15
- I.click('Object Properties');
16
- I.see('options');
17
- });
18
-
7
+ I.amOnPage('issues/issue-gh-823-meta-schema.html')
8
+ I.waitForElement('[data-schemapath="root"] h3', 10)
9
+ I.click('Object Properties')
10
+ I.click('options')
11
+ I.see('$ref')
12
+ I.see('options')
13
+ // pause();
14
+ I.click('Object Properties')
15
+ I.click('Object Properties')
16
+ I.see('options')
17
+ })
@@ -0,0 +1,13 @@
1
+ var assert = require('assert');
2
+
3
+ Feature('schemaloader');
4
+
5
+ Scenario('resolving nested external URNs', async (I) => {
6
+ I.amOnPage('urn.html');
7
+ I.waitForElement('[data-schemapath="root"] h3', 10);
8
+ I.seeElementInDOM('[data-schemapath="root.fname"]')
9
+ I.seeElementInDOM('[data-schemapath="root.lname"]')
10
+
11
+ I.click('.get-value')
12
+ assert.equal(await I.grabValueFrom('.value'), '{"fname":"John","lname":"Doe"}');
13
+ });
@@ -1,11 +1,12 @@
1
+ /* global actor */
1
2
 
2
- 'use strict';
3
+ 'use strict'
3
4
  // in this file you can append custom step methods to 'I' object
4
5
 
5
- module.exports = function() {
6
+ module.exports = function () {
6
7
  return actor({
7
8
 
8
9
  // Define custom steps here, use 'this' to access default methods of I.
9
10
  // It is recommended to place a general 'login' function here.
10
- });
11
+ })
11
12
  }
@@ -1,4 +1,5 @@
1
1
  /* global Feature Scenario */
2
+
2
3
  Feature('themes')
3
4
 
4
5
  // nothing
@@ -423,6 +424,36 @@ Scenario('It should hide button Labels: null | materialicons', async (I) => {
423
424
  I.click('Collapse')
424
425
  I.waitForText('arrow_drop_down', 'i.material-icons')
425
426
  })
427
+
428
+ Scenario('It should hide button Labels: null | openiconic', async (I) => {
429
+ I.amOnPage('themes.html')
430
+ I.selectOption('iconlib', 'Open Iconic')
431
+ I.waitForText('Themes Test Page')
432
+ I.dontSee('Collapse')
433
+ I.dontSee('Edit JSON')
434
+ I.dontSee('Object Properties')
435
+ I.dontSee('Delete item')
436
+ I.dontSee('Delete Last item')
437
+ I.dontSee('Delete All')
438
+ I.dontSee('Move down')
439
+ I.dontSee('Move up')
440
+
441
+ I.click('Collapse')
442
+ I.seeElementInDOM('i.oi-icon.oi-icon-collapse-down')
443
+ I.seeElementInDOM('i.oi-icon.oi-icon-expand-right')
444
+ I.seeElementInDOM('i.oi-icon.oi-icon-trash')
445
+ I.seeElementInDOM('i.oi-icon.oi-icon-pencil')
446
+ I.seeElementInDOM('i.oi-icon.oi-icon-plus')
447
+ I.seeElementInDOM('i.oi-icon.oi-icon-minus')
448
+ I.seeElementInDOM('i.oi-icon.oi-icon-ban')
449
+ I.seeElementInDOM('i.oi-icon.oi-icon-file')
450
+ I.seeElementInDOM('i.oi-icon.oi-icon-arrow-thick-top')
451
+ I.seeElementInDOM('i.oi-icon.oi-icon-arrow-thick-right')
452
+ I.seeElementInDOM('i.oi-icon.oi-icon-arrow-thick-bottom')
453
+ I.seeElementInDOM('i.oi-icon.oi-icon-arrow-thick-left')
454
+ I.seeElementInDOM('i.oi-icon.oi-icon-clipboard')
455
+ I.seeElementInDOM('i.oi-icon.oi-icon-list')
456
+ })
426
457
  */
427
458
  Scenario('It should hide button Labels: null | spectre', async (I) => {
428
459
  I.amOnPage('themes.html')
@@ -10,11 +10,10 @@ services:
10
10
  - '9100:9001'
11
11
  expose:
12
12
  - '9001'
13
- depends_on:
14
- - firefox
15
- - chrome
16
13
  firefox:
17
14
  image: selenium/standalone-firefox-debug:3.141.59-20200525
15
+ depends_on:
16
+ - node
18
17
  environment:
19
18
  - VNC_NO_PASSWORD=1
20
19
  ports:
@@ -24,6 +23,8 @@ services:
24
23
  shm_size: '2gb' # for windows environment
25
24
  chrome:
26
25
  image: selenium/standalone-chrome-debug:3.141.59-20200525
26
+ depends_on:
27
+ - node
27
28
  environment:
28
29
  - VNC_NO_PASSWORD=1
29
30
  ports: