@json-editor/json-editor 2.9.0 → 2.10.0
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 +29 -7
- package/README.md +47 -1
- 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 +25744 -26450
- package/dist/nonmin/jsoneditor.js.map +1 -1
- package/docs/css_integration.html +17 -15
- package/docs/custom-editor.html +92 -0
- package/docs/datetime.html +37 -2
- package/docs/index.html +4 -1
- package/docs/meta_schema.json +426 -398
- package/package.json +26 -24
- package/src/defaults.js +15 -1
- package/src/editor.js +23 -6
- package/src/editors/integer.js +5 -3
- package/src/editors/multiple.js +67 -8
- package/src/editors/number.js +5 -3
- package/src/editors/object.js +0 -1
- package/src/editors/radio.js +4 -6
- package/src/editors/select.js +0 -6
- package/src/iconlibs/bootstrap.js +28 -0
- package/src/iconlibs/index.js +2 -0
- package/src/resolvers.js +5 -2
- package/src/schemaloader.js +3 -1
- package/src/themes/bootstrap3.js +1 -1
- package/src/utilities.js +22 -0
- package/src/validator.js +93 -0
- package/tests/codeceptjs/constrains/contains_test.js +36 -0
- package/tests/codeceptjs/constrains/dependentSchemas_test.js +15 -0
- package/tests/codeceptjs/constrains/if-then-else_test.js +143 -0
- package/tests/codeceptjs/core_test.js +46 -46
- package/tests/codeceptjs/editors/advanced_test.js +12 -11
- package/tests/codeceptjs/editors/array_any_of_test.js +37 -37
- package/tests/codeceptjs/editors/array_test.js +784 -794
- package/tests/codeceptjs/editors/autocomplete_test.js +4 -6
- package/tests/codeceptjs/editors/button_test.js +30 -29
- package/tests/codeceptjs/editors/checkbox_test.js +19 -18
- package/tests/codeceptjs/editors/colorpicker_test.js +20 -18
- package/tests/codeceptjs/editors/datetime_test.js +11 -11
- package/tests/codeceptjs/editors/inheritance_test.js +8 -9
- package/tests/codeceptjs/editors/integer_test.js +77 -78
- package/tests/codeceptjs/editors/jodit_test.js +18 -19
- package/tests/codeceptjs/editors/multiselect_test.js +6 -6
- package/tests/codeceptjs/editors/number_test.js +72 -71
- package/tests/codeceptjs/editors/object_test.js +52 -26
- package/tests/codeceptjs/editors/option-no_default_values_test.js +6 -6
- package/tests/codeceptjs/editors/programmatic-changes_test.js +4 -5
- package/tests/codeceptjs/editors/radio_test.js +1 -1
- package/tests/codeceptjs/editors/range_test.js +2 -4
- package/tests/codeceptjs/editors/rating_test.js +1 -1
- package/tests/codeceptjs/editors/select_test.js +5 -7
- package/tests/codeceptjs/editors/stepper_test.js +8 -10
- package/tests/codeceptjs/editors/string_test.js +16 -16
- package/tests/codeceptjs/editors/table-confirm-delete_test.js +11 -13
- package/tests/codeceptjs/editors/tabs_test.js +1 -1
- package/tests/codeceptjs/editors/uuid_test.js +15 -15
- package/tests/codeceptjs/editors/validation_test.js +2 -2
- package/tests/codeceptjs/issues/issue-gh-1133_test.js +9 -0
- package/tests/codeceptjs/issues/issue-gh-1158-2_test.js +10 -0
- package/tests/codeceptjs/{editors/issues → issues}/issue-gh-1158_test.js +1 -3
- package/tests/codeceptjs/issues/issue-gh-1164_test.js +10 -0
- package/tests/codeceptjs/issues/issue-gh-1211_test.js +17 -0
- package/tests/codeceptjs/{editors/issues → issues}/issue-gh-1257_test.js +3 -5
- package/tests/codeceptjs/issues/issue-gh-1338_test.js +16 -0
- package/tests/codeceptjs/issues/issue-gh-1347_test.js +8 -0
- package/tests/codeceptjs/issues/issue-gh-795_test.js +13 -0
- package/tests/codeceptjs/issues/issue-gh-810_test.js +52 -0
- package/tests/codeceptjs/issues/issue-gh-812_test.js +25 -0
- package/tests/codeceptjs/meta-schema_test.js +12 -12
- package/tests/codeceptjs/schemaloader_test.js +8 -8
- package/tests/codeceptjs/themes_test.js +40 -9
- package/tests/pages/autocomplete.html +1 -0
- package/tests/pages/contains.html +38 -0
- package/tests/pages/dependentSchemas.html +52 -0
- package/tests/pages/if-else.html +57 -0
- package/tests/pages/if-then-else-allOf.html +117 -0
- package/tests/pages/if-then-else.html +64 -0
- package/tests/pages/if-then.html +57 -0
- package/tests/pages/issues/issue-gh-1133.html +64 -0
- package/tests/pages/issues/issue-gh-1158-2.html +189 -0
- package/tests/pages/issues/issue-gh-1164.html +71 -0
- package/tests/pages/issues/issue-gh-1165.html +63 -0
- package/tests/pages/issues/issue-gh-1165.json +8 -0
- package/tests/pages/issues/issue-gh-1211.html +1022 -0
- package/tests/pages/issues/issue-gh-1338.html +74 -0
- package/tests/pages/issues/issue-gh-1347.html +142 -0
- package/tests/pages/issues/issue-gh-795.html +58 -0
- package/tests/pages/issues/issue-gh-810.html +149 -0
- package/tests/pages/maxContains.html +39 -0
- package/tests/pages/meta-schema.html +28 -0
- package/tests/pages/meta_schema.json +426 -398
- package/tests/pages/minContains.html +39 -0
- package/tests/pages/number.html +18 -0
- package/tests/pages/option-dependencies.html +106 -0
- package/tests/pages/themes.html +3 -1
- package/tests/unit/core.spec.js +8 -10
- package/tests/codeceptjs/editors/issues/issue-gh-812_test.js +0 -32
|
@@ -1,535 +1,527 @@
|
|
|
1
1
|
/* global Feature Scenario */
|
|
2
2
|
|
|
3
|
-
var assert = require('assert');
|
|
4
3
|
const { DEFAULT_WAIT_TIME } = require('../test-config')
|
|
5
4
|
|
|
6
|
-
Feature('array')
|
|
5
|
+
Feature('array')
|
|
7
6
|
|
|
8
|
-
Scenario('should have correct initial value', async (I) => {
|
|
9
|
-
I.amOnPage('array.html')
|
|
10
|
-
I.click('.get-value')
|
|
11
|
-
|
|
12
|
-
})
|
|
7
|
+
Scenario('should have correct initial value', async ({ I }) => {
|
|
8
|
+
I.amOnPage('array.html')
|
|
9
|
+
I.click('.get-value')
|
|
10
|
+
I.waitForValue('.debug', '[]')
|
|
11
|
+
})
|
|
13
12
|
|
|
14
|
-
Scenario('unique items arrays sorting @unique-itmes-sorting', async (I) => {
|
|
13
|
+
Scenario('unique items arrays sorting @unique-itmes-sorting', async ({ I }) => {
|
|
15
14
|
I.amOnPage('array-unique-items-sort.html')
|
|
16
15
|
I.waitForElement('.je-ready', DEFAULT_WAIT_TIME)
|
|
17
16
|
I.click('[data-schemapath="root.items"] .form-control:nth-of-type(1)')
|
|
18
17
|
I.click('.get-value')
|
|
19
|
-
|
|
18
|
+
I.waitForValue('.debug', '{"items":["01"]}')
|
|
20
19
|
I.click('[data-schemapath="root.items"] .form-control:nth-of-type(2)')
|
|
21
20
|
I.click('.get-value')
|
|
22
|
-
|
|
21
|
+
I.waitForValue('.debug', '{"items":["01","02"]}')
|
|
23
22
|
I.click('[data-schemapath="root.items"] .form-control:nth-of-type(3)')
|
|
24
23
|
I.click('.get-value')
|
|
25
|
-
|
|
24
|
+
I.waitForValue('.debug', '{"items":["01","02","03"]}')
|
|
26
25
|
I.click('[data-schemapath="root.items"] .form-control:nth-of-type(4)')
|
|
27
26
|
I.click('.get-value')
|
|
28
|
-
|
|
27
|
+
I.waitForValue('.debug', '{"items":["01","02","03","04"]}')
|
|
29
28
|
I.click('[data-schemapath="root.items"] .form-control:nth-of-type(5)')
|
|
30
29
|
I.click('.get-value')
|
|
31
|
-
|
|
30
|
+
I.waitForValue('.debug', '{"items":["01","02","03","04","05"]}')
|
|
32
31
|
I.click('[data-schemapath="root.items"] .form-control:nth-of-type(6)')
|
|
33
32
|
I.click('.get-value')
|
|
34
|
-
|
|
33
|
+
I.waitForValue('.debug', '{"items":["01","02","03","04","05","06"]}')
|
|
35
34
|
I.click('[data-schemapath="root.items"] .form-control:nth-of-type(7)')
|
|
36
35
|
I.click('.get-value')
|
|
37
|
-
|
|
36
|
+
I.waitForValue('.debug', '{"items":["01","02","03","04","05","06","07"]}')
|
|
38
37
|
I.click('[data-schemapath="root.items"] .form-control:nth-of-type(8)')
|
|
39
38
|
I.click('.get-value')
|
|
40
|
-
|
|
39
|
+
I.waitForValue('.debug', '{"items":["01","02","03","04","05","06","07","08"]}')
|
|
41
40
|
I.click('[data-schemapath="root.items"] .form-control:nth-of-type(9)')
|
|
42
41
|
I.click('.get-value')
|
|
43
|
-
|
|
42
|
+
I.waitForValue('.debug', '{"items":["01","02","03","04","05","06","07","08","09"]}')
|
|
44
43
|
I.click('[data-schemapath="root.items"] .form-control:nth-of-type(10)')
|
|
45
44
|
I.click('.get-value')
|
|
46
|
-
|
|
45
|
+
I.waitForValue('.debug', '{"items":["01","02","03","04","05","06","07","08","09","10"]}')
|
|
47
46
|
I.click('[data-schemapath="root.items"] .form-control:nth-of-type(11)')
|
|
48
47
|
I.click('.get-value')
|
|
49
|
-
|
|
48
|
+
I.waitForValue('.debug', '{"items":["01","02","03","04","05","06","07","08","09","10","11"]}')
|
|
50
49
|
I.click('[data-schemapath="root.items"] .form-control:nth-of-type(12)')
|
|
51
50
|
I.click('.get-value')
|
|
52
|
-
|
|
51
|
+
I.waitForValue('.debug', '{"items":["01","02","03","04","05","06","07","08","09","10","11","12"]}')
|
|
53
52
|
I.click('[data-schemapath="root.items"] .form-control:nth-of-type(13)')
|
|
54
53
|
I.click('.get-value')
|
|
55
|
-
|
|
54
|
+
I.waitForValue('.debug', '{"items":["01","02","03","04","05","06","07","08","09","10","11","12","13"]}')
|
|
56
55
|
I.click('[data-schemapath="root.items"] .form-control:nth-of-type(14)')
|
|
57
56
|
I.click('.get-value')
|
|
58
|
-
|
|
57
|
+
I.waitForValue('.debug', '{"items":["01","02","03","04","05","06","07","08","09","10","11","12","13","14"]}')
|
|
59
58
|
I.click('[data-schemapath="root.items"] .form-control:nth-of-type(15)')
|
|
60
59
|
I.click('.get-value')
|
|
61
|
-
|
|
62
|
-
})
|
|
63
|
-
|
|
64
|
-
Scenario('should array editor events (table) @array-events', async (I) => {
|
|
65
|
-
I.amOnPage('array-events-table.html')
|
|
66
|
-
I.seeElement('[data-schemapath="root.0"]')
|
|
67
|
-
I.seeElement('[data-schemapath="root.1"]')
|
|
68
|
-
I.seeElement('[data-schemapath="root.2"]')
|
|
69
|
-
I.seeElement('[data-schemapath="root.3"]')
|
|
70
|
-
I.seeElement('[data-schemapath="root.4"]')
|
|
71
|
-
I.click('.get-value')
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
I.
|
|
76
|
-
I.
|
|
77
|
-
I.
|
|
78
|
-
I.
|
|
79
|
-
I.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
I.
|
|
84
|
-
I.
|
|
85
|
-
I.
|
|
86
|
-
I.
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
I.
|
|
92
|
-
I.click('
|
|
93
|
-
I.
|
|
94
|
-
|
|
95
|
-
I.
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
I.
|
|
100
|
-
I.
|
|
101
|
-
I.retry({ retries: 5, minTimeout: 500 }).seeInPopup('addRow');
|
|
102
|
-
I.acceptPopup();
|
|
103
|
-
I.click('.get-value');
|
|
104
|
-
value = await I.grabValueFrom('.debug');
|
|
105
|
-
assert.equal(value, '["B","C","A","A","D","E",""]');
|
|
60
|
+
I.waitForValue('.debug', '{"items":["01","02","03","04","05","06","07","08","09","10","11","12","13","14","15"]}')
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
Scenario('should array editor events (table) @array-events', async ({ I }) => {
|
|
64
|
+
I.amOnPage('array-events-table.html')
|
|
65
|
+
I.seeElement('[data-schemapath="root.0"]')
|
|
66
|
+
I.seeElement('[data-schemapath="root.1"]')
|
|
67
|
+
I.seeElement('[data-schemapath="root.2"]')
|
|
68
|
+
I.seeElement('[data-schemapath="root.3"]')
|
|
69
|
+
I.seeElement('[data-schemapath="root.4"]')
|
|
70
|
+
I.click('.get-value')
|
|
71
|
+
I.waitForValue('.debug', '["A","B","C","D","E"]')
|
|
72
|
+
|
|
73
|
+
I.amAcceptingPopups()
|
|
74
|
+
I.click('//button[contains(@class, "json-editor-btn-moveup") and @data-i="1"]')
|
|
75
|
+
I.retry({ retries: 5, minTimeout: 500 }).seeInPopup('moveRow')
|
|
76
|
+
I.acceptPopup()
|
|
77
|
+
I.click('.get-value')
|
|
78
|
+
I.waitForValue('.debug', '["B","A","C","D","E"]')
|
|
79
|
+
|
|
80
|
+
I.amAcceptingPopups()
|
|
81
|
+
I.click('//button[contains(@class, "json-editor-btn-movedown") and @data-i="1"]')
|
|
82
|
+
I.retry({ retries: 5, minTimeout: 500 }).seeInPopup('moveRow')
|
|
83
|
+
I.acceptPopup()
|
|
84
|
+
I.click('.get-value')
|
|
85
|
+
I.waitForValue('.debug', '["B","C","A","D","E"]')
|
|
86
|
+
|
|
87
|
+
I.amAcceptingPopups()
|
|
88
|
+
I.click('//button[contains(@class, "json-editor-btn-copy") and @data-i="2"]')
|
|
89
|
+
I.retry({ retries: 5, minTimeout: 500 }).seeInPopup('copyRow')
|
|
90
|
+
I.acceptPopup()
|
|
91
|
+
I.click('.get-value')
|
|
92
|
+
I.waitForValue('.debug', '["B","C","A","A","D","E"]')
|
|
93
|
+
|
|
94
|
+
I.amAcceptingPopups()
|
|
95
|
+
I.click('.json-editor-btntype-add')
|
|
96
|
+
I.retry({ retries: 5, minTimeout: 500 }).seeInPopup('addRow')
|
|
97
|
+
I.acceptPopup()
|
|
98
|
+
I.click('.get-value')
|
|
99
|
+
I.waitForValue('.debug', '["B","C","A","A","D","E",""]')
|
|
106
100
|
|
|
107
101
|
// This test will fail when using Puppeteer due to the way Puppeteer handles popups.
|
|
108
102
|
// Puppeteer apparently only sees the text in the last popup, so it doesn't see the
|
|
109
|
-
// 'Are you sure you want to remove this
|
|
103
|
+
// 'Are you sure you want to remove this item?' popup text.
|
|
110
104
|
// ToDo: Change test so instead of using popup for test values like 'deleteRow', use a
|
|
111
105
|
// form field. Similar to the '.debug' field.
|
|
112
|
-
I.amAcceptingPopups()
|
|
113
|
-
I.click('.json-editor-btntype-deletelast')
|
|
114
|
-
I.retry({ retries: 5, minTimeout: 500 }).seeInPopup('Are you sure you want to remove this
|
|
115
|
-
I.acceptPopup()
|
|
116
|
-
I.amAcceptingPopups()
|
|
117
|
-
I.retry({ retries: 5, minTimeout: 500 }).seeInPopup('deleteRow')
|
|
118
|
-
I.acceptPopup()
|
|
119
|
-
I.click('.get-value')
|
|
120
|
-
|
|
121
|
-
assert.equal(value, '["B","C","A","A","D","E"]');
|
|
106
|
+
I.amAcceptingPopups()
|
|
107
|
+
I.click('.json-editor-btntype-deletelast')
|
|
108
|
+
I.retry({ retries: 5, minTimeout: 500 }).seeInPopup('Are you sure you want to remove this item?')
|
|
109
|
+
I.acceptPopup()
|
|
110
|
+
I.amAcceptingPopups()
|
|
111
|
+
I.retry({ retries: 5, minTimeout: 500 }).seeInPopup('deleteRow')
|
|
112
|
+
I.acceptPopup()
|
|
113
|
+
I.click('.get-value')
|
|
114
|
+
I.waitForValue('.debug', '["B","C","A","A","D","E"]')
|
|
122
115
|
|
|
123
116
|
// This test will fail when using Puppeteer due to the way Puppeteer handles popups.
|
|
124
|
-
I.amAcceptingPopups()
|
|
125
|
-
I.click('.json-editor-btntype-deleteall')
|
|
126
|
-
I.retry({ retries: 5, minTimeout: 500 }).seeInPopup('Are you sure you want to remove this
|
|
127
|
-
I.acceptPopup()
|
|
128
|
-
I.amAcceptingPopups()
|
|
129
|
-
I.retry({ retries: 5, minTimeout: 500 }).seeInPopup('deleteAllRows')
|
|
130
|
-
I.acceptPopup()
|
|
131
|
-
I.click('.get-value')
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
I.
|
|
138
|
-
I.seeElement('[data-schemapath="root.
|
|
139
|
-
I.
|
|
140
|
-
I.
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
I.
|
|
144
|
-
|
|
145
|
-
I.
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
I.
|
|
149
|
-
|
|
150
|
-
I.
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
I.
|
|
154
|
-
|
|
155
|
-
I.
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
I.
|
|
159
|
-
I.
|
|
160
|
-
I.
|
|
161
|
-
I.
|
|
162
|
-
|
|
163
|
-
I.
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
I.
|
|
167
|
-
I.
|
|
168
|
-
I.
|
|
169
|
-
I.
|
|
170
|
-
|
|
171
|
-
I.
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
I.
|
|
177
|
-
I.click('Add String')
|
|
178
|
-
I.click('Add String')
|
|
179
|
-
I.click('Add String')
|
|
180
|
-
I.click('Add String')
|
|
181
|
-
I.
|
|
182
|
-
I.seeElement('[name="root[
|
|
183
|
-
I.seeElement('[name="root[
|
|
184
|
-
I.seeElement('[name="root[
|
|
185
|
-
I.seeElement('[name="root[
|
|
186
|
-
I.
|
|
187
|
-
I.fillField('[name="root[
|
|
188
|
-
I.fillField('[name="root[
|
|
189
|
-
I.fillField('[name="root[
|
|
190
|
-
I.fillField('[name="root[
|
|
191
|
-
I.
|
|
192
|
-
I.
|
|
193
|
-
assert.equal(await I.grabValueFrom('.debug'), '["1","2","3","4","5"]');
|
|
117
|
+
I.amAcceptingPopups()
|
|
118
|
+
I.click('.json-editor-btntype-deleteall')
|
|
119
|
+
I.retry({ retries: 5, minTimeout: 500 }).seeInPopup('Are you sure you want to remove this item?')
|
|
120
|
+
I.acceptPopup()
|
|
121
|
+
I.amAcceptingPopups()
|
|
122
|
+
I.retry({ retries: 5, minTimeout: 500 }).seeInPopup('deleteAllRows')
|
|
123
|
+
I.acceptPopup()
|
|
124
|
+
I.click('.get-value')
|
|
125
|
+
I.waitForValue('.debug', '[]')
|
|
126
|
+
})
|
|
127
|
+
|
|
128
|
+
Scenario('should array editor events @array-events', async ({ I }) => {
|
|
129
|
+
I.amOnPage('array-events.html')
|
|
130
|
+
I.seeElement('[data-schemapath="root.0"]')
|
|
131
|
+
I.seeElement('[data-schemapath="root.1"]')
|
|
132
|
+
I.click('.get-value')
|
|
133
|
+
I.waitForValue('.debug', '["A","B"]')
|
|
134
|
+
|
|
135
|
+
I.click('.json-editor-btn-moveup')
|
|
136
|
+
I.waitForValue('.action', 'moveRow')
|
|
137
|
+
I.click('.get-value')
|
|
138
|
+
I.waitForValue('.debug', '["B","A"]')
|
|
139
|
+
|
|
140
|
+
I.click('.json-editor-btn-movedown')
|
|
141
|
+
I.waitForValue('.action', 'moveRow')
|
|
142
|
+
I.click('.get-value')
|
|
143
|
+
I.waitForValue('.debug', '["A","B"]')
|
|
144
|
+
|
|
145
|
+
I.click('.json-editor-btntype-add')
|
|
146
|
+
I.waitForValue('.action', 'addRow')
|
|
147
|
+
I.click('.get-value')
|
|
148
|
+
I.waitForValue('.debug', '["A","B",""]')
|
|
149
|
+
|
|
150
|
+
I.amAcceptingPopups()
|
|
151
|
+
I.click('.json-editor-btntype-deletelast')
|
|
152
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
153
|
+
I.acceptPopup()
|
|
154
|
+
I.waitForValue('.action', 'deleteRow')
|
|
155
|
+
I.click('.get-value')
|
|
156
|
+
I.waitForValue('.debug', '["A","B"]')
|
|
157
|
+
|
|
158
|
+
I.amAcceptingPopups()
|
|
159
|
+
I.click('.json-editor-btntype-deleteall')
|
|
160
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
161
|
+
I.acceptPopup()
|
|
162
|
+
I.waitForValue('.action', 'deleteAllRows')
|
|
163
|
+
I.click('.get-value')
|
|
164
|
+
I.waitForValue('.debug', '[]')
|
|
165
|
+
})
|
|
166
|
+
|
|
167
|
+
Scenario('should work well with string editors', async ({ I }) => {
|
|
168
|
+
I.amOnPage('array-strings.html')
|
|
169
|
+
I.click('Add String')
|
|
170
|
+
I.click('Add String')
|
|
171
|
+
I.click('Add String')
|
|
172
|
+
I.click('Add String')
|
|
173
|
+
I.click('Add String')
|
|
174
|
+
I.seeElement('[name="root[0]"]')
|
|
175
|
+
I.seeElement('[name="root[1]"]')
|
|
176
|
+
I.seeElement('[name="root[2]"]')
|
|
177
|
+
I.seeElement('[name="root[3]"]')
|
|
178
|
+
I.seeElement('[name="root[4]"]')
|
|
179
|
+
I.fillField('[name="root[0]"]', '1')
|
|
180
|
+
I.fillField('[name="root[1]"]', '2')
|
|
181
|
+
I.fillField('[name="root[2]"]', '3')
|
|
182
|
+
I.fillField('[name="root[3]"]', '4')
|
|
183
|
+
I.fillField('[name="root[4]"]', '5')
|
|
184
|
+
I.click('.get-value')
|
|
185
|
+
I.waitForValue('.debug', '["1","2","3","4","5"]')
|
|
194
186
|
|
|
195
187
|
// shuffle
|
|
196
|
-
I.click('.moveup[data-i="4"]')
|
|
197
|
-
I.click('.moveup[data-i="2"]')
|
|
198
|
-
I.click('.moveup[data-i="1"]')
|
|
199
|
-
I.click('.get-value')
|
|
200
|
-
|
|
188
|
+
I.click('.moveup[data-i="4"]')
|
|
189
|
+
I.click('.moveup[data-i="2"]')
|
|
190
|
+
I.click('.moveup[data-i="1"]')
|
|
191
|
+
I.click('.get-value')
|
|
192
|
+
I.waitForValue('.debug', '["3","1","2","5","4"]')
|
|
201
193
|
|
|
202
194
|
// delete single
|
|
203
|
-
I.see('String 5')
|
|
204
|
-
I.amCancellingPopups()
|
|
205
|
-
I.click('[data-schemapath="root.4"] .delete')
|
|
206
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
207
|
-
I.cancelPopup()
|
|
208
|
-
I.see('String 5')
|
|
209
|
-
I.amAcceptingPopups()
|
|
210
|
-
I.click('[data-schemapath="root.4"] .delete')
|
|
211
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
212
|
-
I.acceptPopup()
|
|
213
|
-
I.dontSee('String 5')
|
|
195
|
+
I.see('String 5')
|
|
196
|
+
I.amCancellingPopups()
|
|
197
|
+
I.click('[data-schemapath="root.4"] .delete')
|
|
198
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
199
|
+
I.cancelPopup()
|
|
200
|
+
I.see('String 5')
|
|
201
|
+
I.amAcceptingPopups()
|
|
202
|
+
I.click('[data-schemapath="root.4"] .delete')
|
|
203
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
204
|
+
I.acceptPopup()
|
|
205
|
+
I.dontSee('String 5')
|
|
214
206
|
|
|
215
207
|
// delete last
|
|
216
|
-
I.see('String 4')
|
|
217
|
-
I.amCancellingPopups()
|
|
218
|
-
I.click('Delete Last String')
|
|
219
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
220
|
-
I.cancelPopup()
|
|
221
|
-
I.see('String 4')
|
|
222
|
-
I.amAcceptingPopups()
|
|
223
|
-
I.click('Delete Last String')
|
|
224
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
225
|
-
I.acceptPopup()
|
|
226
|
-
I.dontSee('String 4')
|
|
208
|
+
I.see('String 4')
|
|
209
|
+
I.amCancellingPopups()
|
|
210
|
+
I.click('Delete Last String')
|
|
211
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
212
|
+
I.cancelPopup()
|
|
213
|
+
I.see('String 4')
|
|
214
|
+
I.amAcceptingPopups()
|
|
215
|
+
I.click('Delete Last String')
|
|
216
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
217
|
+
I.acceptPopup()
|
|
218
|
+
I.dontSee('String 4')
|
|
227
219
|
|
|
228
220
|
// delete all
|
|
229
|
-
I.see('String 1')
|
|
230
|
-
I.see('String 2')
|
|
231
|
-
I.see('String 3')
|
|
232
|
-
I.amCancellingPopups()
|
|
233
|
-
I.click('Delete All')
|
|
234
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
235
|
-
I.cancelPopup()
|
|
236
|
-
I.see('String 1')
|
|
237
|
-
I.see('String 2')
|
|
238
|
-
I.see('String 3')
|
|
239
|
-
I.amAcceptingPopups()
|
|
240
|
-
I.click('Delete All')
|
|
241
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
242
|
-
I.acceptPopup()
|
|
243
|
-
I.dontSee('String 1')
|
|
244
|
-
I.dontSee('String 2')
|
|
245
|
-
I.dontSee('String 3')
|
|
246
|
-
})
|
|
247
|
-
|
|
248
|
-
Scenario('should work well with number editors', async (I) => {
|
|
249
|
-
I.amOnPage('array-numbers.html')
|
|
250
|
-
I.click('Add Number')
|
|
251
|
-
I.click('Add Number')
|
|
252
|
-
I.click('Add Number')
|
|
253
|
-
I.click('Add Number')
|
|
254
|
-
I.click('Add Number')
|
|
255
|
-
I.seeElement('[name="root[0]"]')
|
|
256
|
-
I.seeElement('[name="root[1]"]')
|
|
257
|
-
I.seeElement('[name="root[2]"]')
|
|
258
|
-
I.seeElement('[name="root[3]"]')
|
|
259
|
-
I.seeElement('[name="root[4]"]')
|
|
260
|
-
I.fillField('[name="root[0]"]',
|
|
261
|
-
I.fillField('[name="root[1]"]',
|
|
262
|
-
I.fillField('[name="root[2]"]',
|
|
263
|
-
I.fillField('[name="root[3]"]',
|
|
264
|
-
I.fillField('[name="root[4]"]',
|
|
265
|
-
I.click('.get-value')
|
|
266
|
-
|
|
221
|
+
I.see('String 1')
|
|
222
|
+
I.see('String 2')
|
|
223
|
+
I.see('String 3')
|
|
224
|
+
I.amCancellingPopups()
|
|
225
|
+
I.click('Delete All')
|
|
226
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
227
|
+
I.cancelPopup()
|
|
228
|
+
I.see('String 1')
|
|
229
|
+
I.see('String 2')
|
|
230
|
+
I.see('String 3')
|
|
231
|
+
I.amAcceptingPopups()
|
|
232
|
+
I.click('Delete All')
|
|
233
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
234
|
+
I.acceptPopup()
|
|
235
|
+
I.dontSee('String 1')
|
|
236
|
+
I.dontSee('String 2')
|
|
237
|
+
I.dontSee('String 3')
|
|
238
|
+
})
|
|
239
|
+
|
|
240
|
+
Scenario('should work well with number editors', async ({ I }) => {
|
|
241
|
+
I.amOnPage('array-numbers.html')
|
|
242
|
+
I.click('Add Number')
|
|
243
|
+
I.click('Add Number')
|
|
244
|
+
I.click('Add Number')
|
|
245
|
+
I.click('Add Number')
|
|
246
|
+
I.click('Add Number')
|
|
247
|
+
I.seeElement('[name="root[0]"]')
|
|
248
|
+
I.seeElement('[name="root[1]"]')
|
|
249
|
+
I.seeElement('[name="root[2]"]')
|
|
250
|
+
I.seeElement('[name="root[3]"]')
|
|
251
|
+
I.seeElement('[name="root[4]"]')
|
|
252
|
+
I.fillField('[name="root[0]"]', '1')
|
|
253
|
+
I.fillField('[name="root[1]"]', '2')
|
|
254
|
+
I.fillField('[name="root[2]"]', '3')
|
|
255
|
+
I.fillField('[name="root[3]"]', '4')
|
|
256
|
+
I.fillField('[name="root[4]"]', '5')
|
|
257
|
+
I.click('.get-value')
|
|
258
|
+
I.waitForValue('.debug', '[1,2,3,4,5]')
|
|
267
259
|
|
|
268
260
|
// shuffle
|
|
269
|
-
I.click('.moveup[data-i="4"]')
|
|
270
|
-
I.click('.moveup[data-i="2"]')
|
|
271
|
-
I.click('.moveup[data-i="1"]')
|
|
272
|
-
I.click('.get-value')
|
|
273
|
-
|
|
261
|
+
I.click('.moveup[data-i="4"]')
|
|
262
|
+
I.click('.moveup[data-i="2"]')
|
|
263
|
+
I.click('.moveup[data-i="1"]')
|
|
264
|
+
I.click('.get-value')
|
|
265
|
+
I.waitForValue('.debug', '[3,1,2,5,4]')
|
|
274
266
|
|
|
275
267
|
// delete single
|
|
276
|
-
I.see('Number 5')
|
|
277
|
-
I.amCancellingPopups()
|
|
278
|
-
I.click('[data-schemapath="root.4"] .delete')
|
|
279
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
280
|
-
I.cancelPopup()
|
|
281
|
-
I.see('Number 5')
|
|
282
|
-
I.amAcceptingPopups()
|
|
283
|
-
I.click('[data-schemapath="root.4"] .delete')
|
|
284
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
285
|
-
I.acceptPopup()
|
|
286
|
-
I.dontSee('Number 5')
|
|
268
|
+
I.see('Number 5')
|
|
269
|
+
I.amCancellingPopups()
|
|
270
|
+
I.click('[data-schemapath="root.4"] .delete')
|
|
271
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
272
|
+
I.cancelPopup()
|
|
273
|
+
I.see('Number 5')
|
|
274
|
+
I.amAcceptingPopups()
|
|
275
|
+
I.click('[data-schemapath="root.4"] .delete')
|
|
276
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
277
|
+
I.acceptPopup()
|
|
278
|
+
I.dontSee('Number 5')
|
|
287
279
|
|
|
288
280
|
// delete last
|
|
289
|
-
I.see('Number 4')
|
|
290
|
-
I.amCancellingPopups()
|
|
291
|
-
I.click('Delete Last Number')
|
|
292
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
293
|
-
I.cancelPopup()
|
|
294
|
-
I.see('Number 4')
|
|
295
|
-
I.amAcceptingPopups()
|
|
296
|
-
I.click('Delete Last Number')
|
|
297
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
298
|
-
I.acceptPopup()
|
|
299
|
-
I.dontSee('Number 4')
|
|
281
|
+
I.see('Number 4')
|
|
282
|
+
I.amCancellingPopups()
|
|
283
|
+
I.click('Delete Last Number')
|
|
284
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
285
|
+
I.cancelPopup()
|
|
286
|
+
I.see('Number 4')
|
|
287
|
+
I.amAcceptingPopups()
|
|
288
|
+
I.click('Delete Last Number')
|
|
289
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
290
|
+
I.acceptPopup()
|
|
291
|
+
I.dontSee('Number 4')
|
|
300
292
|
|
|
301
293
|
// delete all
|
|
302
|
-
I.see('Number 1')
|
|
303
|
-
I.see('Number 2')
|
|
304
|
-
I.see('Number 3')
|
|
305
|
-
I.amCancellingPopups()
|
|
306
|
-
I.click('Delete All')
|
|
307
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
308
|
-
I.cancelPopup()
|
|
309
|
-
I.see('Number 1')
|
|
310
|
-
I.see('Number 2')
|
|
311
|
-
I.see('Number 3')
|
|
312
|
-
I.amAcceptingPopups()
|
|
313
|
-
I.click('Delete All')
|
|
314
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
315
|
-
I.acceptPopup()
|
|
316
|
-
I.dontSee('Number 1')
|
|
317
|
-
I.dontSee('Number 2')
|
|
318
|
-
I.dontSee('Number 3')
|
|
319
|
-
})
|
|
320
|
-
|
|
321
|
-
Scenario('should work well with integer editors', async (I) => {
|
|
322
|
-
I.amOnPage('array-integers.html')
|
|
323
|
-
I.click('Add Integer')
|
|
324
|
-
I.click('Add Integer')
|
|
325
|
-
I.click('Add Integer')
|
|
326
|
-
I.click('Add Integer')
|
|
327
|
-
I.click('Add Integer')
|
|
328
|
-
I.seeElement('[name="root[0]"]')
|
|
329
|
-
I.seeElement('[name="root[1]"]')
|
|
330
|
-
I.seeElement('[name="root[2]"]')
|
|
331
|
-
I.seeElement('[name="root[3]"]')
|
|
332
|
-
I.seeElement('[name="root[4]"]')
|
|
333
|
-
I.fillField('[name="root[0]"]',
|
|
334
|
-
I.fillField('[name="root[1]"]',
|
|
335
|
-
I.fillField('[name="root[2]"]',
|
|
336
|
-
I.fillField('[name="root[3]"]',
|
|
337
|
-
I.fillField('[name="root[4]"]',
|
|
338
|
-
I.click('.get-value')
|
|
339
|
-
|
|
294
|
+
I.see('Number 1')
|
|
295
|
+
I.see('Number 2')
|
|
296
|
+
I.see('Number 3')
|
|
297
|
+
I.amCancellingPopups()
|
|
298
|
+
I.click('Delete All')
|
|
299
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
300
|
+
I.cancelPopup()
|
|
301
|
+
I.see('Number 1')
|
|
302
|
+
I.see('Number 2')
|
|
303
|
+
I.see('Number 3')
|
|
304
|
+
I.amAcceptingPopups()
|
|
305
|
+
I.click('Delete All')
|
|
306
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
307
|
+
I.acceptPopup()
|
|
308
|
+
I.dontSee('Number 1')
|
|
309
|
+
I.dontSee('Number 2')
|
|
310
|
+
I.dontSee('Number 3')
|
|
311
|
+
})
|
|
312
|
+
|
|
313
|
+
Scenario('should work well with integer editors', async ({ I }) => {
|
|
314
|
+
I.amOnPage('array-integers.html')
|
|
315
|
+
I.click('Add Integer')
|
|
316
|
+
I.click('Add Integer')
|
|
317
|
+
I.click('Add Integer')
|
|
318
|
+
I.click('Add Integer')
|
|
319
|
+
I.click('Add Integer')
|
|
320
|
+
I.seeElement('[name="root[0]"]')
|
|
321
|
+
I.seeElement('[name="root[1]"]')
|
|
322
|
+
I.seeElement('[name="root[2]"]')
|
|
323
|
+
I.seeElement('[name="root[3]"]')
|
|
324
|
+
I.seeElement('[name="root[4]"]')
|
|
325
|
+
I.fillField('[name="root[0]"]', '1')
|
|
326
|
+
I.fillField('[name="root[1]"]', '2')
|
|
327
|
+
I.fillField('[name="root[2]"]', '3')
|
|
328
|
+
I.fillField('[name="root[3]"]', '4')
|
|
329
|
+
I.fillField('[name="root[4]"]', '5')
|
|
330
|
+
I.click('.get-value')
|
|
331
|
+
I.waitForValue('.debug', '[1,2,3,4,5]')
|
|
340
332
|
|
|
341
333
|
// shuffle
|
|
342
|
-
I.click('.moveup[data-i="4"]')
|
|
343
|
-
I.click('.moveup[data-i="2"]')
|
|
344
|
-
I.click('.moveup[data-i="1"]')
|
|
345
|
-
I.click('.get-value')
|
|
346
|
-
|
|
334
|
+
I.click('.moveup[data-i="4"]')
|
|
335
|
+
I.click('.moveup[data-i="2"]')
|
|
336
|
+
I.click('.moveup[data-i="1"]')
|
|
337
|
+
I.click('.get-value')
|
|
338
|
+
I.waitForValue('.debug', '[3,1,2,5,4]')
|
|
347
339
|
|
|
348
340
|
// delete single
|
|
349
|
-
I.see('Integer 5')
|
|
350
|
-
I.amCancellingPopups()
|
|
351
|
-
I.click('[data-schemapath="root.4"] .delete')
|
|
352
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
353
|
-
I.cancelPopup()
|
|
354
|
-
I.see('Integer 5')
|
|
355
|
-
I.amAcceptingPopups()
|
|
356
|
-
I.click('[data-schemapath="root.4"] .delete')
|
|
357
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
358
|
-
I.acceptPopup()
|
|
359
|
-
I.dontSee('Integer 5')
|
|
341
|
+
I.see('Integer 5')
|
|
342
|
+
I.amCancellingPopups()
|
|
343
|
+
I.click('[data-schemapath="root.4"] .delete')
|
|
344
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
345
|
+
I.cancelPopup()
|
|
346
|
+
I.see('Integer 5')
|
|
347
|
+
I.amAcceptingPopups()
|
|
348
|
+
I.click('[data-schemapath="root.4"] .delete')
|
|
349
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
350
|
+
I.acceptPopup()
|
|
351
|
+
I.dontSee('Integer 5')
|
|
360
352
|
|
|
361
353
|
// delete last
|
|
362
|
-
I.see('Integer 4')
|
|
363
|
-
I.amCancellingPopups()
|
|
364
|
-
I.click('Delete Last Integer')
|
|
365
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
366
|
-
I.cancelPopup()
|
|
367
|
-
I.see('Integer 4')
|
|
368
|
-
I.amAcceptingPopups()
|
|
369
|
-
I.click('Delete Last Integer')
|
|
370
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
371
|
-
I.acceptPopup()
|
|
372
|
-
I.dontSee('Integer 4')
|
|
354
|
+
I.see('Integer 4')
|
|
355
|
+
I.amCancellingPopups()
|
|
356
|
+
I.click('Delete Last Integer')
|
|
357
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
358
|
+
I.cancelPopup()
|
|
359
|
+
I.see('Integer 4')
|
|
360
|
+
I.amAcceptingPopups()
|
|
361
|
+
I.click('Delete Last Integer')
|
|
362
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
363
|
+
I.acceptPopup()
|
|
364
|
+
I.dontSee('Integer 4')
|
|
373
365
|
|
|
374
366
|
// delete all
|
|
375
|
-
I.see('Integer 1')
|
|
376
|
-
I.see('Integer 2')
|
|
377
|
-
I.see('Integer 3')
|
|
378
|
-
I.amCancellingPopups()
|
|
379
|
-
I.click('Delete All')
|
|
380
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
381
|
-
I.cancelPopup()
|
|
382
|
-
I.see('Integer 1')
|
|
383
|
-
I.see('Integer 2')
|
|
384
|
-
I.see('Integer 3')
|
|
385
|
-
I.amAcceptingPopups()
|
|
386
|
-
I.click('Delete All')
|
|
387
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
388
|
-
I.acceptPopup()
|
|
389
|
-
I.dontSee('Integer 1')
|
|
390
|
-
I.dontSee('Integer 2')
|
|
391
|
-
I.dontSee('Integer 3')
|
|
392
|
-
})
|
|
393
|
-
|
|
394
|
-
Scenario('should work well with select editors', async (I) => {
|
|
395
|
-
I.amOnPage('array-selects.html')
|
|
396
|
-
I.click('Add Select')
|
|
397
|
-
I.click('Add Select')
|
|
398
|
-
I.seeElement('[name="root[0]"]')
|
|
399
|
-
I.seeElement('[name="root[1]"]')
|
|
400
|
-
I.selectOption('[name="root[0]"]',
|
|
401
|
-
I.selectOption('[name="root[1]"]',
|
|
402
|
-
I.click('.get-value')
|
|
403
|
-
|
|
367
|
+
I.see('Integer 1')
|
|
368
|
+
I.see('Integer 2')
|
|
369
|
+
I.see('Integer 3')
|
|
370
|
+
I.amCancellingPopups()
|
|
371
|
+
I.click('Delete All')
|
|
372
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
373
|
+
I.cancelPopup()
|
|
374
|
+
I.see('Integer 1')
|
|
375
|
+
I.see('Integer 2')
|
|
376
|
+
I.see('Integer 3')
|
|
377
|
+
I.amAcceptingPopups()
|
|
378
|
+
I.click('Delete All')
|
|
379
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
380
|
+
I.acceptPopup()
|
|
381
|
+
I.dontSee('Integer 1')
|
|
382
|
+
I.dontSee('Integer 2')
|
|
383
|
+
I.dontSee('Integer 3')
|
|
384
|
+
})
|
|
385
|
+
|
|
386
|
+
Scenario('should work well with select editors', async ({ I }) => {
|
|
387
|
+
I.amOnPage('array-selects.html')
|
|
388
|
+
I.click('Add Select')
|
|
389
|
+
I.click('Add Select')
|
|
390
|
+
I.seeElement('[name="root[0]"]')
|
|
391
|
+
I.seeElement('[name="root[1]"]')
|
|
392
|
+
I.selectOption('[name="root[0]"]', 'true')
|
|
393
|
+
I.selectOption('[name="root[1]"]', 'false')
|
|
394
|
+
I.click('.get-value')
|
|
395
|
+
I.waitForValue('.debug', '[true,false]')
|
|
404
396
|
|
|
405
397
|
// shuffle
|
|
406
|
-
I.click('.moveup[data-i="1"]')
|
|
407
|
-
I.click('.get-value')
|
|
408
|
-
|
|
398
|
+
I.click('.moveup[data-i="1"]')
|
|
399
|
+
I.click('.get-value')
|
|
400
|
+
I.waitForValue('.debug', '[false,true]')
|
|
409
401
|
|
|
410
402
|
// delete single
|
|
411
|
-
I.click('Add Select')
|
|
412
|
-
I.click('Add Select')
|
|
413
|
-
I.click('Add Select')
|
|
414
|
-
I.see('Select 5')
|
|
415
|
-
I.amCancellingPopups()
|
|
416
|
-
I.click('[data-schemapath="root.4"] .delete')
|
|
417
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
418
|
-
I.cancelPopup()
|
|
419
|
-
I.see('Select 5')
|
|
420
|
-
I.amAcceptingPopups()
|
|
421
|
-
I.click('[data-schemapath="root.4"] .delete')
|
|
422
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
423
|
-
I.acceptPopup()
|
|
424
|
-
I.dontSee('Select 5')
|
|
403
|
+
I.click('Add Select')
|
|
404
|
+
I.click('Add Select')
|
|
405
|
+
I.click('Add Select')
|
|
406
|
+
I.see('Select 5')
|
|
407
|
+
I.amCancellingPopups()
|
|
408
|
+
I.click('[data-schemapath="root.4"] .delete')
|
|
409
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
410
|
+
I.cancelPopup()
|
|
411
|
+
I.see('Select 5')
|
|
412
|
+
I.amAcceptingPopups()
|
|
413
|
+
I.click('[data-schemapath="root.4"] .delete')
|
|
414
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
415
|
+
I.acceptPopup()
|
|
416
|
+
I.dontSee('Select 5')
|
|
425
417
|
|
|
426
418
|
// delete last
|
|
427
|
-
I.see('Select 4')
|
|
428
|
-
I.amCancellingPopups()
|
|
429
|
-
I.click('Delete Last Select')
|
|
430
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
431
|
-
I.cancelPopup()
|
|
432
|
-
I.see('Select 4')
|
|
433
|
-
I.amAcceptingPopups()
|
|
434
|
-
I.click('Delete Last Select')
|
|
435
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
436
|
-
I.acceptPopup()
|
|
437
|
-
I.dontSee('Select 4')
|
|
419
|
+
I.see('Select 4')
|
|
420
|
+
I.amCancellingPopups()
|
|
421
|
+
I.click('Delete Last Select')
|
|
422
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
423
|
+
I.cancelPopup()
|
|
424
|
+
I.see('Select 4')
|
|
425
|
+
I.amAcceptingPopups()
|
|
426
|
+
I.click('Delete Last Select')
|
|
427
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
428
|
+
I.acceptPopup()
|
|
429
|
+
I.dontSee('Select 4')
|
|
438
430
|
|
|
439
431
|
// delete all
|
|
440
|
-
I.see('Select 1')
|
|
441
|
-
I.see('Select 2')
|
|
442
|
-
I.see('Select 3')
|
|
443
|
-
I.amCancellingPopups()
|
|
444
|
-
I.click('Delete All')
|
|
445
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
446
|
-
I.cancelPopup()
|
|
447
|
-
I.see('Select 1')
|
|
448
|
-
I.see('Select 2')
|
|
449
|
-
I.see('Select 3')
|
|
450
|
-
I.amAcceptingPopups()
|
|
451
|
-
I.click('Delete All')
|
|
452
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
453
|
-
I.acceptPopup()
|
|
454
|
-
I.dontSee('Select 1')
|
|
455
|
-
I.dontSee('Select 2')
|
|
456
|
-
I.dontSee('Select 3')
|
|
457
|
-
})
|
|
458
|
-
|
|
459
|
-
Scenario('should work well with checkbox editors', async (I) => {
|
|
460
|
-
I.amOnPage('array-checkboxes.html')
|
|
461
|
-
I.click('Add Checkbox')
|
|
462
|
-
I.click('Add Checkbox')
|
|
463
|
-
I.click('Add Checkbox')
|
|
464
|
-
I.click('Add Checkbox')
|
|
465
|
-
I.click('Add Checkbox')
|
|
466
|
-
I.seeElement('[data-schemapath="root.0"]')
|
|
467
|
-
I.seeElement('[data-schemapath="root.1"]')
|
|
468
|
-
I.seeElement('[data-schemapath="root.2"]')
|
|
469
|
-
I.seeElement('[data-schemapath="root.3"]')
|
|
470
|
-
I.seeElement('[data-schemapath="root.4"]')
|
|
471
|
-
I.checkOption('1', '[data-schemapath="root.0"]')
|
|
472
|
-
I.checkOption('2', '[data-schemapath="root.1"]')
|
|
473
|
-
I.checkOption('3', '[data-schemapath="root.2"]')
|
|
474
|
-
I.checkOption('4', '[data-schemapath="root.3"]')
|
|
475
|
-
I.checkOption('5', '[data-schemapath="root.4"]')
|
|
476
|
-
I.click('.get-value')
|
|
477
|
-
|
|
432
|
+
I.see('Select 1')
|
|
433
|
+
I.see('Select 2')
|
|
434
|
+
I.see('Select 3')
|
|
435
|
+
I.amCancellingPopups()
|
|
436
|
+
I.click('Delete All')
|
|
437
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
438
|
+
I.cancelPopup()
|
|
439
|
+
I.see('Select 1')
|
|
440
|
+
I.see('Select 2')
|
|
441
|
+
I.see('Select 3')
|
|
442
|
+
I.amAcceptingPopups()
|
|
443
|
+
I.click('Delete All')
|
|
444
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
445
|
+
I.acceptPopup()
|
|
446
|
+
I.dontSee('Select 1')
|
|
447
|
+
I.dontSee('Select 2')
|
|
448
|
+
I.dontSee('Select 3')
|
|
449
|
+
})
|
|
450
|
+
|
|
451
|
+
Scenario('should work well with checkbox editors', async ({ I }) => {
|
|
452
|
+
I.amOnPage('array-checkboxes.html')
|
|
453
|
+
I.click('Add Checkbox')
|
|
454
|
+
I.click('Add Checkbox')
|
|
455
|
+
I.click('Add Checkbox')
|
|
456
|
+
I.click('Add Checkbox')
|
|
457
|
+
I.click('Add Checkbox')
|
|
458
|
+
I.seeElement('[data-schemapath="root.0"]')
|
|
459
|
+
I.seeElement('[data-schemapath="root.1"]')
|
|
460
|
+
I.seeElement('[data-schemapath="root.2"]')
|
|
461
|
+
I.seeElement('[data-schemapath="root.3"]')
|
|
462
|
+
I.seeElement('[data-schemapath="root.4"]')
|
|
463
|
+
I.checkOption('1', '[data-schemapath="root.0"]')
|
|
464
|
+
I.checkOption('2', '[data-schemapath="root.1"]')
|
|
465
|
+
I.checkOption('3', '[data-schemapath="root.2"]')
|
|
466
|
+
I.checkOption('4', '[data-schemapath="root.3"]')
|
|
467
|
+
I.checkOption('5', '[data-schemapath="root.4"]')
|
|
468
|
+
I.click('.get-value')
|
|
469
|
+
I.waitForValue('.debug', '[["1"],["2"],["3"],["4"],["5"]]')
|
|
478
470
|
|
|
479
471
|
// shuffle
|
|
480
|
-
I.click('.moveup[data-i="4"]')
|
|
481
|
-
I.click('.moveup[data-i="2"]')
|
|
482
|
-
I.click('.moveup[data-i="1"]')
|
|
483
|
-
I.click('.get-value')
|
|
484
|
-
|
|
472
|
+
I.click('.moveup[data-i="4"]')
|
|
473
|
+
I.click('.moveup[data-i="2"]')
|
|
474
|
+
I.click('.moveup[data-i="1"]')
|
|
475
|
+
I.click('.get-value')
|
|
476
|
+
I.waitForValue('.debug', '[["3"],["1"],["2"],["5"],["4"]]')
|
|
485
477
|
|
|
486
478
|
// delete single
|
|
487
|
-
I.see('Checkbox 5')
|
|
488
|
-
I.amCancellingPopups()
|
|
489
|
-
I.click('[data-schemapath="root.4"] .delete')
|
|
490
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
491
|
-
I.cancelPopup()
|
|
492
|
-
I.see('Checkbox 5')
|
|
493
|
-
I.amAcceptingPopups()
|
|
494
|
-
I.click('[data-schemapath="root.4"] .delete')
|
|
495
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
496
|
-
I.acceptPopup()
|
|
497
|
-
I.dontSee('Checkbox 5')
|
|
479
|
+
I.see('Checkbox 5')
|
|
480
|
+
I.amCancellingPopups()
|
|
481
|
+
I.click('[data-schemapath="root.4"] .delete')
|
|
482
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
483
|
+
I.cancelPopup()
|
|
484
|
+
I.see('Checkbox 5')
|
|
485
|
+
I.amAcceptingPopups()
|
|
486
|
+
I.click('[data-schemapath="root.4"] .delete')
|
|
487
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
488
|
+
I.acceptPopup()
|
|
489
|
+
I.dontSee('Checkbox 5')
|
|
498
490
|
|
|
499
491
|
// delete last
|
|
500
|
-
I.see('Checkbox 4')
|
|
501
|
-
I.amCancellingPopups()
|
|
502
|
-
I.click('Delete Last Checkbox')
|
|
503
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
504
|
-
I.cancelPopup()
|
|
505
|
-
I.see('Checkbox 4')
|
|
506
|
-
I.amAcceptingPopups()
|
|
507
|
-
I.click('Delete Last Checkbox')
|
|
508
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
509
|
-
I.acceptPopup()
|
|
510
|
-
I.dontSee('Checkbox 4')
|
|
492
|
+
I.see('Checkbox 4')
|
|
493
|
+
I.amCancellingPopups()
|
|
494
|
+
I.click('Delete Last Checkbox')
|
|
495
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
496
|
+
I.cancelPopup()
|
|
497
|
+
I.see('Checkbox 4')
|
|
498
|
+
I.amAcceptingPopups()
|
|
499
|
+
I.click('Delete Last Checkbox')
|
|
500
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
501
|
+
I.acceptPopup()
|
|
502
|
+
I.dontSee('Checkbox 4')
|
|
511
503
|
|
|
512
504
|
// delete all
|
|
513
|
-
I.see('Checkbox 1')
|
|
514
|
-
I.see('Checkbox 2')
|
|
515
|
-
I.see('Checkbox 3')
|
|
516
|
-
I.amCancellingPopups()
|
|
517
|
-
I.click('Delete All')
|
|
518
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
519
|
-
I.cancelPopup()
|
|
520
|
-
I.see('Checkbox 1')
|
|
521
|
-
I.see('Checkbox 2')
|
|
522
|
-
I.see('Checkbox 3')
|
|
523
|
-
I.amAcceptingPopups()
|
|
524
|
-
I.click('Delete All')
|
|
525
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
526
|
-
I.acceptPopup()
|
|
527
|
-
I.dontSee('Checkbox 1')
|
|
528
|
-
I.dontSee('Checkbox 2')
|
|
529
|
-
I.dontSee('Checkbox 3')
|
|
530
|
-
})
|
|
531
|
-
|
|
532
|
-
Scenario('should work well with checkbox editors with infoText', async (I) => {
|
|
505
|
+
I.see('Checkbox 1')
|
|
506
|
+
I.see('Checkbox 2')
|
|
507
|
+
I.see('Checkbox 3')
|
|
508
|
+
I.amCancellingPopups()
|
|
509
|
+
I.click('Delete All')
|
|
510
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
511
|
+
I.cancelPopup()
|
|
512
|
+
I.see('Checkbox 1')
|
|
513
|
+
I.see('Checkbox 2')
|
|
514
|
+
I.see('Checkbox 3')
|
|
515
|
+
I.amAcceptingPopups()
|
|
516
|
+
I.click('Delete All')
|
|
517
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
518
|
+
I.acceptPopup()
|
|
519
|
+
I.dontSee('Checkbox 1')
|
|
520
|
+
I.dontSee('Checkbox 2')
|
|
521
|
+
I.dontSee('Checkbox 3')
|
|
522
|
+
})
|
|
523
|
+
|
|
524
|
+
Scenario('should work well with checkbox editors with infoText', async ({ I }) => {
|
|
533
525
|
I.amOnPage('array-checkboxes-infotext.html')
|
|
534
526
|
|
|
535
527
|
function check (checkboxId, title, infoText) {
|
|
@@ -553,423 +545,421 @@ Scenario('should work well with checkbox editors with infoText', async (I) => {
|
|
|
553
545
|
check('root4', 'e', 'ee')
|
|
554
546
|
})
|
|
555
547
|
|
|
556
|
-
Scenario('should work well with rating editors', async (I) => {
|
|
557
|
-
I.amOnPage('array-ratings.html')
|
|
558
|
-
I.seeElement('[data-schemapath="root.0"]')
|
|
559
|
-
I.seeElement('[data-schemapath="root.1"]')
|
|
560
|
-
I.seeElement('[data-schemapath="root.2"]')
|
|
561
|
-
I.seeElement('[data-schemapath="root.3"]')
|
|
562
|
-
I.seeElement('[data-schemapath="root.4"]')
|
|
563
|
-
I.click('.get-value')
|
|
564
|
-
|
|
548
|
+
Scenario('should work well with rating editors', async ({ I }) => {
|
|
549
|
+
I.amOnPage('array-ratings.html')
|
|
550
|
+
I.seeElement('[data-schemapath="root.0"]')
|
|
551
|
+
I.seeElement('[data-schemapath="root.1"]')
|
|
552
|
+
I.seeElement('[data-schemapath="root.2"]')
|
|
553
|
+
I.seeElement('[data-schemapath="root.3"]')
|
|
554
|
+
I.seeElement('[data-schemapath="root.4"]')
|
|
555
|
+
I.click('.get-value')
|
|
556
|
+
I.waitForValue('.debug', '[1,2,3,4,5]')
|
|
565
557
|
|
|
566
558
|
// shuffle
|
|
567
|
-
I.click('.moveup[data-i="4"]')
|
|
568
|
-
I.click('.moveup[data-i="2"]')
|
|
569
|
-
I.click('.moveup[data-i="1"]')
|
|
570
|
-
I.click('.get-value')
|
|
571
|
-
|
|
559
|
+
I.click('.moveup[data-i="4"]')
|
|
560
|
+
I.click('.moveup[data-i="2"]')
|
|
561
|
+
I.click('.moveup[data-i="1"]')
|
|
562
|
+
I.click('.get-value')
|
|
563
|
+
I.waitForValue('.debug', '[3,1,2,5,4]')
|
|
572
564
|
|
|
573
565
|
// delete single
|
|
574
|
-
I.see('Rating 5')
|
|
575
|
-
I.amCancellingPopups()
|
|
576
|
-
I.click('[data-schemapath="root.4"] .delete')
|
|
577
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
578
|
-
I.cancelPopup()
|
|
579
|
-
I.see('Rating 5')
|
|
580
|
-
I.amAcceptingPopups()
|
|
581
|
-
I.click('[data-schemapath="root.4"] .delete')
|
|
582
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
583
|
-
I.acceptPopup()
|
|
584
|
-
I.dontSee('Rating 5')
|
|
566
|
+
I.see('Rating 5')
|
|
567
|
+
I.amCancellingPopups()
|
|
568
|
+
I.click('[data-schemapath="root.4"] .delete')
|
|
569
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
570
|
+
I.cancelPopup()
|
|
571
|
+
I.see('Rating 5')
|
|
572
|
+
I.amAcceptingPopups()
|
|
573
|
+
I.click('[data-schemapath="root.4"] .delete')
|
|
574
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
575
|
+
I.acceptPopup()
|
|
576
|
+
I.dontSee('Rating 5')
|
|
585
577
|
|
|
586
578
|
// delete last
|
|
587
|
-
I.see('Rating 4')
|
|
588
|
-
I.amCancellingPopups()
|
|
589
|
-
I.click('Delete Last Rating')
|
|
590
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
591
|
-
I.cancelPopup()
|
|
592
|
-
I.see('Rating 4')
|
|
593
|
-
I.amAcceptingPopups()
|
|
594
|
-
I.click('Delete Last Rating')
|
|
595
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
596
|
-
I.acceptPopup()
|
|
597
|
-
I.dontSee('Rating 4')
|
|
579
|
+
I.see('Rating 4')
|
|
580
|
+
I.amCancellingPopups()
|
|
581
|
+
I.click('Delete Last Rating')
|
|
582
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
583
|
+
I.cancelPopup()
|
|
584
|
+
I.see('Rating 4')
|
|
585
|
+
I.amAcceptingPopups()
|
|
586
|
+
I.click('Delete Last Rating')
|
|
587
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
588
|
+
I.acceptPopup()
|
|
589
|
+
I.dontSee('Rating 4')
|
|
598
590
|
|
|
599
591
|
// delete all
|
|
600
|
-
I.see('Rating 1')
|
|
601
|
-
I.see('Rating 2')
|
|
602
|
-
I.see('Rating 3')
|
|
603
|
-
I.amCancellingPopups()
|
|
604
|
-
I.click('Delete All')
|
|
605
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
606
|
-
I.cancelPopup()
|
|
607
|
-
I.see('Rating 1')
|
|
608
|
-
I.see('Rating 2')
|
|
609
|
-
I.see('Rating 3')
|
|
610
|
-
I.amAcceptingPopups()
|
|
611
|
-
I.click('Delete All')
|
|
612
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
613
|
-
I.acceptPopup()
|
|
614
|
-
I.dontSee('Rating 1')
|
|
615
|
-
I.dontSee('Rating 2')
|
|
616
|
-
I.dontSee('Rating 3')
|
|
617
|
-
})
|
|
618
|
-
|
|
619
|
-
Scenario('should work well with multiselect editors', async (I) => {
|
|
620
|
-
I.amOnPage('array-multiselects.html')
|
|
621
|
-
I.click('Add Multiselect')
|
|
622
|
-
I.click('Add Multiselect')
|
|
623
|
-
I.click('Add Multiselect')
|
|
624
|
-
I.click('Add Multiselect')
|
|
625
|
-
I.click('Add Multiselect')
|
|
626
|
-
I.seeElement('[data-schemapath="root.0"]')
|
|
627
|
-
I.seeElement('[data-schemapath="root.1"]')
|
|
628
|
-
I.seeElement('[data-schemapath="root.2"]')
|
|
629
|
-
I.seeElement('[data-schemapath="root.3"]')
|
|
630
|
-
I.seeElement('[data-schemapath="root.4"]')
|
|
631
|
-
I.selectOption('[name="root[0]"]',
|
|
632
|
-
I.selectOption('[name="root[1]"]',
|
|
633
|
-
I.selectOption('[name="root[2]"]',
|
|
634
|
-
I.selectOption('[name="root[3]"]',
|
|
635
|
-
I.selectOption('[name="root[4]"]',
|
|
636
|
-
I.click('.get-value')
|
|
637
|
-
|
|
592
|
+
I.see('Rating 1')
|
|
593
|
+
I.see('Rating 2')
|
|
594
|
+
I.see('Rating 3')
|
|
595
|
+
I.amCancellingPopups()
|
|
596
|
+
I.click('Delete All')
|
|
597
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
598
|
+
I.cancelPopup()
|
|
599
|
+
I.see('Rating 1')
|
|
600
|
+
I.see('Rating 2')
|
|
601
|
+
I.see('Rating 3')
|
|
602
|
+
I.amAcceptingPopups()
|
|
603
|
+
I.click('Delete All')
|
|
604
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
605
|
+
I.acceptPopup()
|
|
606
|
+
I.dontSee('Rating 1')
|
|
607
|
+
I.dontSee('Rating 2')
|
|
608
|
+
I.dontSee('Rating 3')
|
|
609
|
+
})
|
|
610
|
+
|
|
611
|
+
Scenario('should work well with multiselect editors', async ({ I }) => {
|
|
612
|
+
I.amOnPage('array-multiselects.html')
|
|
613
|
+
I.click('Add Multiselect')
|
|
614
|
+
I.click('Add Multiselect')
|
|
615
|
+
I.click('Add Multiselect')
|
|
616
|
+
I.click('Add Multiselect')
|
|
617
|
+
I.click('Add Multiselect')
|
|
618
|
+
I.seeElement('[data-schemapath="root.0"]')
|
|
619
|
+
I.seeElement('[data-schemapath="root.1"]')
|
|
620
|
+
I.seeElement('[data-schemapath="root.2"]')
|
|
621
|
+
I.seeElement('[data-schemapath="root.3"]')
|
|
622
|
+
I.seeElement('[data-schemapath="root.4"]')
|
|
623
|
+
I.selectOption('[name="root[0]"]', '1')
|
|
624
|
+
I.selectOption('[name="root[1]"]', '2')
|
|
625
|
+
I.selectOption('[name="root[2]"]', '3')
|
|
626
|
+
I.selectOption('[name="root[3]"]', '4')
|
|
627
|
+
I.selectOption('[name="root[4]"]', '5')
|
|
628
|
+
I.click('.get-value')
|
|
629
|
+
I.waitForValue('.debug', '[["1"],["2"],["3"],["4"],["5"]]')
|
|
638
630
|
|
|
639
631
|
// shuffle
|
|
640
|
-
I.click('.moveup[data-i="4"]')
|
|
641
|
-
I.click('.moveup[data-i="2"]')
|
|
642
|
-
I.click('.moveup[data-i="1"]')
|
|
643
|
-
I.click('.get-value')
|
|
644
|
-
|
|
632
|
+
I.click('.moveup[data-i="4"]')
|
|
633
|
+
I.click('.moveup[data-i="2"]')
|
|
634
|
+
I.click('.moveup[data-i="1"]')
|
|
635
|
+
I.click('.get-value')
|
|
636
|
+
I.waitForValue('.debug', '[["3"],["1"],["2"],["5"],["4"]]')
|
|
645
637
|
|
|
646
638
|
// delete single
|
|
647
|
-
I.see('Multiselect 5')
|
|
648
|
-
I.amCancellingPopups()
|
|
649
|
-
I.click('[data-schemapath="root.4"] .delete')
|
|
650
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
651
|
-
I.cancelPopup()
|
|
652
|
-
I.see('Multiselect 5')
|
|
653
|
-
I.amAcceptingPopups()
|
|
654
|
-
I.click('[data-schemapath="root.4"] .delete')
|
|
655
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
656
|
-
I.acceptPopup()
|
|
657
|
-
I.dontSee('Multiselect 5')
|
|
639
|
+
I.see('Multiselect 5')
|
|
640
|
+
I.amCancellingPopups()
|
|
641
|
+
I.click('[data-schemapath="root.4"] .delete')
|
|
642
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
643
|
+
I.cancelPopup()
|
|
644
|
+
I.see('Multiselect 5')
|
|
645
|
+
I.amAcceptingPopups()
|
|
646
|
+
I.click('[data-schemapath="root.4"] .delete')
|
|
647
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
648
|
+
I.acceptPopup()
|
|
649
|
+
I.dontSee('Multiselect 5')
|
|
658
650
|
|
|
659
651
|
// delete last
|
|
660
|
-
I.see('Multiselect 4')
|
|
661
|
-
I.amCancellingPopups()
|
|
662
|
-
I.click('Delete Last Multiselect')
|
|
663
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
664
|
-
I.cancelPopup()
|
|
665
|
-
I.see('Multiselect 4')
|
|
666
|
-
I.click('Delete Last Multiselect')
|
|
667
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
668
|
-
I.acceptPopup()
|
|
669
|
-
I.dontSee('Multiselect 4')
|
|
652
|
+
I.see('Multiselect 4')
|
|
653
|
+
I.amCancellingPopups()
|
|
654
|
+
I.click('Delete Last Multiselect')
|
|
655
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
656
|
+
I.cancelPopup()
|
|
657
|
+
I.see('Multiselect 4')
|
|
658
|
+
I.click('Delete Last Multiselect')
|
|
659
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
660
|
+
I.acceptPopup()
|
|
661
|
+
I.dontSee('Multiselect 4')
|
|
670
662
|
|
|
671
663
|
// delete all
|
|
672
|
-
I.see('Multiselect 1')
|
|
673
|
-
I.see('Multiselect 2')
|
|
674
|
-
I.see('Multiselect 3')
|
|
675
|
-
I.amCancellingPopups()
|
|
676
|
-
I.click('Delete All')
|
|
677
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
678
|
-
I.cancelPopup()
|
|
679
|
-
I.see('Multiselect 1')
|
|
680
|
-
I.see('Multiselect 2')
|
|
681
|
-
I.see('Multiselect 3')
|
|
682
|
-
I.amAcceptingPopups()
|
|
683
|
-
I.click('Delete All')
|
|
684
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
685
|
-
I.acceptPopup()
|
|
686
|
-
I.dontSee('Multiselect 1')
|
|
687
|
-
I.dontSee('Multiselect 2')
|
|
688
|
-
I.dontSee('Multiselect 3')
|
|
689
|
-
})
|
|
690
|
-
|
|
691
|
-
Scenario('should work well with object editors', async (I) => {
|
|
692
|
-
I.amOnPage('array-objects.html')
|
|
693
|
-
I.click('Add Object')
|
|
694
|
-
I.click('Add Object')
|
|
695
|
-
I.click('Add Object')
|
|
696
|
-
I.click('Add Object')
|
|
697
|
-
I.click('Add Object')
|
|
698
|
-
I.seeElement('[name="root[0][property]"]')
|
|
699
|
-
I.seeElement('[name="root[1][property]"]')
|
|
700
|
-
I.seeElement('[name="root[2][property]"]')
|
|
701
|
-
I.seeElement('[name="root[3][property]"]')
|
|
702
|
-
I.seeElement('[name="root[4][property]"]')
|
|
703
|
-
I.fillField('[name="root[0][property]"]',
|
|
704
|
-
I.fillField('[name="root[1][property]"]',
|
|
705
|
-
I.fillField('[name="root[2][property]"]',
|
|
706
|
-
I.fillField('[name="root[3][property]"]',
|
|
707
|
-
I.fillField('[name="root[4][property]"]',
|
|
708
|
-
I.click('.get-value')
|
|
709
|
-
|
|
664
|
+
I.see('Multiselect 1')
|
|
665
|
+
I.see('Multiselect 2')
|
|
666
|
+
I.see('Multiselect 3')
|
|
667
|
+
I.amCancellingPopups()
|
|
668
|
+
I.click('Delete All')
|
|
669
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
670
|
+
I.cancelPopup()
|
|
671
|
+
I.see('Multiselect 1')
|
|
672
|
+
I.see('Multiselect 2')
|
|
673
|
+
I.see('Multiselect 3')
|
|
674
|
+
I.amAcceptingPopups()
|
|
675
|
+
I.click('Delete All')
|
|
676
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
677
|
+
I.acceptPopup()
|
|
678
|
+
I.dontSee('Multiselect 1')
|
|
679
|
+
I.dontSee('Multiselect 2')
|
|
680
|
+
I.dontSee('Multiselect 3')
|
|
681
|
+
})
|
|
682
|
+
|
|
683
|
+
Scenario('should work well with object editors', async ({ I }) => {
|
|
684
|
+
I.amOnPage('array-objects.html')
|
|
685
|
+
I.click('Add Object')
|
|
686
|
+
I.click('Add Object')
|
|
687
|
+
I.click('Add Object')
|
|
688
|
+
I.click('Add Object')
|
|
689
|
+
I.click('Add Object')
|
|
690
|
+
I.seeElement('[name="root[0][property]"]')
|
|
691
|
+
I.seeElement('[name="root[1][property]"]')
|
|
692
|
+
I.seeElement('[name="root[2][property]"]')
|
|
693
|
+
I.seeElement('[name="root[3][property]"]')
|
|
694
|
+
I.seeElement('[name="root[4][property]"]')
|
|
695
|
+
I.fillField('[name="root[0][property]"]', '1')
|
|
696
|
+
I.fillField('[name="root[1][property]"]', '2')
|
|
697
|
+
I.fillField('[name="root[2][property]"]', '3')
|
|
698
|
+
I.fillField('[name="root[3][property]"]', '4')
|
|
699
|
+
I.fillField('[name="root[4][property]"]', '5')
|
|
700
|
+
I.click('.get-value')
|
|
701
|
+
I.waitForValue('.debug', '[{"property":"1"},{"property":"2"},{"property":"3"},{"property":"4"},{"property":"5"}]')
|
|
710
702
|
|
|
711
703
|
// shuffle
|
|
712
|
-
I.click('.moveup[data-i="4"]')
|
|
713
|
-
I.click('.moveup[data-i="2"]')
|
|
714
|
-
I.click('.moveup[data-i="1"]')
|
|
715
|
-
I.click('.get-value')
|
|
716
|
-
|
|
704
|
+
I.click('.moveup[data-i="4"]')
|
|
705
|
+
I.click('.moveup[data-i="2"]')
|
|
706
|
+
I.click('.moveup[data-i="1"]')
|
|
707
|
+
I.click('.get-value')
|
|
708
|
+
I.waitForValue('.debug', '[{"property":"3"},{"property":"1"},{"property":"2"},{"property":"5"},{"property":"4"}]')
|
|
717
709
|
|
|
718
710
|
// delete single
|
|
719
|
-
I.see('Object 5')
|
|
720
|
-
I.amCancellingPopups()
|
|
721
|
-
I.click('[data-schemapath="root.4"] .delete')
|
|
722
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
723
|
-
I.cancelPopup()
|
|
724
|
-
I.see('Object 5')
|
|
725
|
-
I.amAcceptingPopups()
|
|
726
|
-
I.click('[data-schemapath="root.4"] .delete')
|
|
727
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
728
|
-
I.acceptPopup()
|
|
729
|
-
I.dontSee('Object 5')
|
|
711
|
+
I.see('Object 5')
|
|
712
|
+
I.amCancellingPopups()
|
|
713
|
+
I.click('[data-schemapath="root.4"] .delete')
|
|
714
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
715
|
+
I.cancelPopup()
|
|
716
|
+
I.see('Object 5')
|
|
717
|
+
I.amAcceptingPopups()
|
|
718
|
+
I.click('[data-schemapath="root.4"] .delete')
|
|
719
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
720
|
+
I.acceptPopup()
|
|
721
|
+
I.dontSee('Object 5')
|
|
730
722
|
|
|
731
723
|
// delete last
|
|
732
|
-
I.see('Object 4')
|
|
733
|
-
I.amCancellingPopups()
|
|
734
|
-
I.click('Delete Last Object')
|
|
735
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
736
|
-
I.cancelPopup()
|
|
737
|
-
I.see('Object 4')
|
|
738
|
-
I.amAcceptingPopups()
|
|
739
|
-
I.click('Delete Last Object')
|
|
740
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
741
|
-
I.acceptPopup()
|
|
742
|
-
I.dontSee('Object 4')
|
|
724
|
+
I.see('Object 4')
|
|
725
|
+
I.amCancellingPopups()
|
|
726
|
+
I.click('Delete Last Object')
|
|
727
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
728
|
+
I.cancelPopup()
|
|
729
|
+
I.see('Object 4')
|
|
730
|
+
I.amAcceptingPopups()
|
|
731
|
+
I.click('Delete Last Object')
|
|
732
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
733
|
+
I.acceptPopup()
|
|
734
|
+
I.dontSee('Object 4')
|
|
743
735
|
|
|
744
736
|
// delete all
|
|
745
|
-
I.see('Object 1')
|
|
746
|
-
I.see('Object 2')
|
|
747
|
-
I.see('Object 3')
|
|
748
|
-
I.amCancellingPopups()
|
|
749
|
-
I.click('Delete All')
|
|
750
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
751
|
-
I.cancelPopup()
|
|
752
|
-
I.see('Object 1')
|
|
753
|
-
I.see('Object 2')
|
|
754
|
-
I.see('Object 3')
|
|
755
|
-
I.amAcceptingPopups()
|
|
756
|
-
I.click('Delete All')
|
|
757
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
758
|
-
I.acceptPopup()
|
|
759
|
-
I.dontSee('Object 1')
|
|
760
|
-
I.dontSee('Object 2')
|
|
761
|
-
I.dontSee('Object 3')
|
|
762
|
-
})
|
|
763
|
-
|
|
764
|
-
Scenario('should work well with nested array editors', async (I) => {
|
|
765
|
-
I.amOnPage('array-nested-arrays.html')
|
|
766
|
-
I.click('Add Array')
|
|
767
|
-
I.click('Add Array')
|
|
768
|
-
I.click('Add Array')
|
|
769
|
-
I.click('Add Array')
|
|
770
|
-
I.click('Add Array')
|
|
771
|
-
I.seeElement('[data-schemapath="root.0"]')
|
|
772
|
-
I.seeElement('[data-schemapath="root.1"]')
|
|
773
|
-
I.seeElement('[data-schemapath="root.2"]')
|
|
774
|
-
I.seeElement('[data-schemapath="root.3"]')
|
|
775
|
-
I.seeElement('[data-schemapath="root.4"]')
|
|
776
|
-
I.click('.get-value')
|
|
777
|
-
|
|
737
|
+
I.see('Object 1')
|
|
738
|
+
I.see('Object 2')
|
|
739
|
+
I.see('Object 3')
|
|
740
|
+
I.amCancellingPopups()
|
|
741
|
+
I.click('Delete All')
|
|
742
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
743
|
+
I.cancelPopup()
|
|
744
|
+
I.see('Object 1')
|
|
745
|
+
I.see('Object 2')
|
|
746
|
+
I.see('Object 3')
|
|
747
|
+
I.amAcceptingPopups()
|
|
748
|
+
I.click('Delete All')
|
|
749
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
750
|
+
I.acceptPopup()
|
|
751
|
+
I.dontSee('Object 1')
|
|
752
|
+
I.dontSee('Object 2')
|
|
753
|
+
I.dontSee('Object 3')
|
|
754
|
+
})
|
|
755
|
+
|
|
756
|
+
Scenario('should work well with nested array editors', async ({ I }) => {
|
|
757
|
+
I.amOnPage('array-nested-arrays.html')
|
|
758
|
+
I.click('Add Array')
|
|
759
|
+
I.click('Add Array')
|
|
760
|
+
I.click('Add Array')
|
|
761
|
+
I.click('Add Array')
|
|
762
|
+
I.click('Add Array')
|
|
763
|
+
I.seeElement('[data-schemapath="root.0"]')
|
|
764
|
+
I.seeElement('[data-schemapath="root.1"]')
|
|
765
|
+
I.seeElement('[data-schemapath="root.2"]')
|
|
766
|
+
I.seeElement('[data-schemapath="root.3"]')
|
|
767
|
+
I.seeElement('[data-schemapath="root.4"]')
|
|
768
|
+
I.click('.get-value')
|
|
769
|
+
I.waitForValue('.debug', '[[],[],[],[],[]]')
|
|
778
770
|
|
|
779
771
|
// adds one string editor in each first level array
|
|
780
772
|
for (let i = 0; i < 5; i++) {
|
|
781
|
-
I.click('Add String', '[data-schemapath="root.' + i + '"]')
|
|
782
|
-
I.fillField('[data-schemapath="root.' + i + '"] [name="root[' + i + '][0]"]', String(i + 1))
|
|
773
|
+
I.click('Add String', '[data-schemapath="root.' + i + '"]')
|
|
774
|
+
I.fillField('[data-schemapath="root.' + i + '"] [name="root[' + i + '][0]"]', String(i + 1))
|
|
783
775
|
}
|
|
784
776
|
|
|
785
|
-
I.click('.get-value')
|
|
786
|
-
|
|
777
|
+
I.click('.get-value')
|
|
778
|
+
I.waitForValue('.debug', '[["1"],["2"],["3"],["4"],["5"]]')
|
|
787
779
|
|
|
788
780
|
// shuffle
|
|
789
|
-
I.click('.moveup[data-i="4"]')
|
|
790
|
-
I.click('.moveup[data-i="2"]')
|
|
791
|
-
I.click('.moveup[data-i="1"]')
|
|
792
|
-
I.click('.get-value')
|
|
793
|
-
|
|
781
|
+
I.click('.moveup[data-i="4"]')
|
|
782
|
+
I.click('.moveup[data-i="2"]')
|
|
783
|
+
I.click('.moveup[data-i="1"]')
|
|
784
|
+
I.click('.get-value')
|
|
785
|
+
I.waitForValue('.debug', '[["3"],["1"],["2"],["5"],["4"]]')
|
|
794
786
|
|
|
795
787
|
// delete single
|
|
796
|
-
I.see('Array 5')
|
|
797
|
-
I.amCancellingPopups()
|
|
798
|
-
I.click('[data-schemapath="root.4"] .delete')
|
|
799
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
800
|
-
I.cancelPopup()
|
|
801
|
-
I.see('Array 5')
|
|
802
|
-
I.amAcceptingPopups()
|
|
803
|
-
I.click('[data-schemapath="root.4"] .delete')
|
|
804
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
805
|
-
I.acceptPopup()
|
|
806
|
-
I.dontSee('Array 5')
|
|
788
|
+
I.see('Array 5')
|
|
789
|
+
I.amCancellingPopups()
|
|
790
|
+
I.click('[data-schemapath="root.4"] .delete')
|
|
791
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
792
|
+
I.cancelPopup()
|
|
793
|
+
I.see('Array 5')
|
|
794
|
+
I.amAcceptingPopups()
|
|
795
|
+
I.click('[data-schemapath="root.4"] .delete')
|
|
796
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
797
|
+
I.acceptPopup()
|
|
798
|
+
I.dontSee('Array 5')
|
|
807
799
|
|
|
808
800
|
// delete last
|
|
809
|
-
I.see('Array 4')
|
|
810
|
-
I.amCancellingPopups()
|
|
811
|
-
I.click('Delete Last Array')
|
|
812
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
813
|
-
I.cancelPopup()
|
|
814
|
-
I.see('Array 4')
|
|
815
|
-
I.amAcceptingPopups()
|
|
816
|
-
I.click('Delete Last Array')
|
|
817
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
818
|
-
I.acceptPopup()
|
|
819
|
-
I.dontSee('Array 4')
|
|
801
|
+
I.see('Array 4')
|
|
802
|
+
I.amCancellingPopups()
|
|
803
|
+
I.click('Delete Last Array')
|
|
804
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
805
|
+
I.cancelPopup()
|
|
806
|
+
I.see('Array 4')
|
|
807
|
+
I.amAcceptingPopups()
|
|
808
|
+
I.click('Delete Last Array')
|
|
809
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
810
|
+
I.acceptPopup()
|
|
811
|
+
I.dontSee('Array 4')
|
|
820
812
|
|
|
821
813
|
// delete all
|
|
822
|
-
I.see('Array 1')
|
|
823
|
-
I.see('Array 2')
|
|
824
|
-
I.see('Array 3')
|
|
814
|
+
I.see('Array 1')
|
|
815
|
+
I.see('Array 2')
|
|
816
|
+
I.see('Array 3')
|
|
825
817
|
// there are hidden "Delete All" buttons right now and "I.click(Delete All)"
|
|
826
818
|
// will attempt to click the first match. It fails because is hidden.
|
|
827
819
|
// this is why i use this script. is more flexible.
|
|
828
|
-
I.amCancellingPopups()
|
|
829
|
-
I.executeScript(function() {
|
|
830
|
-
|
|
831
|
-
e[e.length - 1].click()
|
|
832
|
-
})
|
|
833
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
834
|
-
I.cancelPopup()
|
|
835
|
-
I.see('Array 1')
|
|
836
|
-
I.see('Array 2')
|
|
837
|
-
I.see('Array 3')
|
|
838
|
-
I.amAcceptingPopups()
|
|
839
|
-
I.executeScript(function() {
|
|
840
|
-
|
|
841
|
-
e[e.length - 1].click()
|
|
842
|
-
})
|
|
843
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
844
|
-
I.acceptPopup()
|
|
845
|
-
I.dontSee('Array 1')
|
|
846
|
-
I.dontSee('Array 2')
|
|
847
|
-
I.dontSee('Array 3')
|
|
820
|
+
I.amCancellingPopups()
|
|
821
|
+
I.executeScript(function () {
|
|
822
|
+
const e = document.querySelectorAll('.json-editor-btn-delete')
|
|
823
|
+
e[e.length - 1].click()
|
|
824
|
+
})
|
|
825
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
826
|
+
I.cancelPopup()
|
|
827
|
+
I.see('Array 1')
|
|
828
|
+
I.see('Array 2')
|
|
829
|
+
I.see('Array 3')
|
|
830
|
+
I.amAcceptingPopups()
|
|
831
|
+
I.executeScript(function () {
|
|
832
|
+
const e = document.querySelectorAll('.json-editor-btn-delete')
|
|
833
|
+
e[e.length - 1].click()
|
|
834
|
+
})
|
|
835
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
836
|
+
I.acceptPopup()
|
|
837
|
+
I.dontSee('Array 1')
|
|
838
|
+
I.dontSee('Array 2')
|
|
839
|
+
I.dontSee('Array 3')
|
|
848
840
|
|
|
849
841
|
// manipulate nested items
|
|
850
|
-
I.amOnPage('array-nested-arrays.html')
|
|
851
|
-
I.click('Add Array')
|
|
852
|
-
I.click('Add Array')
|
|
853
|
-
I.click('Add Array')
|
|
854
|
-
I.click('Add Array')
|
|
855
|
-
I.click('Add Array')
|
|
856
|
-
I.seeElement('[data-schemapath="root.0"]')
|
|
857
|
-
I.seeElement('[data-schemapath="root.1"]')
|
|
858
|
-
I.seeElement('[data-schemapath="root.2"]')
|
|
859
|
-
I.click('.get-value')
|
|
860
|
-
|
|
842
|
+
I.amOnPage('array-nested-arrays.html')
|
|
843
|
+
I.click('Add Array')
|
|
844
|
+
I.click('Add Array')
|
|
845
|
+
I.click('Add Array')
|
|
846
|
+
I.click('Add Array')
|
|
847
|
+
I.click('Add Array')
|
|
848
|
+
I.seeElement('[data-schemapath="root.0"]')
|
|
849
|
+
I.seeElement('[data-schemapath="root.1"]')
|
|
850
|
+
I.seeElement('[data-schemapath="root.2"]')
|
|
851
|
+
I.click('.get-value')
|
|
852
|
+
I.waitForValue('.debug', '[[],[],[],[],[]]')
|
|
861
853
|
|
|
862
854
|
// adds one string editor in each first level array
|
|
863
855
|
for (let i = 0; i < 5; i++) {
|
|
864
|
-
I.click('Add String', '[data-schemapath="root.' + i + '"]')
|
|
865
|
-
I.click('Add String', '[data-schemapath="root.' + i + '"]')
|
|
866
|
-
I.click('Add String', '[data-schemapath="root.' + i + '"]')
|
|
867
|
-
I.click('Add String', '[data-schemapath="root.' + i + '"]')
|
|
868
|
-
I.click('Add String', '[data-schemapath="root.' + i + '"]')
|
|
869
|
-
I.fillField('[data-schemapath="root.' + i + '"] [name="root[' + i + '][0]"]',
|
|
870
|
-
I.fillField('[data-schemapath="root.' + i + '"] [name="root[' + i + '][1]"]',
|
|
871
|
-
I.fillField('[data-schemapath="root.' + i + '"] [name="root[' + i + '][2]"]',
|
|
872
|
-
I.fillField('[data-schemapath="root.' + i + '"] [name="root[' + i + '][3]"]',
|
|
873
|
-
I.fillField('[data-schemapath="root.' + i + '"] [name="root[' + i + '][4]"]',
|
|
856
|
+
I.click('Add String', '[data-schemapath="root.' + i + '"]')
|
|
857
|
+
I.click('Add String', '[data-schemapath="root.' + i + '"]')
|
|
858
|
+
I.click('Add String', '[data-schemapath="root.' + i + '"]')
|
|
859
|
+
I.click('Add String', '[data-schemapath="root.' + i + '"]')
|
|
860
|
+
I.click('Add String', '[data-schemapath="root.' + i + '"]')
|
|
861
|
+
I.fillField('[data-schemapath="root.' + i + '"] [name="root[' + i + '][0]"]', '1')
|
|
862
|
+
I.fillField('[data-schemapath="root.' + i + '"] [name="root[' + i + '][1]"]', '2')
|
|
863
|
+
I.fillField('[data-schemapath="root.' + i + '"] [name="root[' + i + '][2]"]', '3')
|
|
864
|
+
I.fillField('[data-schemapath="root.' + i + '"] [name="root[' + i + '][3]"]', '4')
|
|
865
|
+
I.fillField('[data-schemapath="root.' + i + '"] [name="root[' + i + '][4]"]', '5')
|
|
874
866
|
}
|
|
875
867
|
|
|
876
|
-
I.click('.get-value')
|
|
877
|
-
|
|
868
|
+
I.click('.get-value')
|
|
869
|
+
I.waitForValue('.debug', '[["1","2","3","4","5"],["1","2","3","4","5"],["1","2","3","4","5"],["1","2","3","4","5"],["1","2","3","4","5"]]')
|
|
878
870
|
|
|
879
871
|
// shuffle every strings array
|
|
880
872
|
for (let i = 0; i < 5; i++) {
|
|
881
|
-
I.click('[data-schemapath="root.' + i + '.4"] .moveup')
|
|
882
|
-
I.click('[data-schemapath="root.' + i + '.2"] .moveup')
|
|
883
|
-
I.click('[data-schemapath="root.' + i + '.1"] .moveup')
|
|
873
|
+
I.click('[data-schemapath="root.' + i + '.4"] .moveup')
|
|
874
|
+
I.click('[data-schemapath="root.' + i + '.2"] .moveup')
|
|
875
|
+
I.click('[data-schemapath="root.' + i + '.1"] .moveup')
|
|
884
876
|
}
|
|
885
877
|
|
|
886
|
-
I.click('.get-value')
|
|
887
|
-
|
|
878
|
+
I.click('.get-value')
|
|
879
|
+
I.waitForValue('.debug', '[["3","1","2","5","4"],["3","1","2","5","4"],["3","1","2","5","4"],["3","1","2","5","4"],["3","1","2","5","4"]]')
|
|
888
880
|
|
|
889
881
|
// delete single (fifth) element from every string array
|
|
890
882
|
for (let i = 0; i < 5; i++) {
|
|
891
|
-
I.see('String 5', '[data-schemapath="root.' + i + '"]')
|
|
892
|
-
I.amCancellingPopups()
|
|
893
|
-
I.click('[data-schemapath="root.' + i + '.4"] .delete')
|
|
894
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
895
|
-
I.cancelPopup()
|
|
896
|
-
I.see('String 5', '[data-schemapath="root.' + i + '"]')
|
|
897
|
-
I.amAcceptingPopups()
|
|
898
|
-
I.click('[data-schemapath="root.' + i + '.4"] .delete')
|
|
899
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
900
|
-
I.acceptPopup()
|
|
901
|
-
I.dontSee('String 5', '[data-schemapath="root.' + i + '"]')
|
|
883
|
+
I.see('String 5', '[data-schemapath="root.' + i + '"]')
|
|
884
|
+
I.amCancellingPopups()
|
|
885
|
+
I.click('[data-schemapath="root.' + i + '.4"] .delete')
|
|
886
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
887
|
+
I.cancelPopup()
|
|
888
|
+
I.see('String 5', '[data-schemapath="root.' + i + '"]')
|
|
889
|
+
I.amAcceptingPopups()
|
|
890
|
+
I.click('[data-schemapath="root.' + i + '.4"] .delete')
|
|
891
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
892
|
+
I.acceptPopup()
|
|
893
|
+
I.dontSee('String 5', '[data-schemapath="root.' + i + '"]')
|
|
902
894
|
}
|
|
903
895
|
|
|
904
|
-
I.click('.get-value')
|
|
905
|
-
|
|
896
|
+
I.click('.get-value')
|
|
897
|
+
I.waitForValue('.debug', '[["3","1","2","5"],["3","1","2","5"],["3","1","2","5"],["3","1","2","5"],["3","1","2","5"]]')
|
|
906
898
|
|
|
907
899
|
// delete last (fourth) element from every string array
|
|
908
900
|
for (let i = 0; i < 5; i++) {
|
|
909
|
-
I.see('String 4', '[data-schemapath="root.' + i + '"]')
|
|
910
|
-
I.amCancellingPopups()
|
|
911
|
-
I.click('Delete Last String', '[data-schemapath="root.' + i + '"]')
|
|
912
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
913
|
-
I.cancelPopup()
|
|
914
|
-
I.see('String 4', '[data-schemapath="root.' + i + '"]')
|
|
915
|
-
I.amAcceptingPopups()
|
|
916
|
-
I.click('Delete Last String', '[data-schemapath="root.' + i + '"]')
|
|
917
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
918
|
-
I.acceptPopup()
|
|
919
|
-
I.dontSee('String 4', '[data-schemapath="root.' + i + '"]')
|
|
901
|
+
I.see('String 4', '[data-schemapath="root.' + i + '"]')
|
|
902
|
+
I.amCancellingPopups()
|
|
903
|
+
I.click('Delete Last String', '[data-schemapath="root.' + i + '"]')
|
|
904
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
905
|
+
I.cancelPopup()
|
|
906
|
+
I.see('String 4', '[data-schemapath="root.' + i + '"]')
|
|
907
|
+
I.amAcceptingPopups()
|
|
908
|
+
I.click('Delete Last String', '[data-schemapath="root.' + i + '"]')
|
|
909
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
910
|
+
I.acceptPopup()
|
|
911
|
+
I.dontSee('String 4', '[data-schemapath="root.' + i + '"]')
|
|
920
912
|
}
|
|
921
913
|
|
|
922
|
-
I.click('.get-value')
|
|
923
|
-
|
|
914
|
+
I.click('.get-value')
|
|
915
|
+
I.waitForValue('.debug', '[["3","1","2"],["3","1","2"],["3","1","2"],["3","1","2"],["3","1","2"]]')
|
|
924
916
|
|
|
925
917
|
// delete last (fourth) element from every string array
|
|
926
918
|
for (let i = 0; i < 5; i++) {
|
|
927
|
-
I.see('String 1', '[data-schemapath="root.' + i + '"]')
|
|
928
|
-
I.see('String 2', '[data-schemapath="root.' + i + '"]')
|
|
929
|
-
I.see('String 3', '[data-schemapath="root.' + i + '"]')
|
|
930
|
-
I.amCancellingPopups()
|
|
931
|
-
I.click('Delete All', '[data-schemapath="root.' + i + '"]')
|
|
932
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
933
|
-
I.cancelPopup()
|
|
934
|
-
I.see('String 1', '[data-schemapath="root.' + i + '"]')
|
|
935
|
-
I.see('String 2', '[data-schemapath="root.' + i + '"]')
|
|
936
|
-
I.see('String 3', '[data-schemapath="root.' + i + '"]')
|
|
937
|
-
I.amAcceptingPopups()
|
|
938
|
-
I.click('Delete All', '[data-schemapath="root.' + i + '"]')
|
|
939
|
-
I.seeInPopup('Are you sure you want to remove this
|
|
940
|
-
I.acceptPopup()
|
|
941
|
-
I.dontSee('String 1', '[data-schemapath="root.' + i + '"]')
|
|
942
|
-
I.dontSee('String 2', '[data-schemapath="root.' + i + '"]')
|
|
943
|
-
I.dontSee('String 3', '[data-schemapath="root.' + i + '"]')
|
|
919
|
+
I.see('String 1', '[data-schemapath="root.' + i + '"]')
|
|
920
|
+
I.see('String 2', '[data-schemapath="root.' + i + '"]')
|
|
921
|
+
I.see('String 3', '[data-schemapath="root.' + i + '"]')
|
|
922
|
+
I.amCancellingPopups()
|
|
923
|
+
I.click('Delete All', '[data-schemapath="root.' + i + '"]')
|
|
924
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
925
|
+
I.cancelPopup()
|
|
926
|
+
I.see('String 1', '[data-schemapath="root.' + i + '"]')
|
|
927
|
+
I.see('String 2', '[data-schemapath="root.' + i + '"]')
|
|
928
|
+
I.see('String 3', '[data-schemapath="root.' + i + '"]')
|
|
929
|
+
I.amAcceptingPopups()
|
|
930
|
+
I.click('Delete All', '[data-schemapath="root.' + i + '"]')
|
|
931
|
+
I.seeInPopup('Are you sure you want to remove this item?')
|
|
932
|
+
I.acceptPopup()
|
|
933
|
+
I.dontSee('String 1', '[data-schemapath="root.' + i + '"]')
|
|
934
|
+
I.dontSee('String 2', '[data-schemapath="root.' + i + '"]')
|
|
935
|
+
I.dontSee('String 3', '[data-schemapath="root.' + i + '"]')
|
|
944
936
|
}
|
|
945
937
|
|
|
946
|
-
I.click('.get-value')
|
|
947
|
-
|
|
948
|
-
})
|
|
949
|
-
|
|
950
|
-
Scenario('should work well with selectize multiselect editors', async (I) => {
|
|
951
|
-
I.amOnPage('array-selectize.html')
|
|
952
|
-
I.click('Add item')
|
|
953
|
-
await I.seeElement('[data-schemapath="root.0"]')
|
|
954
|
-
I.click('Add item')
|
|
955
|
-
await I.seeElement('[data-schemapath="root.1"]')
|
|
956
|
-
I.click('.get-value')
|
|
957
|
-
|
|
958
|
-
// ensure defaults
|
|
959
|
-
assert.equal(value, '[["1","2"],["1","2"]]');
|
|
938
|
+
I.click('.get-value')
|
|
939
|
+
I.waitForValue('.debug', '[[],[],[],[],[]]')
|
|
940
|
+
})
|
|
941
|
+
|
|
942
|
+
Scenario('should work well with selectize multiselect editors', async ({ I }) => {
|
|
943
|
+
I.amOnPage('array-selectize.html')
|
|
944
|
+
I.click('Add item')
|
|
945
|
+
await I.seeElement('[data-schemapath="root.0"]')
|
|
946
|
+
I.click('Add item')
|
|
947
|
+
await I.seeElement('[data-schemapath="root.1"]')
|
|
948
|
+
I.click('.get-value')
|
|
949
|
+
I.waitForValue('.debug', '[["1","2"],["1","2"]]')
|
|
960
950
|
|
|
961
951
|
// every selected item has remove button
|
|
962
|
-
I.seeElement('[data-schemapath="root.0"] .selectize-input [data-value="1"] a.remove')
|
|
963
|
-
I.seeElement('[data-schemapath="root.0"] .selectize-input [data-value="2"] a.remove')
|
|
964
|
-
I.seeElement('[data-schemapath="root.1"] .selectize-input [data-value="1"] a.remove')
|
|
965
|
-
I.seeElement('[data-schemapath="root.1"] .selectize-input [data-value="2"] a.remove')
|
|
952
|
+
I.seeElement('[data-schemapath="root.0"] .selectize-input [data-value="1"] a.remove')
|
|
953
|
+
I.seeElement('[data-schemapath="root.0"] .selectize-input [data-value="2"] a.remove')
|
|
954
|
+
I.seeElement('[data-schemapath="root.1"] .selectize-input [data-value="1"] a.remove')
|
|
955
|
+
I.seeElement('[data-schemapath="root.1"] .selectize-input [data-value="2"] a.remove')
|
|
966
956
|
|
|
967
957
|
// could not add values
|
|
968
|
-
I.fillField('[data-schemapath="root.1"] input[type="text"]',
|
|
969
|
-
I.dontSeeElement('.create.active')
|
|
958
|
+
I.fillField('[data-schemapath="root.1"] input[type="text"]', '123')
|
|
959
|
+
I.dontSeeElement('.create.active')
|
|
970
960
|
|
|
971
961
|
// selectize dropdown is filled with enum values
|
|
972
|
-
I.click('[data-schemapath="root.0"] .selectize-input')
|
|
973
|
-
I.seeElement('[data-schemapath="root.0"] .selectize-dropdown-content [data-value="3"]')
|
|
974
|
-
I.seeElement('[data-schemapath="root.0"] .selectize-dropdown-content [data-value="4"]')
|
|
975
|
-
})
|
|
962
|
+
I.click('[data-schemapath="root.0"] .selectize-input')
|
|
963
|
+
I.seeElement('[data-schemapath="root.0"] .selectize-dropdown-content [data-value="3"]')
|
|
964
|
+
I.seeElement('[data-schemapath="root.0"] .selectize-dropdown-content [data-value="4"]')
|
|
965
|
+
})
|