itemengine-cypress-automation 1.0.36 → 1.0.37
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/ListSorting/listSortingAdditionalSettingsAnswerNumerationAndOptionStyleDropdown.js +319 -0
- package/cypress/e2e/ILC/ListSorting/listSortingAdditionalSettingsBasic.js +326 -0
- package/cypress/e2e/ILC/ListSorting/listSortingAdditionalSettingsOptionLabelSection.js +202 -0
- package/cypress/e2e/ILC/ListSorting/listSortingAllOrNothingScoring.js +188 -0
- package/cypress/e2e/ILC/ListSorting/listSortingAllOrNothingScoringWithAlternateAnswer.js +759 -0
- package/cypress/e2e/ILC/ListSorting/listSortingEditTabBasicSection.js +1 -276
- package/cypress/e2e/ILC/ListSorting/listSortingOptionsSection.js +287 -0
- package/cypress/e2e/ILC/ListSorting/listSortingPartialDifferentWeightsScoring.js +1 -941
- package/cypress/e2e/ILC/ListSorting/listSortingPartialDifferentWeightsScoringWithAlternateTab.js +952 -0
- package/cypress/e2e/ILC/ListSorting/listSortingPartialEqualWeightsScoring.js +1 -849
- package/cypress/e2e/ILC/ListSorting/listSortingPartialEqualWeightsScoringWithAlternateAnswer.js +860 -0
- package/package.json +1 -1
@@ -0,0 +1,319 @@
|
|
1
|
+
import { listSortingPage } from "../../../pages/listSortingPage";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
const optionStyleDropdownOptions = ['None', 'Numerical', 'Uppercase alphabet', 'Lowercase alphabet'];
|
7
|
+
const answerNumerationDropdownOptions = ['Numerical', 'Uppercase alphabet', 'Lowercase alphabet'];
|
8
|
+
const numbers = ['1', '2', '3', '4'];
|
9
|
+
const lowercase = ['a', 'b', 'c', 'd'];
|
10
|
+
const uppercase = ['A', 'B', 'C', 'D'];
|
11
|
+
let options = ['plant', 'sprout', 'flower', 'seed'];
|
12
|
+
let correctAnswerArray = ['seed', 'sprout', 'plant', 'flower'];
|
13
|
+
|
14
|
+
describe('Create Item page - list sorting: Additional settings - Option style dropdown and answer numeration (only while grading)', () => {
|
15
|
+
before(() => {
|
16
|
+
cy.loginAs('admin');
|
17
|
+
});
|
18
|
+
|
19
|
+
describe('Additional settings: Student response area and layout', () => {
|
20
|
+
abortEarlySetup();
|
21
|
+
before(() => {
|
22
|
+
cy.log('Navigating to list sorting question type');
|
23
|
+
listSortingPage.steps.navigateToCreateQuestion('list sorting');
|
24
|
+
listSortingPage.steps.expandAdditonalSettings();
|
25
|
+
});
|
26
|
+
|
27
|
+
listSortingPage.tests.verifyStudentResponseAreaAndLayoutLabelAndCSS();
|
28
|
+
|
29
|
+
//Note: a11y covered in verifyAdditonalSettingsAccordionProperties
|
30
|
+
});
|
31
|
+
|
32
|
+
describe('Additional settings: Option style dropdown', () => {
|
33
|
+
abortEarlySetup();
|
34
|
+
before(() => {
|
35
|
+
cy.log('Navigating to list sorting question type');
|
36
|
+
listSortingPage.steps.navigateToCreateQuestion('list sorting');
|
37
|
+
listSortingPage.steps.expandAdditonalSettings();
|
38
|
+
});
|
39
|
+
|
40
|
+
it(`\'Option style\' label and dropdown should be displayed and by default, ${optionStyleDropdownOptions[0]} option should be selected in the dropdown`, () => {
|
41
|
+
utilities.verifyInnerText(listSortingPage.optionStyleLabel(), 'Option style');
|
42
|
+
utilities.verifyElementVisibilityState(listSortingPage.optionStyleLabel(), 'visible');
|
43
|
+
utilities.verifyInnerText(listSortingPage.optionStyleDropdown(), 'None');
|
44
|
+
});
|
45
|
+
|
46
|
+
it('CSS of Option style section', { tags: 'css' }, () => {
|
47
|
+
utilities.verifyCSS(listSortingPage.optionStyleDropdown(), {
|
48
|
+
'color': css.color.liText,
|
49
|
+
'font-size': css.fontSize.default,
|
50
|
+
'font-weight': css.fontWeight.regular
|
51
|
+
});
|
52
|
+
utilities.verifyCSS(listSortingPage.optionStyleLabel(), {
|
53
|
+
'color': css.color.labels,
|
54
|
+
'font-size': css.fontSize.normal,
|
55
|
+
'font-weight': css.fontWeight.semibold
|
56
|
+
});
|
57
|
+
});
|
58
|
+
|
59
|
+
it(`When user clicks on the Option style dropdown a list of 4 options - ${optionStyleDropdownOptions} should be displayed`, () => {
|
60
|
+
listSortingPage.steps.expandOptionStyleDropdown();
|
61
|
+
listSortingPage.steps.verifyOptionStyleDropdownOptions(optionStyleDropdownOptions);
|
62
|
+
});
|
63
|
+
|
64
|
+
it('CSS of Option style dropdown in active state', { tags: 'css' }, () => {
|
65
|
+
utilities.verifyCSS(listSortingPage.optionStyleDropdownOptions().eq(0), {
|
66
|
+
'color': css.color.liText,
|
67
|
+
'font-size': css.fontSize.default,
|
68
|
+
'font-weight': css.fontWeight.regular,
|
69
|
+
'background-color': css.color.liTextSelectedBg
|
70
|
+
});
|
71
|
+
utilities.verifyCSS(listSortingPage.optionStyleDropdownOptions().eq(1), {
|
72
|
+
'color': css.color.liText,
|
73
|
+
'font-size': css.fontSize.default,
|
74
|
+
'font-weight': css.fontWeight.regular,
|
75
|
+
'background-color': css.color.transparent
|
76
|
+
});
|
77
|
+
});
|
78
|
+
|
79
|
+
it('Accessbility of Option style dropdown in active state', { tags: 'a11y' }, () => {
|
80
|
+
cy.checkAccessibility(listSortingPage.dropdownList());
|
81
|
+
});
|
82
|
+
});
|
83
|
+
|
84
|
+
describe('Additional settings: Option style dropdown set correct answer section', () => {
|
85
|
+
abortEarlySetup();
|
86
|
+
before(() => {
|
87
|
+
cy.log('Navigating to list sorting question type');
|
88
|
+
listSortingPage.steps.navigateToCreateQuestion('list sorting');
|
89
|
+
cy.log('Adding question instructions, setting correct answer order and adding points for Autoscored scoring type and switching to Preview tab');
|
90
|
+
cy.barsPreLoaderWait();
|
91
|
+
listSortingPage.steps.addQuestionInstructions();
|
92
|
+
listSortingPage.steps.addInputToOptionsInputField(options);
|
93
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('seed', 0);
|
94
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('sprout', 1);
|
95
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('plant', 2);
|
96
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('flower', 3);
|
97
|
+
listSortingPage.steps.verifyTargetOptionsTextContentInSetCorrectAnswerSection(correctAnswerArray);
|
98
|
+
listSortingPage.steps.allotPoints('20');
|
99
|
+
listSortingPage.steps.expandAdditonalSettings();
|
100
|
+
listSortingPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
101
|
+
});
|
102
|
+
|
103
|
+
it(`When the user selects ${optionStyleDropdownOptions[0]} option from the Option style dropdown and has not selected show correct answer checkbox or check answer button then option numeration should not be displayed in set correct answer section`, () => {
|
104
|
+
utilities.verifyInnerText(listSortingPage.optionStyleDropdown(), `${optionStyleDropdownOptions[0]}`)
|
105
|
+
utilities.verifyElementVisibilityState(listSortingPage.optionStyleNumeration(), 'notExist');
|
106
|
+
});
|
107
|
+
|
108
|
+
it(`When user selects ${optionStyleDropdownOptions[1]} then the numeration should be displayed on the options in set correct answer section`, () => {
|
109
|
+
listSortingPage.steps.selectOptionStyleDropdownOption(`${optionStyleDropdownOptions[1]}`);
|
110
|
+
listSortingPage.steps.verifyOptionsNumerationSetCorrectAnswerSection(numbers)
|
111
|
+
});
|
112
|
+
|
113
|
+
it(`When user selects ${optionStyleDropdownOptions[2]} then the numeration should be displayed on the options in set correct answer section`, () => {
|
114
|
+
listSortingPage.steps.selectOptionStyleDropdownOption(`${optionStyleDropdownOptions[2]}`);
|
115
|
+
listSortingPage.steps.verifyOptionsNumerationSetCorrectAnswerSection(uppercase)
|
116
|
+
});
|
117
|
+
|
118
|
+
it(`When user selects ${optionStyleDropdownOptions[3]} then the numeration should be displayed on the options in set correct answer section`, () => {
|
119
|
+
listSortingPage.steps.selectOptionStyleDropdownOption(`${optionStyleDropdownOptions[3]}`);
|
120
|
+
listSortingPage.steps.verifyOptionsNumerationSetCorrectAnswerSection(lowercase)
|
121
|
+
});
|
122
|
+
});
|
123
|
+
|
124
|
+
describe('Additional settings: Option style dropdown preview tab', () => {
|
125
|
+
abortEarlySetup();
|
126
|
+
before(() => {
|
127
|
+
cy.log('Navigating to list sorting question type');
|
128
|
+
listSortingPage.steps.navigateToCreateQuestion('list sorting');
|
129
|
+
cy.log('Adding question instructions, setting correct answer order and adding points for Autoscored scoring type and switching to Preview tab');
|
130
|
+
cy.barsPreLoaderWait();
|
131
|
+
listSortingPage.steps.addQuestionInstructions();
|
132
|
+
listSortingPage.steps.addInputToOptionsInputField(options);
|
133
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('seed', 0);
|
134
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('sprout', 1);
|
135
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('plant', 2);
|
136
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('flower', 3);
|
137
|
+
listSortingPage.steps.verifyTargetOptionsTextContentInSetCorrectAnswerSection(correctAnswerArray);
|
138
|
+
listSortingPage.steps.allotPoints('20');
|
139
|
+
listSortingPage.steps.expandAdditonalSettings();
|
140
|
+
listSortingPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
141
|
+
});
|
142
|
+
|
143
|
+
it(`When the user selects ${optionStyleDropdownOptions[0]} option from the option style dropdown option numeration should be not displayed in the preview tab`, () => {
|
144
|
+
utilities.verifyInnerText(listSortingPage.optionStyleDropdown(), `${optionStyleDropdownOptions[0]}`)
|
145
|
+
listSortingPage.steps.switchToPreviewTab();
|
146
|
+
utilities.verifyElementVisibilityState(listSortingPage.optionStyleNumeration(), 'notExist');
|
147
|
+
});
|
148
|
+
|
149
|
+
it('When user clicks on \'Show correct answer\' checkbox then the numeration should not be displayed on the options and \'Correct answers:\' section should have \'Answer numeration\'', () => {
|
150
|
+
listSortingPage.steps.checkShowCorrectAnswerCheckbox()
|
151
|
+
utilities.verifyElementVisibilityState(listSortingPage.optionStyleNumeration(), 'notExist');
|
152
|
+
listSortingPage.steps.verifyCorrectAnswerContainerNumeration(numbers)
|
153
|
+
cy.log('Post step: Uncheck \'Show correct answer\' checkbox')
|
154
|
+
listSortingPage.steps.uncheckShowCorrectAnswerCheckbox()
|
155
|
+
});
|
156
|
+
|
157
|
+
it('When user clicks on \'Check answer\' button then the option numeration should not be displayed in the options', () => {
|
158
|
+
listSortingPage.steps.checkAnswer()
|
159
|
+
utilities.verifyElementVisibilityState(listSortingPage.optionNumeration(), 'notExist');
|
160
|
+
});
|
161
|
+
|
162
|
+
it(`When the user selects ${optionStyleDropdownOptions[1]} option from the option style dropdown and has not selected show correct answer checkbox or check answer button then option numeration should be displayed in the preview tab`, () => {
|
163
|
+
listSortingPage.steps.switchToEditTab();
|
164
|
+
listSortingPage.steps.selectOptionStyleDropdownOption(`${optionStyleDropdownOptions[1]}`);
|
165
|
+
listSortingPage.steps.switchToPreviewTab();
|
166
|
+
listSortingPage.steps.verifyOptionsNumerationPreviewTab(numbers)
|
167
|
+
});
|
168
|
+
|
169
|
+
it('When user clicks on \'Show correct answer\' checkbox then the option style numeration should be displayed on the options and \'Correct answers:\' section should have default \'Answer numeration\'', () => {
|
170
|
+
listSortingPage.steps.checkShowCorrectAnswerCheckbox()
|
171
|
+
listSortingPage.steps.verifyOptionsNumerationPreviewTab(numbers)
|
172
|
+
listSortingPage.steps.verifyCorrectAnswerContainerNumeration(numbers)
|
173
|
+
cy.log('Post step: Uncheck \'Show correct answer\' checkbox')
|
174
|
+
listSortingPage.steps.uncheckShowCorrectAnswerCheckbox()
|
175
|
+
});
|
176
|
+
|
177
|
+
listSortingPage.tests.verifyOptionStyleNumerationWhenCheckAnswerIsSelected(numbers)
|
178
|
+
|
179
|
+
it(`When the user selects ${optionStyleDropdownOptions[2]} option from the option style dropdown and has not selected show correct answer checkbox or check answer button then option numeration should be displayed in the preview tab`, () => {
|
180
|
+
listSortingPage.steps.switchToEditTab();
|
181
|
+
listSortingPage.steps.selectOptionStyleDropdownOption(`${optionStyleDropdownOptions[2]}`);
|
182
|
+
listSortingPage.steps.switchToPreviewTab();
|
183
|
+
listSortingPage.steps.verifyOptionsNumerationPreviewTab(uppercase)
|
184
|
+
});
|
185
|
+
|
186
|
+
it('When user clicks on \'Show correct answer\' checkbox then the option style numeration should be displayed on the options and \'Correct answers:\' section should have default \'Answer numeration\'', () => {
|
187
|
+
listSortingPage.steps.checkShowCorrectAnswerCheckbox()
|
188
|
+
listSortingPage.steps.verifyOptionsNumerationPreviewTab(uppercase)
|
189
|
+
listSortingPage.steps.verifyCorrectAnswerContainerNumeration(numbers)
|
190
|
+
cy.log('Post step: Uncheck \'Show correct answer\' checkbox')
|
191
|
+
listSortingPage.steps.uncheckShowCorrectAnswerCheckbox()
|
192
|
+
});
|
193
|
+
|
194
|
+
listSortingPage.tests.verifyOptionStyleNumerationWhenCheckAnswerIsSelected(uppercase)
|
195
|
+
|
196
|
+
it(`When the user selects ${optionStyleDropdownOptions[3]} option from the Answer Numeration dropdownand has not selected show correct answer checkbox or check answer button then option numeration should not be displayed in the preview tab`, () => {
|
197
|
+
listSortingPage.steps.switchToEditTab();
|
198
|
+
listSortingPage.steps.selectOptionStyleDropdownOption(`${optionStyleDropdownOptions[3]}`);
|
199
|
+
listSortingPage.steps.switchToPreviewTab();
|
200
|
+
listSortingPage.steps.verifyOptionsNumerationPreviewTab(lowercase)
|
201
|
+
});
|
202
|
+
|
203
|
+
it('When user clicks on \'Show correct answer\' checkbox then the option style numeration should be displayed on the options and \'Correct answers:\' section should have default \'Answer numeration\'', () => {
|
204
|
+
listSortingPage.steps.checkShowCorrectAnswerCheckbox()
|
205
|
+
listSortingPage.steps.verifyOptionsNumerationPreviewTab(lowercase)
|
206
|
+
listSortingPage.steps.verifyCorrectAnswerContainerNumeration(numbers)
|
207
|
+
cy.log('Post step: Uncheck \'Show correct answer\' checkbox')
|
208
|
+
listSortingPage.steps.uncheckShowCorrectAnswerCheckbox()
|
209
|
+
});
|
210
|
+
|
211
|
+
listSortingPage.tests.verifyOptionStyleNumerationWhenCheckAnswerIsSelected(lowercase);
|
212
|
+
});
|
213
|
+
|
214
|
+
describe('Additional settings: Answer numeration (only while grading) contents', () => {
|
215
|
+
abortEarlySetup();
|
216
|
+
before(() => {
|
217
|
+
cy.log('Navigating to list sorting question type');
|
218
|
+
listSortingPage.steps.navigateToCreateQuestion('list sorting');
|
219
|
+
listSortingPage.steps.expandAdditonalSettings();
|
220
|
+
});
|
221
|
+
|
222
|
+
listSortingPage.tests.verifyAnswerNumerationContents();
|
223
|
+
});
|
224
|
+
|
225
|
+
describe('Additional settings: Answer Numeration (only while grading) set correct answer section', () => {
|
226
|
+
abortEarlySetup();
|
227
|
+
before(() => {
|
228
|
+
cy.log('Navigating to list sorting question type');
|
229
|
+
listSortingPage.steps.navigateToCreateQuestion('list sorting');
|
230
|
+
cy.log('Adding question instructions, setting correct answer order and adding points for Autoscored scoring type and switching to Preview tab');
|
231
|
+
cy.barsPreLoaderWait();
|
232
|
+
listSortingPage.steps.addQuestionInstructions();
|
233
|
+
listSortingPage.steps.addInputToOptionsInputField(options);
|
234
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('seed', 0);
|
235
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('sprout', 1);
|
236
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('plant', 2);
|
237
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('flower', 3);
|
238
|
+
listSortingPage.steps.verifyTargetOptionsTextContentInSetCorrectAnswerSection(correctAnswerArray);
|
239
|
+
listSortingPage.steps.allotPoints('20');
|
240
|
+
listSortingPage.steps.expandAdditonalSettings();
|
241
|
+
listSortingPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
242
|
+
});
|
243
|
+
|
244
|
+
listSortingPage.tests.verifyAnswerNumerationFunctionalityInSetCorrectAnswerSection(answerNumerationDropdownOptions)
|
245
|
+
});
|
246
|
+
|
247
|
+
describe('Additional settings: Answer Numeration (only while grading) preview tab', () => {
|
248
|
+
abortEarlySetup();
|
249
|
+
before(() => {
|
250
|
+
cy.log('Navigating to list sorting question type');
|
251
|
+
listSortingPage.steps.navigateToCreateQuestion('list sorting');
|
252
|
+
cy.log('Adding question instructions, setting correct answer order and adding points for Autoscored scoring type and switching to Preview tab');
|
253
|
+
cy.barsPreLoaderWait();
|
254
|
+
listSortingPage.steps.addQuestionInstructions();
|
255
|
+
listSortingPage.steps.addInputToOptionsInputField(options);
|
256
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('seed', 0);
|
257
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('sprout', 1);
|
258
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('plant', 2);
|
259
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('flower', 3);
|
260
|
+
listSortingPage.steps.verifyTargetOptionsTextContentInSetCorrectAnswerSection(correctAnswerArray);
|
261
|
+
listSortingPage.steps.allotPoints('20');
|
262
|
+
listSortingPage.steps.expandAdditonalSettings();
|
263
|
+
listSortingPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
264
|
+
});
|
265
|
+
|
266
|
+
it(`When the user selects ${answerNumerationDropdownOptions[0]} option from the Answer Numeration dropdown and has not selected show correct answer checkbox or check answer button then option numeration should not be displayed in the preview tab`, () => {
|
267
|
+
listSortingPage.steps.switchToEditTab();
|
268
|
+
utilities.verifyInnerText(listSortingPage.answerNumerationDropdown(), `${answerNumerationDropdownOptions[0]}`)
|
269
|
+
listSortingPage.steps.switchToPreviewTab();
|
270
|
+
utilities.verifyElementVisibilityState(listSortingPage.optionNumeration(), 'notExist');
|
271
|
+
utilities.verifyElementVisibilityState(listSortingPage.optionStyleNumeration(), 'notExist');
|
272
|
+
});
|
273
|
+
|
274
|
+
it('When user clicks on \'Show correct answer\' checkbox then the numeration should not be displayed on the options and should be displayed in \'Correct answers:\' section', () => {
|
275
|
+
listSortingPage.steps.checkShowCorrectAnswerCheckbox()
|
276
|
+
utilities.verifyElementVisibilityState(listSortingPage.optionStyleNumeration(), 'notExist');
|
277
|
+
listSortingPage.steps.verifyCorrectAnswerContainerNumeration(numbers)
|
278
|
+
cy.log('Post step: Uncheck \'Show correct answer\' checkbox')
|
279
|
+
listSortingPage.steps.uncheckShowCorrectAnswerCheckbox();
|
280
|
+
});
|
281
|
+
|
282
|
+
it('When user clicks on \'Check answer\' button then the numeration should not be displayed in the options', () => {
|
283
|
+
listSortingPage.steps.checkAnswer()
|
284
|
+
utilities.verifyElementVisibilityState(listSortingPage.optionNumeration(), 'notExist');
|
285
|
+
});
|
286
|
+
|
287
|
+
it(`When the user selects ${answerNumerationDropdownOptions[1]} option from the Answer Numeration dropdown and has not selected show correct answer checkbox or check answer button then option numeration should not be displayed in the preview tab`, () => {
|
288
|
+
listSortingPage.steps.switchToEditTab();
|
289
|
+
listSortingPage.steps.selectAnswerNumerationDropdownOption(`${answerNumerationDropdownOptions[1]}`);
|
290
|
+
listSortingPage.steps.switchToPreviewTab();
|
291
|
+
utilities.verifyElementVisibilityState(listSortingPage.optionNumeration(), 'notExist');
|
292
|
+
utilities.verifyElementVisibilityState(listSortingPage.optionStyleNumeration(), 'notExist');
|
293
|
+
});
|
294
|
+
|
295
|
+
it('When user clicks on \'Show correct answer\' checkbox then the numeration should not be displayed on the options and should be displayed in \'Correct answers:\' section', () => {
|
296
|
+
listSortingPage.steps.checkShowCorrectAnswerCheckbox()
|
297
|
+
utilities.verifyElementVisibilityState(listSortingPage.optionStyleNumeration(), 'notExist');
|
298
|
+
listSortingPage.steps.verifyCorrectAnswerContainerNumeration(uppercase)
|
299
|
+
cy.log('Post step: Uncheck \'Show correct answer\' checkbox')
|
300
|
+
listSortingPage.steps.uncheckShowCorrectAnswerCheckbox();
|
301
|
+
});
|
302
|
+
|
303
|
+
it(`When the user selects ${answerNumerationDropdownOptions[2]} option from the Answer Numeration dropdownand has not selected show correct answer checkbox or check answer button then option numeration should not be displayed in the preview tab`, () => {
|
304
|
+
listSortingPage.steps.switchToEditTab();
|
305
|
+
listSortingPage.steps.selectAnswerNumerationDropdownOption(`${answerNumerationDropdownOptions[2]}`);
|
306
|
+
listSortingPage.steps.switchToPreviewTab();
|
307
|
+
utilities.verifyElementVisibilityState(listSortingPage.optionNumeration(), 'notExist');
|
308
|
+
utilities.verifyElementVisibilityState(listSortingPage.optionStyleNumeration(), 'notExist');
|
309
|
+
});
|
310
|
+
|
311
|
+
it('When user clicks on \'Show correct answer\' checkbox then the numeration should not be displayed on the options and should be displayed in \'Correct answers:\' section', () => {
|
312
|
+
listSortingPage.steps.checkShowCorrectAnswerCheckbox()
|
313
|
+
utilities.verifyElementVisibilityState(listSortingPage.optionStyleNumeration(), 'notExist');
|
314
|
+
listSortingPage.steps.verifyCorrectAnswerContainerNumeration(lowercase)
|
315
|
+
cy.log('Post step: Uncheck \'Show correct answer\' checkbox')
|
316
|
+
listSortingPage.steps.uncheckShowCorrectAnswerCheckbox();
|
317
|
+
});
|
318
|
+
});
|
319
|
+
});
|
@@ -0,0 +1,326 @@
|
|
1
|
+
import { listSortingPage } from "../../../pages/listSortingPage";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
const optionStyleDropdownOptions = ['None', 'Numerical', 'Uppercase alphabet', 'Lowercase alphabet'];
|
7
|
+
const fontSizeDropdownOptions = ['Default', 'Small', 'Normal', 'Large', 'Extra large', 'Huge'];
|
8
|
+
const fontSizes = ['16px', '12px', '14px', '17px', '20px', '24px'];
|
9
|
+
let options = ['plant', 'sprout', 'flower', 'seed'];
|
10
|
+
let correctAnswerArray = ['seed', 'sprout', 'plant', 'flower'];
|
11
|
+
|
12
|
+
describe('Create Item page - list sorting: Additional settings basic', () => {
|
13
|
+
before(() => {
|
14
|
+
cy.loginAs('admin');
|
15
|
+
});
|
16
|
+
|
17
|
+
describe('Additional Settings accordion', () => {
|
18
|
+
abortEarlySetup();
|
19
|
+
before(() => {
|
20
|
+
cy.log('Navigating to list sorting question type');
|
21
|
+
listSortingPage.steps.navigateToCreateQuestion('list sorting');
|
22
|
+
});
|
23
|
+
|
24
|
+
listSortingPage.tests.verifyAdditonalSettingsAccordionProperties();
|
25
|
+
});
|
26
|
+
|
27
|
+
describe('Additional settings: Font size contents', () => {
|
28
|
+
abortEarlySetup();
|
29
|
+
before(() => {
|
30
|
+
cy.log('Navigating to list sorting question type');
|
31
|
+
listSortingPage.steps.navigateToCreateQuestion('list sorting');
|
32
|
+
cy.log('Adding question instructions, setting correct answer order and adding points for Autoscored scoring type and switching to Preview tab');
|
33
|
+
cy.barsPreLoaderWait();
|
34
|
+
listSortingPage.steps.addQuestionInstructions();
|
35
|
+
listSortingPage.steps.addInputToOptionsInputField(options);
|
36
|
+
listSortingPage.steps.expandAdditonalSettings();
|
37
|
+
});
|
38
|
+
|
39
|
+
listSortingPage.tests.verifyFontSizeSectionContents();
|
40
|
+
});
|
41
|
+
|
42
|
+
describe('Additional settings: Font size set correct answer section', () => {
|
43
|
+
abortEarlySetup();
|
44
|
+
before(() => {
|
45
|
+
cy.log('Navigating to list sorting question type');
|
46
|
+
listSortingPage.steps.navigateToCreateQuestion('list sorting');
|
47
|
+
cy.log('Adding question instructions, setting correct answer order and adding points for Autoscored scoring type and switching to Preview tab');
|
48
|
+
cy.barsPreLoaderWait();
|
49
|
+
listSortingPage.steps.addQuestionInstructions();
|
50
|
+
listSortingPage.steps.addInputToOptionsInputField(options);
|
51
|
+
listSortingPage.steps.expandAdditonalSettings();
|
52
|
+
listSortingPage.steps.checkIncludeLablesCheckbox();
|
53
|
+
listSortingPage.steps.addInputToTopLabelInputField('Top label');
|
54
|
+
listSortingPage.steps.addInputToBottomLabelInputField('Bottom label');
|
55
|
+
listSortingPage.steps.selectOptionStyleDropdownOption(`${optionStyleDropdownOptions[2]}`);
|
56
|
+
});
|
57
|
+
|
58
|
+
fontSizeDropdownOptions.forEach((option, fontsIndex) => {
|
59
|
+
it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the set correct answer section (options, labels) should be changed to ${option}`, () => {
|
60
|
+
listSortingPage.steps.selectFontSizeOptionFromFontSizeDropdown(fontsIndex)
|
61
|
+
listSortingPage.fontSizeDropdown()
|
62
|
+
.verifyInnerText(`${option}`);
|
63
|
+
utilities.verifyCSS(listSortingPage.setCorrectAnswerSectionOption(), {
|
64
|
+
'font-size': fontSizes[fontsIndex]
|
65
|
+
});
|
66
|
+
utilities.verifyCSS(listSortingPage.optionStyleNumeration(), {
|
67
|
+
'font-size': fontSizes[fontsIndex]
|
68
|
+
});
|
69
|
+
utilities.verifyCSS(listSortingPage.setCorrectAnswerSectionTopLabel(), {
|
70
|
+
'font-size': fontSizes[fontsIndex]
|
71
|
+
});
|
72
|
+
utilities.verifyCSS(listSortingPage.setCorrectAnswerSectionBottomLabel(), {
|
73
|
+
'font-size': fontSizes[fontsIndex]
|
74
|
+
});
|
75
|
+
utilities.verifyCSS(listSortingPage.setCorrectAnswerSectionSortedColumnHeader(), {
|
76
|
+
'font-size': fontSizes[fontsIndex]
|
77
|
+
});
|
78
|
+
utilities.verifyCSS(listSortingPage.setCorrectAnswerSectionUnsortedColumnHeader(), {
|
79
|
+
'font-size': fontSizes[fontsIndex]
|
80
|
+
});
|
81
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('seed', 0)
|
82
|
+
utilities.verifyCSS(listSortingPage.setCorrectAnswerSectionOption(), {
|
83
|
+
'font-size': fontSizes[fontsIndex]
|
84
|
+
});
|
85
|
+
cy.log('Post step: Resetting the Set correct answer section')
|
86
|
+
listSortingPage.steps.clickAndDropOptionFromTargetToSourceInSetCorrectAnswerSection('seed', 3)
|
87
|
+
});
|
88
|
+
});
|
89
|
+
});
|
90
|
+
|
91
|
+
describe('Additional settings: Font size Preview tab', () => {
|
92
|
+
abortEarlySetup();
|
93
|
+
before(() => {
|
94
|
+
cy.log('Navigating to list sorting question type');
|
95
|
+
listSortingPage.steps.navigateToCreateQuestion('list sorting');
|
96
|
+
cy.log('Adding question instructions, setting correct answer order and adding points for Autoscored scoring type and switching to Preview tab');
|
97
|
+
cy.barsPreLoaderWait();
|
98
|
+
listSortingPage.steps.addQuestionInstructions();
|
99
|
+
listSortingPage.steps.addInputToOptionsInputField(options);
|
100
|
+
listSortingPage.steps.expandAdditonalSettings();
|
101
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('seed', 0);
|
102
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('sprout', 1);
|
103
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('plant', 2);
|
104
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('flower', 3);
|
105
|
+
listSortingPage.steps.verifyTargetOptionsTextContentInSetCorrectAnswerSection(correctAnswerArray);
|
106
|
+
listSortingPage.steps.allotPoints('20');
|
107
|
+
listSortingPage.steps.checkIncludeLablesCheckbox();
|
108
|
+
listSortingPage.steps.addInputToTopLabelInputField('Top label');
|
109
|
+
listSortingPage.steps.addInputToBottomLabelInputField('Bottom label');
|
110
|
+
listSortingPage.steps.selectOptionStyleDropdownOption(`${optionStyleDropdownOptions[2]}`);
|
111
|
+
listSortingPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
112
|
+
});
|
113
|
+
|
114
|
+
//Failing due - https://redmine.zeuslearning.com/issues/541591
|
115
|
+
fontSizeDropdownOptions.forEach((option, fontsIndex) => {
|
116
|
+
it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the set correct answer section (options, labels) should be changed to ${option}`, () => {
|
117
|
+
listSortingPage.steps.selectFontSizeOptionFromFontSizeDropdown(fontsIndex)
|
118
|
+
listSortingPage.fontSizeDropdown()
|
119
|
+
.verifyInnerText(`${option}`);
|
120
|
+
listSortingPage.steps.switchToPreviewTab()
|
121
|
+
utilities.verifyCSS(listSortingPage.previewTabOption(), {
|
122
|
+
'font-size': fontSizes[fontsIndex]
|
123
|
+
});
|
124
|
+
utilities.verifyCSS(listSortingPage.optionStyleNumeration(), {
|
125
|
+
'font-size': fontSizes[fontsIndex]
|
126
|
+
});
|
127
|
+
utilities.verifyCSS(listSortingPage.previewTabTopLabel(), {
|
128
|
+
'font-size': fontSizes[fontsIndex]
|
129
|
+
});
|
130
|
+
utilities.verifyCSS(listSortingPage.previewTabBottomLabel(), {
|
131
|
+
'font-size': fontSizes[fontsIndex]
|
132
|
+
});
|
133
|
+
utilities.verifyCSS(listSortingPage.previewTabSortedColumnHeader(), {
|
134
|
+
'font-size': fontSizes[fontsIndex]
|
135
|
+
});
|
136
|
+
utilities.verifyCSS(listSortingPage.previewTabUnsortedColumnHeader(), {
|
137
|
+
'font-size': fontSizes[fontsIndex]
|
138
|
+
});
|
139
|
+
utilities.verifyCSS(listSortingPage.previewTabTargetOptionWrapper(), {
|
140
|
+
'font-size': fontSizes[fontsIndex]
|
141
|
+
});
|
142
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('seed', 0);
|
143
|
+
utilities.verifyCSS(listSortingPage.previewTabSourceOptionWrapper(), {
|
144
|
+
'font-size': fontSizes[fontsIndex]
|
145
|
+
});
|
146
|
+
cy.log('Post step: Resetting the Set correct answer section')
|
147
|
+
listSortingPage.steps.clickAndDropOptionFromTargetToSourceInPreviewTab('seed', 0);
|
148
|
+
cy.log('Font size of Answer numeration and correct answer container when Show correct answer is checked')
|
149
|
+
listSortingPage.steps.checkShowCorrectAnswerCheckbox()
|
150
|
+
utilities.verifyCSS(listSortingPage.optionNumeration(), {
|
151
|
+
'font-size': fontSizes[fontsIndex]
|
152
|
+
});
|
153
|
+
utilities.verifyCSS(listSortingPage.correctAnswerContainerAnswerWrapper(), {
|
154
|
+
'font-size': fontSizes[fontsIndex]
|
155
|
+
});
|
156
|
+
utilities.verifyCSS(listSortingPage.optionNumeration(), {
|
157
|
+
'font-size': fontSizes[fontsIndex]
|
158
|
+
});
|
159
|
+
utilities.verifyCSS(listSortingPage.correctAnswerContainerCorrectAnswersLabel(), {
|
160
|
+
'font-size': fontSizes[fontsIndex]
|
161
|
+
});
|
162
|
+
cy.log('Uncheck Show correct answer checkbox')
|
163
|
+
listSortingPage.steps.uncheckShowCorrectAnswerCheckbox()
|
164
|
+
cy.log('Font size of Answer numeration when Check answer is selected')
|
165
|
+
listSortingPage.steps.checkAnswer()
|
166
|
+
utilities.verifyCSS(listSortingPage.optionStyleNumeration(), {
|
167
|
+
'font-size': fontSizes[fontsIndex]
|
168
|
+
});
|
169
|
+
listSortingPage.steps.switchToEditTab();
|
170
|
+
});
|
171
|
+
});
|
172
|
+
});
|
173
|
+
|
174
|
+
describe('Additional settings: Check answer', () => {
|
175
|
+
abortEarlySetup();
|
176
|
+
before(() => {
|
177
|
+
cy.log('Navigating to list sorting question type');
|
178
|
+
listSortingPage.steps.navigateToCreateQuestion('list sorting');
|
179
|
+
cy.log('Adding question instructions, setting correct answer order and adding points for Autoscored scoring type and switching to Preview tab');
|
180
|
+
cy.barsPreLoaderWait();
|
181
|
+
listSortingPage.steps.addQuestionInstructions();
|
182
|
+
listSortingPage.steps.addInputToOptionsInputField(options);
|
183
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('seed', 0);
|
184
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('sprout', 1);
|
185
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('plant', 2);
|
186
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('flower', 3);
|
187
|
+
listSortingPage.steps.verifyTargetOptionsTextContentInSetCorrectAnswerSection(correctAnswerArray);
|
188
|
+
listSortingPage.steps.allotPoints('20');
|
189
|
+
listSortingPage.steps.expandAdditonalSettings();
|
190
|
+
});
|
191
|
+
|
192
|
+
listSortingPage.tests.verifyCheckAnswerSectionAndPreviewTabCheckAnswerButton();
|
193
|
+
});
|
194
|
+
|
195
|
+
describe('Additional settings: Check answer functionality', () => {
|
196
|
+
abortEarlySetup();
|
197
|
+
before(() => {
|
198
|
+
cy.log('Navigating to list ordering question type');
|
199
|
+
listSortingPage.steps.navigateToCreateQuestion('list sorting');
|
200
|
+
cy.log('Adding question instructions, setting correct answer order and adding points for Autoscored scoring type and switching to Preview tab');
|
201
|
+
cy.barsPreLoaderWait();
|
202
|
+
listSortingPage.steps.addQuestionInstructions();
|
203
|
+
listSortingPage.steps.addInputToOptionsInputField(options);
|
204
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('seed', 0);
|
205
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('sprout', 1);
|
206
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('plant', 2);
|
207
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInSetCorrectAnswerSection('flower', 3);
|
208
|
+
listSortingPage.steps.verifyTargetOptionsTextContentInSetCorrectAnswerSection(correctAnswerArray);
|
209
|
+
listSortingPage.steps.allotPoints('20');
|
210
|
+
listSortingPage.steps.expandAdditonalSettings();
|
211
|
+
listSortingPage.steps.setMaximumCheckAnswerAttempts(2);
|
212
|
+
listSortingPage.steps.switchToPreviewTab()
|
213
|
+
});
|
214
|
+
|
215
|
+
//Need to update once https://redmine.zeuslearning.com/issues/540786 is resolved
|
216
|
+
listSortingPage.tests.verifyCheckAnswerButtonFunctionalityWhenQuestionIsUnattempted();
|
217
|
+
|
218
|
+
it('When user attempts the question partially correct with some options at the correct position and some at incorrect then on clicking on the Check Answer button, green check-mark icons should be displayed beside the options at the correct position, red cross-mark icons should be displayed beside the options at incorrect position, a label \'Incorrect answer\' and border should be displayed below the question preview and the correct answer container should not be displayed', () => {
|
219
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('plant', 0);
|
220
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('sprout', 1);
|
221
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('seed', 2);
|
222
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('flower', 3);
|
223
|
+
listSortingPage.steps.verifyTargetOptionsTextContentInPreviewTab(['plant', 'sprout', 'seed', 'flower']);
|
224
|
+
listSortingPage.steps.checkAnswer()
|
225
|
+
listSortingPage.steps.verifyIncorrectOptionsCrossmarkIcon('plant');
|
226
|
+
listSortingPage.steps.verifyCorrectOptionsCheckmarkIcon('sprout');
|
227
|
+
listSortingPage.steps.verifyIncorrectOptionsCrossmarkIcon('seed');
|
228
|
+
listSortingPage.steps.verifyCorrectOptionsCheckmarkIcon('flower');
|
229
|
+
listSortingPage.steps.verifyIncorrectAttemptBorder();
|
230
|
+
listSortingPage.steps.verifyCorrectIncorrectAnswerLabel('Incorrect');
|
231
|
+
listSortingPage.steps.verifyCorrectAnswerContainerDoesNotExist();
|
232
|
+
cy.log('Pre step: Resetting the options')
|
233
|
+
listSortingPage.steps.clickAndDropOptionFromTargetToSourceInPreviewTab('seed', 0);
|
234
|
+
listSortingPage.steps.clickAndDropOptionFromTargetToSourceInPreviewTab('sprout', 1);
|
235
|
+
listSortingPage.steps.clickAndDropOptionFromTargetToSourceInPreviewTab('plant', 2);
|
236
|
+
listSortingPage.steps.clickAndDropOptionFromTargetToSourceInPreviewTab('flower', 3);
|
237
|
+
});
|
238
|
+
|
239
|
+
it('When user attempts the question correctly and clicks on the \'Check Answer\' button, green check-mark icons should be displayed beside the options at the correct position, a label \'Correct answer\' and border should be displayed below the question preview and the correct answer container should not be displayed', () => {
|
240
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('seed', 0);
|
241
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('sprout', 1);
|
242
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('plant', 2);
|
243
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('flower', 3);
|
244
|
+
listSortingPage.steps.verifyTargetOptionsTextContentInPreviewTab(correctAnswerArray);
|
245
|
+
listSortingPage.steps.checkAnswer();
|
246
|
+
listSortingPage.steps.verifyCorrectOptionsCheckmarkIcon('sprout');
|
247
|
+
listSortingPage.steps.verifyCorrectOptionsCheckmarkIcon('seed');
|
248
|
+
listSortingPage.steps.verifyCorrectOptionsCheckmarkIcon('plant');
|
249
|
+
listSortingPage.steps.verifyCorrectOptionsCheckmarkIcon('flower');
|
250
|
+
listSortingPage.steps.verifyCorrectAttemptBorder();
|
251
|
+
listSortingPage.steps.verifyCorrectIncorrectAnswerLabel('Correct');
|
252
|
+
listSortingPage.steps.verifyCorrectAnswerContainerDoesNotExist();
|
253
|
+
});
|
254
|
+
|
255
|
+
listSortingPage.tests.verifyDisabledCheckAnswerButtonWithCSSAnda11y();
|
256
|
+
|
257
|
+
//Failing due to https://redmine.zeuslearning.com/issues/547910
|
258
|
+
it('When the user updates the value of Maximum check answer attempts input field, it should get reflected on the Preview tab', () => {
|
259
|
+
listSortingPage.steps.switchToEditTab();
|
260
|
+
listSortingPage.steps.clearMaximumCheckAnswerAttemptsInputField();
|
261
|
+
listSortingPage.steps.addInputToMaximumCheckAnswerAttemptsInputField(1);
|
262
|
+
listSortingPage.steps.switchToPreviewTab();
|
263
|
+
listSortingPage.steps.verifyCheckAnswerButtonEnabled();
|
264
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('plant', 0);
|
265
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('sprout', 1);
|
266
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('seed', 2);
|
267
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('flower', 3);
|
268
|
+
listSortingPage.steps.verifyTargetOptionsTextContentInPreviewTab(['plant', 'sprout', 'seed', 'flower']);
|
269
|
+
listSortingPage.steps.checkAnswer();
|
270
|
+
listSortingPage.steps.verifyCheckAnswerButtonDisabled();
|
271
|
+
});
|
272
|
+
|
273
|
+
it('When the \'Maximum check answer attempts\' input field has value \'0\' and user switches to Preview tab, then the \'Check Answer\' button should be enabled and user should be able to check answer multiple times', () => {
|
274
|
+
listSortingPage.steps.switchToEditTab();
|
275
|
+
listSortingPage.steps.clearMaximumCheckAnswerAttemptsInputField();
|
276
|
+
listSortingPage.steps.addInputToMaximumCheckAnswerAttemptsInputField(0);
|
277
|
+
cy.log('Switching to Preview tab')
|
278
|
+
listSortingPage.steps.switchToPreviewTab();
|
279
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('flower', 0);
|
280
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('plant', 1);
|
281
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('seed', 2);
|
282
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('sprout', 3);
|
283
|
+
listSortingPage.steps.verifyTargetOptionsTextContentInPreviewTab(['flower', 'plant', 'seed', 'sprout']);
|
284
|
+
listSortingPage.steps.checkAnswer();
|
285
|
+
listSortingPage.steps.verifyCheckAnswerButtonEnabled();
|
286
|
+
cy.log('Pre step: Resetting the options')
|
287
|
+
listSortingPage.steps.clickAndDropOptionFromTargetToSourceInPreviewTab('seed', 0);
|
288
|
+
cy.log('Pre step: Attempting the question')
|
289
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('seed', 2);
|
290
|
+
listSortingPage.steps.verifyTargetOptionsTextContentInPreviewTab(['flower', 'plant', 'seed', 'sprout']);
|
291
|
+
listSortingPage.steps.checkAnswer();
|
292
|
+
listSortingPage.steps.verifyCheckAnswerButtonEnabled();
|
293
|
+
});
|
294
|
+
|
295
|
+
it('When the \'Maximum check answer attempts\' input field is empty and user switches to Preview tab, then the \'Check Answer\' button should be enabled and user should be able to check answer multiple times', () => {
|
296
|
+
listSortingPage.steps.switchToEditTab();
|
297
|
+
listSortingPage.steps.clearMaximumCheckAnswerAttemptsInputField()
|
298
|
+
listSortingPage.steps.switchToPreviewTab();
|
299
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('flower', 0);
|
300
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('plant', 1);
|
301
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('seed', 2);
|
302
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('sprout', 3);
|
303
|
+
listSortingPage.steps.verifyTargetOptionsTextContentInPreviewTab(['flower', 'plant', 'seed', 'sprout']);
|
304
|
+
listSortingPage.steps.checkAnswer();
|
305
|
+
listSortingPage.steps.verifyCheckAnswerButtonEnabled();
|
306
|
+
cy.log('Pre step: Resetting the options')
|
307
|
+
listSortingPage.steps.clickAndDropOptionFromTargetToSourceInPreviewTab('seed', 0);
|
308
|
+
cy.log('Pre step: Attempting the question')
|
309
|
+
listSortingPage.steps.clickAndDropOptionFromSourceToTargetInPreviewTab('seed', 2);
|
310
|
+
listSortingPage.steps.verifyTargetOptionsTextContentInPreviewTab(['flower', 'plant', 'seed', 'sprout']);
|
311
|
+
listSortingPage.steps.checkAnswer();
|
312
|
+
listSortingPage.steps.verifyCheckAnswerButtonEnabled();
|
313
|
+
});
|
314
|
+
});
|
315
|
+
|
316
|
+
describe('Additional Settings: Details section', () => {
|
317
|
+
abortEarlySetup();
|
318
|
+
before(() => {
|
319
|
+
cy.log('Navigating to list sorting question type');
|
320
|
+
listSortingPage.steps.navigateToCreateQuestion('list sorting');
|
321
|
+
listSortingPage.steps.expandAdditonalSettings();
|
322
|
+
});
|
323
|
+
|
324
|
+
listSortingPage.tests.verifyDetailsSection();
|
325
|
+
});
|
326
|
+
});
|