itemengine-cypress-automation 1.0.32 → 1.0.36
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/ListMatching/listMatchingAdditionalSettingsAnswerNumerationAndResponseOptionPlacement.js +196 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingAdditionalSettingsBasic.js +210 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingAdditionalSettingsStemAndResponseColumnHeader.js +206 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingAlternateAnswer.js +193 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingClickAndDrop.js +644 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingEditTabScoringTypes.js +105 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsAllOrNothingScoring.js +117 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsAllOrNothingScoringWithAlternateAnswer.js +30 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsManualAndNonScoredScoring.js +49 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsPartialDifferentScoringWithAlternateTab.js +36 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsPartialDifferentScorings.js +49 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsPartialEqualWeightsScoring.js +48 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsPartialEqualWeightsScoringWithAlternateTab.js +36 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsSection.js +207 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsSetCorrectAnswersCheckboxesEditTab.js +139 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsSetCorrectAnswersCheckboxesPreviewTab.js +227 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingHeaderSection.js +95 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingQuestionInstructionsAndStemsSection.js +246 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingScoringSectionBasic.js +21 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingSetCorrectAnswerSectionBasic.js +40 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsAllOrNothingScoring.js +113 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsAllOrNothingScoringWithAlternateAnswer.js +30 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsManualAndNonScoredScoring.js +48 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsPartialDIfferentScoring.js +49 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsPartialDifferentScoringWithAlternateAnswer.js +36 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsPartialEqualScoring.js +48 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsPartialEqualScoringWithAlternateAnswer.js +35 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsSection.js +233 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsSetCorrectAnswerCheckboxesEditTab.js +113 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsSetCorrectAnswerCheckboxesPreviewTab.js +185 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingSwitchingCases.js +47 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingAdditionalSettingsAnswerNumerationAndOptionLabel.js +295 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingAdditionalSettingsBasic.js +300 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingAdditionalSettingsOptionStyleDropdown.js +302 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingAdditionalSettingsSetPointsPopup.js +273 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingAllOrNothingScoring.js +178 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingAllOrNothingScoringWithAlternateAnswer.js +712 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingEditTabBasicSection.js +316 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingEditTabScoringSection.js +256 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingHeaderSection.js +83 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingManuallyAndNonScoredScoring.js +160 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingPartialDifferentWeightsScoring.js +191 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingPartialDifferentWeightsScoringWithAlternateAnswer.js +895 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingPartialEqualWeightsScoring.js +191 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingPartialEqualWeightsScoringWithAlternateAnswer.js +807 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingSetCorrectAnswerCheckboxes.js +208 -0
- package/cypress/e2e/ILC/ListOrdering/listOrderingSetCorrectAnswerSection.js +172 -0
- package/cypress/e2e/ILC/ListSorting/listSortingAdditionalSettings.js +820 -0
- package/cypress/e2e/ILC/ListSorting/listSortingAutoScoredScoring.js +936 -0
- package/cypress/e2e/ILC/ListSorting/listSortingClickAndDrop.js +456 -0
- package/cypress/e2e/ILC/ListSorting/listSortingEditTabBasicSection.js +440 -0
- package/cypress/e2e/ILC/ListSorting/listSortingEditTabScoringSection.js +259 -0
- package/cypress/e2e/ILC/ListSorting/listSortingHeaderSection.js +89 -0
- package/cypress/e2e/ILC/ListSorting/listSortingManuallyAndNonScoredScoring.js +171 -0
- package/cypress/e2e/ILC/ListSorting/listSortingPartialDifferentWeightsScoring.js +1150 -0
- package/cypress/e2e/ILC/ListSorting/listSortingPartialEqualWeightsScoring.js +1055 -0
- package/cypress/e2e/ILC/ListSorting/listSortingSetCorrectAnswerCheckboxes.js +263 -0
- package/cypress/e2e/ILC/ListSorting/listSortingSetCorrectAnswerSection.js +168 -0
- package/package.json +1 -1
@@ -0,0 +1,316 @@
|
|
1
|
+
import { listOrderingPage } from "../../../pages/listOrderingPage";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
let options = ['seed', 'sprout', 'plant', 'flower'];
|
7
|
+
let correctAnswerArray = ['flower', 'plant', 'sprout', 'seed'];
|
8
|
+
|
9
|
+
describe('Create Item page - List ordering: Question Instructions, Options, Set Correct Answer', () => {
|
10
|
+
before(() => {
|
11
|
+
cy.loginAs('admin');
|
12
|
+
});
|
13
|
+
|
14
|
+
describe('Question Instructions input field - Edit tab', () => {
|
15
|
+
abortEarlySetup();
|
16
|
+
before(() => {
|
17
|
+
cy.log('Navigating to list ordering question type');
|
18
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
19
|
+
});
|
20
|
+
|
21
|
+
listOrderingPage.tests.verifyQuestionInstructionsInputFieldEditTab();
|
22
|
+
});
|
23
|
+
|
24
|
+
describe('Question Instructions input field - Preview tab', () => {
|
25
|
+
abortEarlySetup();
|
26
|
+
before(() => {
|
27
|
+
cy.log('Navigating to list ordering question type');
|
28
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
29
|
+
});
|
30
|
+
|
31
|
+
listOrderingPage.tests.verifyQuestionInstructionsInputFieldPreviewTab();
|
32
|
+
});
|
33
|
+
|
34
|
+
describe('Options section - Edit tab', () => {
|
35
|
+
abortEarlySetup();
|
36
|
+
before(() => {
|
37
|
+
cy.log('Navigating to list ordering question type');
|
38
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
39
|
+
});
|
40
|
+
|
41
|
+
listOrderingPage.tests.verifyOptionSectionEditTabFunctionality();
|
42
|
+
});
|
43
|
+
|
44
|
+
describe('Option section - Set correct answer section for correct tab', () => {
|
45
|
+
abortEarlySetup();
|
46
|
+
before(() => {
|
47
|
+
cy.log('Navigating to list ordering question type');
|
48
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
49
|
+
cy.barsPreLoaderWait();
|
50
|
+
listOrderingPage.steps.addQuestionInstructions();
|
51
|
+
});
|
52
|
+
|
53
|
+
it('By default, 4 \'Options\' should be displayed with Drag handle in set correct answer section', () => {
|
54
|
+
for (let index = 0; index < 4; index++) {
|
55
|
+
listOrderingPage.steps.verifyDragHandleButtonOfOptionInSetCorrectAnswerSection(index)
|
56
|
+
}
|
57
|
+
utilities.verifyElementCount(listOrderingPage.setCorrectAnswerSectionOption(), 4);
|
58
|
+
});
|
59
|
+
|
60
|
+
it('When user clicks on the \'Delete\' option button then deleted option should not be displayed in the \'Set Correct Answer\' section', () => {
|
61
|
+
listOrderingPage.steps.deleteOption(0);
|
62
|
+
for (let index = 0; index < 3; index++) {
|
63
|
+
listOrderingPage.steps.verifyDragHandleButtonOfOptionInSetCorrectAnswerSection(index)
|
64
|
+
}
|
65
|
+
utilities.verifyElementCount(listOrderingPage.setCorrectAnswerSectionOption(), 3);
|
66
|
+
});
|
67
|
+
|
68
|
+
it('When user adds an option using the \'Add option\' button then added option should be displayed in the \'Set Correct Answer\' section', () => {
|
69
|
+
listOrderingPage.steps.addOption()
|
70
|
+
for (let index = 0; index < 4; index++) {
|
71
|
+
listOrderingPage.steps.verifyDragHandleButtonOfOptionInSetCorrectAnswerSection(index)
|
72
|
+
}
|
73
|
+
utilities.verifyElementCount(listOrderingPage.setCorrectAnswerSectionOption(), 4);
|
74
|
+
});
|
75
|
+
|
76
|
+
it('When user adds text to all the options input field, the added text should be displayed in the set correct answer section', () => {
|
77
|
+
listOrderingPage.steps.addInputToOptionsInputField(options)
|
78
|
+
listOrderingPage.steps.verifyOptionsTextContentInSetCorrectAnswerSection(options);
|
79
|
+
});
|
80
|
+
|
81
|
+
it('When user reorders the options in the Set correct answer section and edits an option in the \'Options\' section then the correct option should be updated', () => {
|
82
|
+
listOrderingPage.steps.clickAndReorderOptionInSetCorrectAnswerSection('flower', 0);
|
83
|
+
listOrderingPage.steps.clickAndReorderOptionInSetCorrectAnswerSection('plant', 1);
|
84
|
+
listOrderingPage.steps.clickAndReorderOptionInSetCorrectAnswerSection('sprout', 2);
|
85
|
+
listOrderingPage.steps.verifyOptionsTextContentInSetCorrectAnswerSection(correctAnswerArray);
|
86
|
+
listOrderingPage.steps.editOptionInputField(0, 'This is an edited option');
|
87
|
+
listOrderingPage.steps.verifyOptionsTextContentInSetCorrectAnswerSection(['flower', 'plant', 'sprout', 'This is an edited option']);
|
88
|
+
});
|
89
|
+
});
|
90
|
+
|
91
|
+
describe('Option section - Set correct answer section for alternate tab', () => {
|
92
|
+
abortEarlySetup();
|
93
|
+
before(() => {
|
94
|
+
cy.log('Navigating to list ordering question type');
|
95
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
96
|
+
cy.barsPreLoaderWait();
|
97
|
+
listOrderingPage.steps.addQuestionInstructions();
|
98
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
99
|
+
listOrderingPage.steps.allotPoints(20);
|
100
|
+
listOrderingPage.steps.clickAndReorderOptionInSetCorrectAnswerSection('flower', 0);
|
101
|
+
listOrderingPage.steps.addAlternateTab(1);
|
102
|
+
});
|
103
|
+
|
104
|
+
it('By default, 4 \'Options\' should be displayed with Drag handle in set correct answer section alternate tab', () => {
|
105
|
+
for (let index = 0; index < 4; index++) {
|
106
|
+
listOrderingPage.steps.verifyDragHandleButtonOfOptionInSetCorrectAnswerSection(index)
|
107
|
+
}
|
108
|
+
utilities.verifyElementCount(listOrderingPage.setCorrectAnswerSectionOption(), 4);
|
109
|
+
listOrderingPage.steps.verifyOptionsTextContentInSetCorrectAnswerSection(options);
|
110
|
+
});
|
111
|
+
|
112
|
+
//Failing due to https://redmine.zeuslearning.com/issues/536799
|
113
|
+
it('When user clicks on the \'Delete\' option button then deleted option should not be displayed in the \'Set Correct Answer\' section Alternate tab', () => {
|
114
|
+
listOrderingPage.steps.deleteOption(0);
|
115
|
+
for (let index = 0; index < 3; index++) {
|
116
|
+
listOrderingPage.steps.verifyDragHandleButtonOfOptionInSetCorrectAnswerSection(index)
|
117
|
+
}
|
118
|
+
utilities.verifyElementCount(listOrderingPage.setCorrectAnswerSectionOption(), 3);
|
119
|
+
listOrderingPage.steps.verifyOptionsTextContentInSetCorrectAnswerSection(options.slice(1, 3));
|
120
|
+
});
|
121
|
+
|
122
|
+
it('When user adds an option using the \'Add option\' button then added option should be displayed in the \'Set Correct Answer\' section', () => {
|
123
|
+
listOrderingPage.steps.addOption()
|
124
|
+
for (let index = 0; index < 4; index++) {
|
125
|
+
listOrderingPage.steps.verifyDragHandleButtonOfOptionInSetCorrectAnswerSection(index)
|
126
|
+
}
|
127
|
+
utilities.verifyElementCount(listOrderingPage.setCorrectAnswerSectionOption(), 4);
|
128
|
+
});
|
129
|
+
|
130
|
+
it('When user reorders the options in the Set correct answer section and edits an option in the \'Options\' section then the correct option should be updated', () => {
|
131
|
+
listOrderingPage.steps.clickAndReorderOptionInSetCorrectAnswerSection('flower', 0);
|
132
|
+
listOrderingPage.steps.clickAndReorderOptionInSetCorrectAnswerSection('plant', 1);
|
133
|
+
listOrderingPage.steps.verifyOptionsTextContentInSetCorrectAnswerSection(correctAnswerArray.slice(0, 2));
|
134
|
+
listOrderingPage.steps.editOptionInputField(0, 'This is an edited option');
|
135
|
+
listOrderingPage.steps.verifyOptionsTextContentInSetCorrectAnswerSection(['flower', 'plant', 'This is an edited option']);
|
136
|
+
});
|
137
|
+
});
|
138
|
+
|
139
|
+
describe('Option section - Preview tab', () => {
|
140
|
+
abortEarlySetup();
|
141
|
+
before(() => {
|
142
|
+
cy.log('Navigating to list ordering question type');
|
143
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
144
|
+
cy.barsPreLoaderWait();
|
145
|
+
listOrderingPage.steps.addQuestionInstructions();
|
146
|
+
listOrderingPage.steps.switchToPreviewTab();
|
147
|
+
});
|
148
|
+
|
149
|
+
it('By default, 4 \'Options\' should be displayed with Drag handle in \'Preview tab\'', () => {
|
150
|
+
for (let index = 0; index < 4; index++) {
|
151
|
+
listOrderingPage.steps.verifyDragHandleButtonOfOptionInPreviewTab(index)
|
152
|
+
}
|
153
|
+
utilities.verifyElementCount(listOrderingPage.previewTabOption(), 4);
|
154
|
+
});
|
155
|
+
|
156
|
+
it('When user clicks on the \'Delete\' option button then deleted option should not be displayed in the \'Preview tab\' section', () => {
|
157
|
+
listOrderingPage.steps.switchToEditTab();
|
158
|
+
listOrderingPage.steps.deleteOption(0);
|
159
|
+
listOrderingPage.steps.switchToPreviewTab();
|
160
|
+
for (let index = 0; index < 3; index++) {
|
161
|
+
listOrderingPage.steps.verifyDragHandleButtonOfOptionInPreviewTab(index)
|
162
|
+
}
|
163
|
+
utilities.verifyElementCount(listOrderingPage.previewTabOption(), 3);
|
164
|
+
});
|
165
|
+
|
166
|
+
it('When user adds an option using the \'Add option\' button then added option should be displayed in the \'Preview tab\' section', () => {
|
167
|
+
listOrderingPage.steps.switchToEditTab();
|
168
|
+
listOrderingPage.steps.addOption();
|
169
|
+
listOrderingPage.steps.switchToPreviewTab();
|
170
|
+
for (let index = 0; index < 4; index++) {
|
171
|
+
listOrderingPage.steps.verifyDragHandleButtonOfOptionInPreviewTab(index);
|
172
|
+
}
|
173
|
+
utilities.verifyElementCount(listOrderingPage.previewTabOption(), 4);
|
174
|
+
});
|
175
|
+
|
176
|
+
it('When user adds text to all the options input field, the added text should be displayed in the \'Preview tab\' section', () => {
|
177
|
+
listOrderingPage.steps.switchToEditTab();
|
178
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
179
|
+
listOrderingPage.steps.switchToPreviewTab();
|
180
|
+
listOrderingPage.steps.verifyTextContentOfOptionsInPreviewTab(options);
|
181
|
+
});
|
182
|
+
});
|
183
|
+
|
184
|
+
describe('Option section contents with Image, Equation, Text and Link - Set correct answer section', () => {
|
185
|
+
abortEarlySetup();
|
186
|
+
before(() => {
|
187
|
+
cy.log('Navigating to list ordering question type');
|
188
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
189
|
+
cy.log('Add Image to option input field')
|
190
|
+
listOrderingPage.steps.focusInOptionsInputField(0);
|
191
|
+
listOrderingPage.steps.selectImageOptionFromCKEditorToolbar()
|
192
|
+
listOrderingPage.steps.addImageToInputField();
|
193
|
+
cy.log('Add equation to option input field')
|
194
|
+
listOrderingPage.steps.focusInOptionsInputField(1);
|
195
|
+
listOrderingPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
|
196
|
+
listOrderingPage.steps.addGenericEquationUsingEquationEditorToCKEditorInputField();
|
197
|
+
cy.log('Add link to option input field')
|
198
|
+
listOrderingPage.steps.focusInOptionsInputField(2);
|
199
|
+
listOrderingPage.steps.selectLinkOptionFromCKEditorToolbar();
|
200
|
+
listOrderingPage.steps.addLinkToInputField()
|
201
|
+
cy.log('Add bold text to input field')
|
202
|
+
listOrderingPage.steps.focusInOptionsInputField(3);
|
203
|
+
listOrderingPage.steps.selectBoldOptionFromCKEditorToolbar();
|
204
|
+
listOrderingPage.steps.addBoldTextInputToOptionsInputField(3);
|
205
|
+
});
|
206
|
+
|
207
|
+
it('When user adds an image, equation, text and link to the options input they should be displayed in the \'Set correct answer\' section along with drag handles', () => {
|
208
|
+
for (let index = 0; index < 4; index++) {
|
209
|
+
listOrderingPage.steps.verifyDragHandleButtonOfOptionInSetCorrectAnswerSection(index)
|
210
|
+
}
|
211
|
+
listOrderingPage.steps.verifyImageAddedToOptionInSetCorrectAnswerSection(0);
|
212
|
+
listOrderingPage.steps.verifyEquationAddedToOptionInSetCorrectAnswerSection(1);
|
213
|
+
listOrderingPage.steps.verifyLinkAddedToOptionInSetCorrectAnswerSection(2);
|
214
|
+
listOrderingPage.steps.verifyBoldTextAddedToOptionInSetCorrectAnswerSection(3);
|
215
|
+
});
|
216
|
+
|
217
|
+
it('When user hovers on the option it should be displayed in active state and on removing the focus the option should return to the default state', () => {
|
218
|
+
listOrderingPage.steps.verifyDefaultAndActiveStateOfOptionInSetCorrectAnswerSection()
|
219
|
+
});
|
220
|
+
|
221
|
+
//Failing due to https://redmine.zeuslearning.com/issues/537907
|
222
|
+
it('CSS of \'Set correct answer\' section when image, equation, text and link are added', { tags: 'css' }, () => {
|
223
|
+
utilities.verifyCSS(listOrderingPage.setCorrectAnswerSectionOption().eq(0).find('img'), {
|
224
|
+
'color': css.color.text,
|
225
|
+
'font-size': css.fontSize.default,
|
226
|
+
'font-weight': css.fontWeight.regular
|
227
|
+
});
|
228
|
+
utilities.verifyCSS(listOrderingPage.setCorrectAnswerSectionOption().eq(1).find('.question-text-wrapper'), {
|
229
|
+
'color': css.color.text,
|
230
|
+
'font-size': css.fontSize.default,
|
231
|
+
'font-weight': css.fontWeight.regular
|
232
|
+
});
|
233
|
+
utilities.verifyCSS(listOrderingPage.setCorrectAnswerSectionOption().eq(2).find('a'), {
|
234
|
+
'color': css.color.linkText,
|
235
|
+
'font-size': css.fontSize.default,
|
236
|
+
'font-weight': css.fontWeight.regular
|
237
|
+
});
|
238
|
+
utilities.verifyCSS(listOrderingPage.setCorrectAnswerSectionOption().eq(3).find('.question-text-wrapper'), {
|
239
|
+
'color': css.color.text,
|
240
|
+
'font-size': css.fontSize.default,
|
241
|
+
'font-weight': css.fontWeight.regular
|
242
|
+
});
|
243
|
+
});
|
244
|
+
|
245
|
+
it('Accessibility of \'Set correct answer\' section when image, equation, text and link are added', { tags: 'a11y' }, () => {
|
246
|
+
cy.checkAccessibility(listOrderingPage.setCorrectAnswerSectionOption().eq(0).parents('.list-ordering-set-correct-answer'))
|
247
|
+
});
|
248
|
+
});
|
249
|
+
|
250
|
+
describe('Option section contents with Image, Equation, Text and Link - Preview tab', () => {
|
251
|
+
abortEarlySetup();
|
252
|
+
before(() => {
|
253
|
+
cy.log('Navigating to list ordering question type');
|
254
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
255
|
+
cy.log('Add Image to option input field')
|
256
|
+
listOrderingPage.steps.focusInOptionsInputField(0);
|
257
|
+
listOrderingPage.steps.selectImageOptionFromCKEditorToolbar()
|
258
|
+
listOrderingPage.steps.addImageToInputField();
|
259
|
+
cy.log('Add equation to option input field')
|
260
|
+
listOrderingPage.steps.focusInOptionsInputField(1);
|
261
|
+
listOrderingPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
|
262
|
+
listOrderingPage.steps.addGenericEquationUsingEquationEditorToCKEditorInputField();
|
263
|
+
cy.log('Add link to option input field')
|
264
|
+
listOrderingPage.steps.focusInOptionsInputField(2);
|
265
|
+
listOrderingPage.steps.selectLinkOptionFromCKEditorToolbar();
|
266
|
+
listOrderingPage.steps.addLinkToInputField()
|
267
|
+
cy.log('Add bold text to input field')
|
268
|
+
listOrderingPage.steps.focusInOptionsInputField(3);
|
269
|
+
listOrderingPage.steps.selectBoldOptionFromCKEditorToolbar();
|
270
|
+
listOrderingPage.steps.addBoldTextInputToOptionsInputField(3);
|
271
|
+
listOrderingPage.steps.switchToPreviewTab()
|
272
|
+
});
|
273
|
+
|
274
|
+
it('When user adds an image, equation, text and link to the options input they should be displayed in the \'Preview tab\' along with drag handles', () => {
|
275
|
+
for (let index = 0; index < 4; index++) {
|
276
|
+
listOrderingPage.steps.verifyDragHandleButtonOfOptionInPreviewTab(index)
|
277
|
+
}
|
278
|
+
listOrderingPage.steps.verifyImageAddedToOptionInPreviewTab(0);
|
279
|
+
listOrderingPage.steps.verifyEquationAddedToOptionInPreviewTab(1);
|
280
|
+
listOrderingPage.steps.verifyLinkAddedToOptionInPreviewTab(2);
|
281
|
+
listOrderingPage.steps.verifyBoldTextAddedToOptionInPreviewTab(3);
|
282
|
+
});
|
283
|
+
|
284
|
+
it('When user hovers on the option it should be displayed in active state and on removing the focus the option should return to the default state', () => {
|
285
|
+
listOrderingPage.steps.verifyDefaultAndActiveStateOfOptionInPreviewTab()
|
286
|
+
});
|
287
|
+
|
288
|
+
//Failing due to https://redmine.zeuslearning.com/issues/537907
|
289
|
+
it('CSS of \'Preview tab\' when image, equation and link are added', { tags: 'css' }, () => {
|
290
|
+
utilities.verifyCSS(listOrderingPage.previewTabOption().eq(0).find('img'), {
|
291
|
+
'color': css.color.text,
|
292
|
+
'font-size': css.fontSize.default,
|
293
|
+
'font-weight': css.fontWeight.regular
|
294
|
+
});
|
295
|
+
utilities.verifyCSS(listOrderingPage.previewTabOption().eq(1).find('.question-text-wrapper'), {
|
296
|
+
'color': css.color.text,
|
297
|
+
'font-size': css.fontSize.default,
|
298
|
+
'font-weight': css.fontWeight.regular
|
299
|
+
});
|
300
|
+
utilities.verifyCSS(listOrderingPage.previewTabOption().eq(2).find('a'), {
|
301
|
+
'color': css.color.linkText,
|
302
|
+
'font-size': css.fontSize.default,
|
303
|
+
'font-weight': css.fontWeight.regular
|
304
|
+
});
|
305
|
+
utilities.verifyCSS(listOrderingPage.previewTabOption().eq(3).find('.question-text-wrapper'), {
|
306
|
+
'color': css.color.text,
|
307
|
+
'font-size': css.fontSize.default,
|
308
|
+
'font-weight': css.fontWeight.regular
|
309
|
+
});
|
310
|
+
});
|
311
|
+
|
312
|
+
it('Accessibility of \'Preview tab\' when image, equation and link are added', { tags: 'a11y' }, () => {
|
313
|
+
cy.checkAccessibility(listOrderingPage.previewTabQuestionWrapper());
|
314
|
+
});
|
315
|
+
});
|
316
|
+
});
|
@@ -0,0 +1,256 @@
|
|
1
|
+
import { listOrderingPage } from "../../../pages/listOrderingPage";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
let options = ['plant', 'sprout', 'flower', 'seed'];
|
7
|
+
|
8
|
+
describe('Create Item page - List ordering: Edit tab scoring types and set correct answer section (Correct answer tab)', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
describe('Scoring section contents', () => {
|
14
|
+
abortEarlySetup();
|
15
|
+
before(() => {
|
16
|
+
cy.log('Navigating to list ordering question type');
|
17
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
18
|
+
cy.barsPreLoaderWait()
|
19
|
+
});
|
20
|
+
|
21
|
+
listOrderingPage.tests.verifyScoringTypeLabelAndDropdown('autoScored');
|
22
|
+
});
|
23
|
+
|
24
|
+
describe('Edit tab \'Set correct answer\' section (Correct answer tab) and \'Scoring\' section for Autoscored: All or Nothing scoring type', () => {
|
25
|
+
abortEarlySetup();
|
26
|
+
before(() => {
|
27
|
+
cy.log('Add question instructions, question stem, options and set correct answers');
|
28
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
29
|
+
cy.barsPreLoaderWait()
|
30
|
+
listOrderingPage.steps.addQuestionInstructions();
|
31
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
32
|
+
});
|
33
|
+
|
34
|
+
listOrderingPage.tests.verifyAutoScoredAllOrNothingPointsAndMinimumScoreAwardedLabelAndInputField();
|
35
|
+
|
36
|
+
listOrderingPage.tests.verifyAllContentsOfSetCorrectAnswerSectionForScoringType('All or nothing', options);
|
37
|
+
|
38
|
+
listOrderingPage.tests.verifyPointsFieldErrorState(10);
|
39
|
+
|
40
|
+
listOrderingPage.tests.verifyMinimumScoreIfAttemptedFieldErrorState(10, 20, 10);
|
41
|
+
});
|
42
|
+
|
43
|
+
describe('Edit tab \'Set correct answer\' section (Correct answer tab) and \'Scoring\' section for AutoScored: Partial equal weights scoring type', () => {
|
44
|
+
abortEarlySetup();
|
45
|
+
before(() => {
|
46
|
+
cy.log('Navigating to list ordering question type');
|
47
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
48
|
+
cy.barsPreLoaderWait()
|
49
|
+
listOrderingPage.steps.addQuestionInstructions();
|
50
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
51
|
+
});
|
52
|
+
|
53
|
+
it('When Scoring type dropdown has Auto scored selected then user should be able to select \'Partial - equal weights\' scoring type', () => {
|
54
|
+
utilities.verifyInnerText(listOrderingPage.scoringTypeDropdown(), 'Auto scored')
|
55
|
+
listOrderingPage.steps.selectPartialEqualWeightsCheckbox();
|
56
|
+
});
|
57
|
+
|
58
|
+
it('When the Points input field is empty and the user has switched to \'Partial - equal weights\' scoring, then \'Points per response\' label should be displayed and a \'-\' should be displayed besides column, \'Penalty Points\' and \'Minimum score awarded (if attempted)\' labels and input fields should be displayed and \'Round down score\' label and checkbox should be displayed and by default it should be checked', () => {
|
59
|
+
listOrderingPage.steps.verifyDefaultPointsLabelAndInputField();
|
60
|
+
listOrderingPage.steps.verifyPointsPerResponseLabel()
|
61
|
+
listOrderingPage.steps.verifyPartialEqualWeightsPointsPerResponseScore('-');
|
62
|
+
listOrderingPage.steps.verifyDefaultPenaltyPointsInputFieldAndLabel();
|
63
|
+
listOrderingPage.steps.verifyDefaultMinimumScoreIfAttemptedLabelAndPointsField()
|
64
|
+
listOrderingPage.steps.verifyDefaultRoundDownScoreCheckboxCheckedAndLabel();
|
65
|
+
});
|
66
|
+
|
67
|
+
it('When user gives a score input to \'Points\' input field, then the score should be equally divided and displayed besides each response under the \'Points per response\' label', () => {
|
68
|
+
listOrderingPage.steps.allotPoints('20');
|
69
|
+
listOrderingPage.steps.verifyPartialEqualWeightsPointsPerResponseScore('5');
|
70
|
+
});
|
71
|
+
|
72
|
+
listOrderingPage.tests.verifyAllContentsOfSetCorrectAnswerSectionForScoringType('Partial equal weights', options);
|
73
|
+
|
74
|
+
it('When user adds a option then the Points per response should be updated accordingly', () => {
|
75
|
+
listOrderingPage.steps.addOption();
|
76
|
+
listOrderingPage.steps.verifyPartialEqualWeightsPointsPerResponseScore('4');
|
77
|
+
});
|
78
|
+
|
79
|
+
it('When user deletes a option then the Points per response should be updated accordingly', () => {
|
80
|
+
listOrderingPage.steps.deleteOption(0);
|
81
|
+
listOrderingPage.steps.verifyPartialEqualWeightsPointsPerResponseScore('5');
|
82
|
+
});
|
83
|
+
|
84
|
+
it('User should be able to enter points in \'Penalty Points\' and \'Minimum score awarded (if attempted)\' input fields', () => {
|
85
|
+
listOrderingPage.steps.allotPenaltyPoints(2);
|
86
|
+
listOrderingPage.steps.allotMinimumScoreAwardedIfAttempted(1);
|
87
|
+
});
|
88
|
+
|
89
|
+
it('CSS of \'Points per response\' label and its displayed score, \'Penalty Points\' and \'Minimum score awarded (if attempted)\' and \'Round down score\' checkbox', { tags: 'css' }, () => {
|
90
|
+
utilities.verifyCSS(listOrderingPage.pointsPerResponseLabel(), {
|
91
|
+
'color': css.color.labels,
|
92
|
+
'font-size': css.fontSize.normal,
|
93
|
+
'font-weight': css.fontWeight.semibold
|
94
|
+
});
|
95
|
+
utilities.verifyCSS(listOrderingPage.partialEqualWeightsPointsPerResponseScore().find('[class*="ListOrderingResponsestyles__EqualPoints"]'), {
|
96
|
+
'color': css.color.text,
|
97
|
+
'font-size': css.fontSize.default,
|
98
|
+
'font-weight': css.fontWeight.regular
|
99
|
+
});
|
100
|
+
utilities.verifyCSS(listOrderingPage.minimumScoreIfAttemptedLabel(), {
|
101
|
+
'color': css.color.labels,
|
102
|
+
'font-size': css.fontSize.normal,
|
103
|
+
'font-weight': css.fontWeight.semibold
|
104
|
+
});
|
105
|
+
utilities.verifyCSS(listOrderingPage.rounddownScoreCheckboxLabel(), {
|
106
|
+
'color': css.color.labelText,
|
107
|
+
'font-size': css.fontSize.normal,
|
108
|
+
'font-weight': css.fontWeight.regular
|
109
|
+
});
|
110
|
+
});
|
111
|
+
|
112
|
+
it('Accessibility of \'Penalty Points\' and \'Minimum score awarded (if attempted)\' input field and \'Round down score\' checkbox', { tags: 'a11y' }, () => {
|
113
|
+
cy.checkAccessibility(listOrderingPage.penaltyPointsInputField().parents('.points-container'));
|
114
|
+
cy.checkAccessibility(listOrderingPage.rounddownScoreCheckbox());
|
115
|
+
});
|
116
|
+
|
117
|
+
it('When the user switches to \'All or nothing\' scoring, the \'Points per response\' label and the points displayed for individual responses should not be displayed and the points displayed in \'Points\' input field should remain unchanged', () => {
|
118
|
+
listOrderingPage.steps.selectAllOrNothingCheckbox()
|
119
|
+
utilities.verifyElementVisibilityState(listOrderingPage.pointsPerResponseLabel(), 'notExist');
|
120
|
+
utilities.verifyElementVisibilityState(listOrderingPage.partialEqualWeightsPointsPerResponseScore(), 'notExist');
|
121
|
+
listOrderingPage.steps.verifyPointsFieldValue('20');
|
122
|
+
});
|
123
|
+
|
124
|
+
it('When user has entered points in \'All or nothing\' scoring type and switches to \'Partial equal weights\' scoring type, then the score should be equally divided and displayed besides each response under the \'Points per response\' label', () => {
|
125
|
+
listOrderingPage.steps.allotPoints('9');
|
126
|
+
listOrderingPage.steps.selectPartialEqualWeightsCheckbox();
|
127
|
+
listOrderingPage.steps.verifyPartialEqualWeightsPointsPerResponseScore('2.25');
|
128
|
+
});
|
129
|
+
});
|
130
|
+
|
131
|
+
describe('Edit tab \'Set correct answer\' section (Correct answer tab) and \'Scoring\' section for AutoScored: Partial different weights scoring type', () => {
|
132
|
+
abortEarlySetup();
|
133
|
+
before(() => {
|
134
|
+
cy.log('Navigating to list ordering question type');
|
135
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
136
|
+
cy.barsPreLoaderWait();
|
137
|
+
listOrderingPage.steps.addQuestionInstructions();
|
138
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
139
|
+
});
|
140
|
+
|
141
|
+
it('When Scoring type dropdown has Auto scored selected then then user should be able to select \'Partial - different weights\' scoring', () => {
|
142
|
+
utilities.verifyInnerText(listOrderingPage.scoringTypeDropdown(), 'Auto scored');
|
143
|
+
listOrderingPage.steps.selectPartialDifferentWeightsCheckbox();
|
144
|
+
});
|
145
|
+
|
146
|
+
it('When the user has switched to \'Partial - different weights\' scoring, then \'Points per response\' label should be displayed and a points input field should be displayed besides each response option, \'Penalty Points\' and \'Minimum score awarded (if attempted)\' labels and input fields should be displayed and \'Round down score\' checkbox should be displayed and by default it should be checked', () => {
|
147
|
+
listOrderingPage.steps.verifyPartialDifferentWeightsPointsPerResponseLabel();
|
148
|
+
listOrderingPage.steps.verifyPartialDifferentWeightsPointsInputFieldIsEmptyAndEnabled();
|
149
|
+
listOrderingPage.steps.verifyDefaultPenaltyPointsInputFieldAndLabel();
|
150
|
+
listOrderingPage.steps.verifyDefaultMinimumScoreIfAttemptedLabelAndPointsField()
|
151
|
+
listOrderingPage.steps.verifyDefaultRoundDownScoreCheckboxCheckedAndLabel();
|
152
|
+
});
|
153
|
+
|
154
|
+
it('CSS of disabled points input field', { tags: 'css' }, () => {
|
155
|
+
utilities.verifyCSS(listOrderingPage.partialDifferentWeightsPointsInputField(), {
|
156
|
+
'opacity': '1',
|
157
|
+
});
|
158
|
+
utilities.verifyCSS(listOrderingPage.partialDifferentWeightsPointsInputField().next('fieldset'), {
|
159
|
+
'color': css.color.text,
|
160
|
+
'font-size': css.fontSize.default,
|
161
|
+
'font-weight': css.fontWeight.regular
|
162
|
+
});
|
163
|
+
});
|
164
|
+
|
165
|
+
it('Accessibility of disabled Points field', { tags: 'a11y' }, () => {
|
166
|
+
cy.checkAccessibility(listOrderingPage.partialDifferentWeightsPointsInputField().parents('.list-ordering-set-correct-answer'));
|
167
|
+
});
|
168
|
+
|
169
|
+
listOrderingPage.tests.verifyAllContentsOfSetCorrectAnswerSectionForScoringType('Partial different weights', options);
|
170
|
+
|
171
|
+
it('User should be able to give a score input to \'Points per response\' input fields', () => {
|
172
|
+
listOrderingPage.steps.allotPartialDifferentWeightsToAllPointsFields([4.2, 1.8, 3.7, 2.3]);
|
173
|
+
});
|
174
|
+
|
175
|
+
it('User should be able to enter points in \'Penalty Points\' and \'Minimum score awarded (if attempted)\' input fields', () => {
|
176
|
+
listOrderingPage.steps.allotPenaltyPoints(2);
|
177
|
+
listOrderingPage.steps.allotMinimumScoreAwardedIfAttempted(1);
|
178
|
+
});
|
179
|
+
|
180
|
+
it('CSS of \'Points per response\' label, \'Penalty Points\' and \'Minimum score awarded (if attempted)\' and \'Round down score\' checkbox', { tags: 'css' }, () => {
|
181
|
+
utilities.verifyCSS(listOrderingPage.partialDifferentWeightsPointsInputField().next('fieldset'), {
|
182
|
+
'color': css.color.text,
|
183
|
+
'font-size': css.fontSize.default,
|
184
|
+
'font-weight': css.fontWeight.regular
|
185
|
+
});
|
186
|
+
utilities.verifyCSS(listOrderingPage.partialDifferentWeightsPointsPerResponseLabel(), {
|
187
|
+
'color': css.color.labels,
|
188
|
+
'font-size': css.fontSize.normal,
|
189
|
+
'font-weight': css.fontWeight.semibold
|
190
|
+
});
|
191
|
+
utilities.verifyCSS(listOrderingPage.penaltyPointsLabel(), {
|
192
|
+
'color': css.color.labels,
|
193
|
+
'font-size': css.fontSize.normal,
|
194
|
+
'font-weight': css.fontWeight.semibold
|
195
|
+
});
|
196
|
+
utilities.verifyCSS(listOrderingPage.minimumScoreIfAttemptedLabel(), {
|
197
|
+
'color': css.color.labels,
|
198
|
+
'font-size': css.fontSize.normal,
|
199
|
+
'font-weight': css.fontWeight.semibold
|
200
|
+
});
|
201
|
+
utilities.verifyCSS(listOrderingPage.rounddownScoreCheckboxLabel(), {
|
202
|
+
'color': css.color.labelText,
|
203
|
+
'font-size': css.fontSize.normal,
|
204
|
+
'font-weight': css.fontWeight.regular
|
205
|
+
});
|
206
|
+
});
|
207
|
+
|
208
|
+
it('Accessibility of \'Points per response\', \'Penalty Points\' and \'Minimum score awarded (if attempted)\' input fields and \'Round down score\' checkbox', { tags: 'a11y' }, () => {
|
209
|
+
cy.checkAccessibility(listOrderingPage.partialDifferentWeightsPointsInputField());
|
210
|
+
cy.checkAccessibility(listOrderingPage.penaltyPointsInputField().parents('.points-container'));
|
211
|
+
cy.checkAccessibility(listOrderingPage.rounddownScoreCheckbox().parents('.round-down-score-wrapper'));
|
212
|
+
});
|
213
|
+
|
214
|
+
it('When the user switches to \'All or nothing\' scoring, the points added for individual responses in Partial - different weights scoring should get summed up in the All or nothing scoring Points input field', () => {
|
215
|
+
listOrderingPage.steps.selectAllOrNothingCheckbox()
|
216
|
+
utilities.verifyElementVisibilityState(listOrderingPage.pointsPerResponseLabel(), 'notExist');
|
217
|
+
utilities.verifyElementVisibilityState(listOrderingPage.partialDifferentWeightsPointsInputField(), 'notExist');
|
218
|
+
listOrderingPage.steps.verifyPointsFieldValue('12');
|
219
|
+
});
|
220
|
+
|
221
|
+
it('When user has entered points in \'All or nothing\' scoring type and switches to \'Partial different weights\' scoring type, then the points allocated should get equally divided between each correct response', () => {
|
222
|
+
listOrderingPage.steps.clearPointsField();
|
223
|
+
listOrderingPage.steps.allotPoints('8');
|
224
|
+
listOrderingPage.steps.selectPartialDifferentWeightsCheckbox();
|
225
|
+
listOrderingPage.steps.verifyPartialDifferentWeightsPointsInputFieldValue(['2', '2', '2', '2']);
|
226
|
+
});
|
227
|
+
});
|
228
|
+
|
229
|
+
describe('Edit tab \'Set correct answer\' section (Correct answer tab) and \'Scoring\' section for Manually Scored scoring type', () => {
|
230
|
+
abortEarlySetup();
|
231
|
+
before(() => {
|
232
|
+
cy.log('Navigating to list ordering question type');
|
233
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
234
|
+
cy.barsPreLoaderWait()
|
235
|
+
listOrderingPage.steps.addQuestionInstructions();
|
236
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
237
|
+
});
|
238
|
+
|
239
|
+
listOrderingPage.tests.verifyManualScoringEditTabFunctionality();
|
240
|
+
});
|
241
|
+
|
242
|
+
describe('Edit tab \'Set correct answer\' section (Correct answer tab) and \'Scoring\' section for Non Scored scoring type', () => {
|
243
|
+
abortEarlySetup();
|
244
|
+
before(() => {
|
245
|
+
cy.log('Navigating to list ordering question type');
|
246
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
247
|
+
cy.barsPreLoaderWait()
|
248
|
+
listOrderingPage.steps.addQuestionInstructions();
|
249
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
250
|
+
});
|
251
|
+
|
252
|
+
listOrderingPage.tests.verifyEditTabNonScoredScoringSectionContents();
|
253
|
+
|
254
|
+
listOrderingPage.tests.verifyAllContentsOfSetCorrectAnswerSectionForScoringType('Non scored', options);
|
255
|
+
});
|
256
|
+
});
|
@@ -0,0 +1,83 @@
|
|
1
|
+
import { dialogBoxBase } from "../../../pages";
|
2
|
+
import { listOrderingPage } from "../../../pages/listOrderingPage";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
|
5
|
+
describe('Create question page - list ordering: Header section and Saving question', () => {
|
6
|
+
before(() => {
|
7
|
+
cy.loginAs('admin');
|
8
|
+
});
|
9
|
+
|
10
|
+
describe('Header section contents', () => {
|
11
|
+
abortEarlySetup();
|
12
|
+
before(() => {
|
13
|
+
cy.log('Navigating to list ordering question type');
|
14
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering')
|
15
|
+
});
|
16
|
+
|
17
|
+
listOrderingPage.tests.verifyCreateQuestionPageQuestionTypeHeader('List ordering');
|
18
|
+
});
|
19
|
+
|
20
|
+
describe('Tabs section', () => {
|
21
|
+
abortEarlySetup();
|
22
|
+
before(() => {
|
23
|
+
cy.log('Navigating to list ordering question type');
|
24
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering')
|
25
|
+
});
|
26
|
+
|
27
|
+
listOrderingPage.tests.verifyTabsSection();
|
28
|
+
});
|
29
|
+
|
30
|
+
describe('Cancel button', () => {
|
31
|
+
abortEarlySetup();
|
32
|
+
before(() => {
|
33
|
+
cy.log('Navigating to list ordering question type');
|
34
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering')
|
35
|
+
});
|
36
|
+
|
37
|
+
listOrderingPage.tests.verifyCancelButton('list ordering');
|
38
|
+
});
|
39
|
+
|
40
|
+
describe('Save Question button', () => {
|
41
|
+
abortEarlySetup();
|
42
|
+
before(() => {
|
43
|
+
cy.log('Navigating to list ordering question type');
|
44
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering')
|
45
|
+
cy.barsPreLoaderWait();
|
46
|
+
});
|
47
|
+
|
48
|
+
describe('Validation error messages', () => {
|
49
|
+
dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
|
50
|
+
|
51
|
+
it('Validation error messages should be displayed below required input fields', () => {
|
52
|
+
listOrderingPage.steps.verifyQuestionInstructionsErrorMessage()
|
53
|
+
for (let index = 0; index < 4; index++) {
|
54
|
+
listOrderingPage.steps.verifyOptionsInputFieldErrorMessage(index)
|
55
|
+
}
|
56
|
+
listOrderingPage.steps.verifyPointsFieldErrorMessage();
|
57
|
+
listOrderingPage.steps.verifySetCorrectAnswerErrorIconIsDisplayed()
|
58
|
+
});
|
59
|
+
|
60
|
+
it('Validation error messages should disappear when required input fields are filled', () => {
|
61
|
+
listOrderingPage.steps.addQuestionInstructions();
|
62
|
+
listOrderingPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
|
63
|
+
listOrderingPage.steps.addOptionsText(4);
|
64
|
+
for (let index = 0; index < 4; index++) {
|
65
|
+
listOrderingPage.steps.verifyOptionsInputFieldErrorMessageDoesNotExist(index);
|
66
|
+
}
|
67
|
+
listOrderingPage.steps.allotPoints(20);
|
68
|
+
listOrderingPage.steps.verifyPointsFieldErrorMessageIsNotDisplayed();
|
69
|
+
listOrderingPage.steps.verifyErrorMessageIsNotDisplayed();
|
70
|
+
listOrderingPage.steps.verifySetCorrectAnswerErrorIconIsNotDisplayed();
|
71
|
+
});
|
72
|
+
|
73
|
+
listOrderingPage.tests.verifya11yOfCreateItemWrapperContents();
|
74
|
+
});
|
75
|
+
|
76
|
+
describe('Saving a question', () => {
|
77
|
+
it('When user has filled all the mandatory fields then on clicking on Save Question button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
|
78
|
+
listOrderingPage.steps.saveAQuestionAndVerifySnackbar();
|
79
|
+
});
|
80
|
+
listOrderingPage.tests.verifySavedSuccessfullySnackbarCSSanda11y();
|
81
|
+
});
|
82
|
+
});
|
83
|
+
});
|