itemengine-cypress-automation 1.0.18 → 1.0.19
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridAdditionalSettingsBasic.js +255 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridAllOrNothingWithAlternateAnswer.js +731 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridAutoScoredScoring.js +0 -719
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridOptionsAdditionalSettings.js +351 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialDifferentWeights.js +0 -930
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialDifferentWeightsWithAlternateAnswer.js +942 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialEqualWeights.js +0 -852
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialEqualWeightsWithAlternateAnswer.js +864 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridQuestionStemAdditionalSettings.js +261 -0
- package/package.json +1 -1
- package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridAdditionalSettings.js +0 -830
package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridQuestionStemAdditionalSettings.js
ADDED
@@ -0,0 +1,261 @@
|
|
1
|
+
import { multipleSelectionGridPage } from "../../../pages/multipleSelectionGridPage";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
const css = Cypress.env('css');
|
4
|
+
|
5
|
+
const questionStems = ['Bat', 'Ostrich', 'Platypus', 'Eagle'];
|
6
|
+
const options = ['Is mammal', 'Lays eggs', 'Can fly'];
|
7
|
+
|
8
|
+
const questionStemNumerationOptions = ['None', 'Numerical', 'Uppercase alphabet', 'Lowercase alphabet'];
|
9
|
+
const numbers = ['1', '2', '3', '4'];
|
10
|
+
const lowercase = ['a', 'b', 'c', 'd'];
|
11
|
+
const uppercase = ['A', 'B', 'C', 'D'];
|
12
|
+
|
13
|
+
describe('Create Item page - Multiple Selection Grid: Additional settings', () => {
|
14
|
+
before(() => {
|
15
|
+
cy.loginAs('admin');
|
16
|
+
});
|
17
|
+
|
18
|
+
describe('Additional settings: Student response area and layout', () => {
|
19
|
+
abortEarlySetup();
|
20
|
+
before(() => {
|
21
|
+
cy.log('Navigating to multiple selection grid question type');
|
22
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
23
|
+
multipleSelectionGridPage.steps.expandAdditonalSettings();
|
24
|
+
});
|
25
|
+
|
26
|
+
multipleSelectionGridPage.tests.verifyStudentResponseAreaAndLayoutLabelAndCSS();
|
27
|
+
});
|
28
|
+
|
29
|
+
describe('Additional settings: Question stem numeration contents', () => {
|
30
|
+
abortEarlySetup();
|
31
|
+
before(() => {
|
32
|
+
cy.log('Navigating to multiple selection grid question type');
|
33
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
34
|
+
multipleSelectionGridPage.steps.expandAdditonalSettings();
|
35
|
+
});
|
36
|
+
|
37
|
+
it(`\'Question stem numeration\' label and dropdown should be displayed and by default, ${questionStemNumerationOptions[0]} option should be selected in the dropdown`, () => {
|
38
|
+
multipleSelectionGridPage.questionStemNumerationLabel()
|
39
|
+
.verifyInnerText('Question stem numeration')
|
40
|
+
.should('be.visible');
|
41
|
+
multipleSelectionGridPage.questionStemNumerationDropdown()
|
42
|
+
.verifyInnerText('None')
|
43
|
+
.should('exist');
|
44
|
+
});
|
45
|
+
|
46
|
+
it('CSS of Question stem numeration section', { tags: 'css' }, () => {
|
47
|
+
multipleSelectionGridPage.questionStemNumerationLabel()
|
48
|
+
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
49
|
+
multipleSelectionGridPage.questionStemNumerationDropdown()
|
50
|
+
.verifyCSS(css.color.liText, css.fontSize.default, css.fontWeight.regular);
|
51
|
+
});
|
52
|
+
|
53
|
+
it(`When user clicks on the Question stem numeration dropdown a list of 4 options - ${questionStemNumerationOptions} should be displayed`, () => {
|
54
|
+
multipleSelectionGridPage.steps.expandQuestionStemNumerationDropdown();
|
55
|
+
multipleSelectionGridPage.steps.verifyQuestionStemNumerationDropdownOptions(questionStemNumerationOptions);
|
56
|
+
});
|
57
|
+
|
58
|
+
it('CSS of Question stem numeration dropdown in active state', { tags: 'css' }, () => {
|
59
|
+
multipleSelectionGridPage.questionStemNumerationDropdownOptions()
|
60
|
+
.eq(0)
|
61
|
+
.verifyCSS(css.color.liText, css.fontSize.default, css.fontWeight.regular)
|
62
|
+
.should('have.css', 'background-color', css.color.liTextSelectedBg);
|
63
|
+
multipleSelectionGridPage.questionStemNumerationDropdownOptions()
|
64
|
+
.eq(1)
|
65
|
+
.should('have.css', 'background-color', css.color.transparent);
|
66
|
+
});
|
67
|
+
|
68
|
+
it('Accessbility of Question stem numeration dropdown in active state', { tags: 'a11y' }, () => {
|
69
|
+
it('Accessbility of Grid style dropdown in active state', { tags: 'a11y' }, () => {
|
70
|
+
cy.checkAccessibility(multipleSelectionGridPage.dropdownList());
|
71
|
+
});
|
72
|
+
});
|
73
|
+
});
|
74
|
+
|
75
|
+
describe('Additional settings: Question stem numeration set correct answer section', () => {
|
76
|
+
abortEarlySetup();
|
77
|
+
before(() => {
|
78
|
+
cy.log('Navigating to multiple selection grid question type');
|
79
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
80
|
+
multipleSelectionGridPage.steps.addQuestionInstructions();
|
81
|
+
multipleSelectionGridPage.steps.addOption();
|
82
|
+
multipleSelectionGridPage.steps.addInputToAllQuestionStemFields(questionStems);
|
83
|
+
multipleSelectionGridPage.steps.addInputToAllOptionsFields(options);
|
84
|
+
multipleSelectionGridPage.steps.allotPoints(10);
|
85
|
+
multipleSelectionGridPage.steps.expandAdditonalSettings();
|
86
|
+
});
|
87
|
+
|
88
|
+
it(`When the user selects ${questionStemNumerationOptions[0]} option from the Option stem numeration dropdown, then numeration should not be displayed in the Set correct answer table`, () => {
|
89
|
+
multipleSelectionGridPage.questionStemNumerationDropdown()
|
90
|
+
.verifyInnerText(`${questionStemNumerationOptions[0]}`);
|
91
|
+
multipleSelectionGridPage.questionStemNumeration()
|
92
|
+
.should('not.exist');
|
93
|
+
});
|
94
|
+
|
95
|
+
it(`When the user selects ${questionStemNumerationOptions[1]} option from the Option stem numeration dropdown, then numbers should be displayed in the Set correct answer table`, () => {
|
96
|
+
multipleSelectionGridPage.steps.selectQuestionStemNumerationDropdownOption(`${questionStemNumerationOptions[1]}`);
|
97
|
+
multipleSelectionGridPage.steps.verifyQuestionStemNumerationInSetCorrectAnswerTable(numbers);
|
98
|
+
});
|
99
|
+
|
100
|
+
it(`When the user selects ${questionStemNumerationOptions[2]} option from the Option stem numeration dropdown, then uppercase alphabets should be displayed in the Set correct answer table`, () => {
|
101
|
+
multipleSelectionGridPage.steps.selectQuestionStemNumerationDropdownOption(`${questionStemNumerationOptions[2]}`);
|
102
|
+
multipleSelectionGridPage.steps.verifyQuestionStemNumerationInSetCorrectAnswerTable(uppercase);
|
103
|
+
});
|
104
|
+
|
105
|
+
it(`When the user selects ${questionStemNumerationOptions[3]} option from the Option stem numeration dropdown, then lowercase alphabets should be displayed in the Set correct answer table`, () => {
|
106
|
+
multipleSelectionGridPage.steps.selectQuestionStemNumerationDropdownOption(`${questionStemNumerationOptions[3]}`);
|
107
|
+
multipleSelectionGridPage.steps.verifyQuestionStemNumerationInSetCorrectAnswerTable(lowercase);
|
108
|
+
});
|
109
|
+
|
110
|
+
it('CSS for question stem numeration', { tags: 'css' }, () => {
|
111
|
+
multipleSelectionGridPage.questionStemNumeration()
|
112
|
+
.eq(0)
|
113
|
+
.verifyCSS(css.color.activeButtons, css.fontSize.default, css.fontWeight.regular)
|
114
|
+
.should('have.css', 'background-color', css.color.optionNumerationBg);
|
115
|
+
});
|
116
|
+
|
117
|
+
it('Accessibility of question stem numeration', () => {
|
118
|
+
cy.checkAccessibility(multipleSelectionGridPage.questionStemNumeration().eq(0).parents('.stem-numeration-present'));
|
119
|
+
});
|
120
|
+
});
|
121
|
+
|
122
|
+
describe('Additional settings: Question stem numeration preview tab section', () => {
|
123
|
+
abortEarlySetup();
|
124
|
+
before(() => {
|
125
|
+
cy.log('Navigating to multiple selection grid question type');
|
126
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
127
|
+
multipleSelectionGridPage.steps.addQuestionInstructions();
|
128
|
+
multipleSelectionGridPage.steps.addOption()
|
129
|
+
multipleSelectionGridPage.steps.addInputToAllQuestionStemFields(questionStems);
|
130
|
+
multipleSelectionGridPage.steps.addInputToAllOptionsFields(options);
|
131
|
+
multipleSelectionGridPage.steps.allotPoints(10);
|
132
|
+
multipleSelectionGridPage.steps.expandAdditonalSettings();
|
133
|
+
});
|
134
|
+
|
135
|
+
it(`When the user selects ${questionStemNumerationOptions[0]} option from the Option stem numeration dropdown, then numeration should not be displayed in the preview tab answer table`, () => {
|
136
|
+
multipleSelectionGridPage.questionStemNumerationDropdown()
|
137
|
+
.verifyInnerText(`${questionStemNumerationOptions[0]}`);
|
138
|
+
multipleSelectionGridPage.steps.switchToPreviewTab();
|
139
|
+
multipleSelectionGridPage.previewTabQuestionStemNumeration()
|
140
|
+
.should('not.exist');
|
141
|
+
});
|
142
|
+
|
143
|
+
it(`When the user selects ${questionStemNumerationOptions[1]} option from the Option stem numeration dropdown, then numbers should be displayed in the preview tab answer table`, () => {
|
144
|
+
multipleSelectionGridPage.steps.switchToEditTab();
|
145
|
+
multipleSelectionGridPage.steps.selectQuestionStemNumerationDropdownOption(`${questionStemNumerationOptions[1]}`);
|
146
|
+
multipleSelectionGridPage.steps.switchToPreviewTab();
|
147
|
+
multipleSelectionGridPage.steps.verifyQuestionStemNumerationInPreviewTabAnswerTable(numbers);
|
148
|
+
});
|
149
|
+
|
150
|
+
it(`When the user selects ${questionStemNumerationOptions[2]} option from the Option stem numeration dropdown, then uppercase alphabets should be displayed in the preview tab answer table`, () => {
|
151
|
+
multipleSelectionGridPage.steps.switchToEditTab();
|
152
|
+
multipleSelectionGridPage.steps.selectQuestionStemNumerationDropdownOption(`${questionStemNumerationOptions[2]}`);
|
153
|
+
multipleSelectionGridPage.steps.switchToPreviewTab();
|
154
|
+
multipleSelectionGridPage.steps.verifyQuestionStemNumerationInPreviewTabAnswerTable(uppercase);
|
155
|
+
});
|
156
|
+
|
157
|
+
it(`When the user selects ${questionStemNumerationOptions[3]} option from the Option stem numeration dropdown, then lowercase alphabets should be displayed in the preview tab answer table`, () => {
|
158
|
+
multipleSelectionGridPage.steps.switchToEditTab()
|
159
|
+
multipleSelectionGridPage.steps.selectQuestionStemNumerationDropdownOption(`${questionStemNumerationOptions[3]}`);
|
160
|
+
multipleSelectionGridPage.steps.switchToPreviewTab();
|
161
|
+
multipleSelectionGridPage.steps.verifyQuestionStemNumerationInPreviewTabAnswerTable(lowercase);
|
162
|
+
});
|
163
|
+
|
164
|
+
it('When user selects \'Randomize options\' the numeration should be displayed in ascending order in the preview tab answer table', () => {
|
165
|
+
multipleSelectionGridPage.steps.switchToEditTab();
|
166
|
+
multipleSelectionGridPage.steps.selectRandomizeOptionsCheckbox();
|
167
|
+
multipleSelectionGridPage.steps.switchToPreviewTab();
|
168
|
+
multipleSelectionGridPage.steps.verifyQuestionStemNumerationInPreviewTabAnswerTable(lowercase);
|
169
|
+
});
|
170
|
+
|
171
|
+
it('CSS for option numeration', { tags: 'css' }, () => {
|
172
|
+
multipleSelectionGridPage.previewTabQuestionStemNumeration()
|
173
|
+
.eq(0)
|
174
|
+
.verifyCSS(css.color.activeButtons, css.fontSize.default, css.fontWeight.regular)
|
175
|
+
.should('have.css', 'background-color', css.color.optionNumerationBg);
|
176
|
+
});
|
177
|
+
|
178
|
+
it('Accessibility of question stem numeration', () => {
|
179
|
+
cy.checkAccessibility(multipleSelectionGridPage.previewTabQuestionStemNumeration().eq(0).parents('.stem-numeration-present'));
|
180
|
+
});
|
181
|
+
});
|
182
|
+
|
183
|
+
describe('Additional settings: Title for question stems contents', () => {
|
184
|
+
abortEarlySetup();
|
185
|
+
before(() => {
|
186
|
+
cy.log('Navigating to multiple selection grid question type');
|
187
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
188
|
+
multipleSelectionGridPage.steps.expandAdditonalSettings();
|
189
|
+
});
|
190
|
+
|
191
|
+
it('\'Title for question stems\' label and input field should be displayed and by default, the input field should be prefilled with \'Question stem\'', () => {
|
192
|
+
multipleSelectionGridPage.titleForQuestionStemsLabel()
|
193
|
+
.verifyInnerText('Title for question stems')
|
194
|
+
.should('be.visible');
|
195
|
+
multipleSelectionGridPage.titleForQuestionStemInputField()
|
196
|
+
.verifyInnerText('Question stem')
|
197
|
+
});
|
198
|
+
|
199
|
+
it('CSS of Title for question stems label and input field', { tags: 'css' }, () => {
|
200
|
+
multipleSelectionGridPage.titleForQuestionStemsLabel()
|
201
|
+
.verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
|
202
|
+
multipleSelectionGridPage.titleForQuestionStemInputField()
|
203
|
+
.verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular);
|
204
|
+
});
|
205
|
+
|
206
|
+
//Note: a11y covered in verifyAdditonalSettingsAccordionProperties
|
207
|
+
});
|
208
|
+
|
209
|
+
describe('Additional settings: Title for question stems set correct answer section', () => {
|
210
|
+
abortEarlySetup();
|
211
|
+
before(() => {
|
212
|
+
cy.log('Navigating to multiple selection grid question type');
|
213
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
214
|
+
multipleSelectionGridPage.steps.addQuestionInstructions();
|
215
|
+
multipleSelectionGridPage.steps.addOption();
|
216
|
+
multipleSelectionGridPage.steps.addInputToAllQuestionStemFields(questionStems);
|
217
|
+
multipleSelectionGridPage.steps.addInputToAllOptionsFields(options);
|
218
|
+
multipleSelectionGridPage.steps.allotPoints(10);
|
219
|
+
multipleSelectionGridPage.steps.expandAdditonalSettings();
|
220
|
+
});
|
221
|
+
|
222
|
+
it('By default, Question stem should be displayed as the question stem title in the set correct answer table', () => {
|
223
|
+
multipleSelectionGridPage.setCorrectAnswerTableQuestionStemTitle()
|
224
|
+
.verifyInnerText('Question stem');
|
225
|
+
});
|
226
|
+
|
227
|
+
it('When user enters any text in the Title for question stems then that title should be displayed the set correct answer table', () => {
|
228
|
+
multipleSelectionGridPage.steps.addInputToTitleForQuestionStemInputField('Causes of Pollution');
|
229
|
+
multipleSelectionGridPage.setCorrectAnswerTableQuestionStemTitle()
|
230
|
+
.verifyInnerText('Causes of Pollution');
|
231
|
+
});
|
232
|
+
});
|
233
|
+
|
234
|
+
describe('Additional settings: Title for question stems preview tab section', () => {
|
235
|
+
abortEarlySetup();
|
236
|
+
before(() => {
|
237
|
+
cy.log('Navigating to multiple selection grid question type');
|
238
|
+
multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
|
239
|
+
multipleSelectionGridPage.steps.addQuestionInstructions();
|
240
|
+
multipleSelectionGridPage.steps.addOption()
|
241
|
+
multipleSelectionGridPage.steps.addInputToAllQuestionStemFields(questionStems);
|
242
|
+
multipleSelectionGridPage.steps.addInputToAllOptionsFields(options);
|
243
|
+
multipleSelectionGridPage.steps.allotPoints(10);
|
244
|
+
multipleSelectionGridPage.steps.expandAdditonalSettings();
|
245
|
+
multipleSelectionGridPage.steps.switchToPreviewTab();
|
246
|
+
});
|
247
|
+
|
248
|
+
it('By default, Question stem should be displayed as the question stem title in the preview tab answer table', () => {
|
249
|
+
multipleSelectionGridPage.previewTabAnswerTableQuestionStemTitle()
|
250
|
+
.verifyInnerText('Question stem');
|
251
|
+
});
|
252
|
+
|
253
|
+
it('When user enters any text in the \'Title for question stems\' then that title should be displayed the preview tab answer table', () => {
|
254
|
+
multipleSelectionGridPage.steps.switchToEditTab();
|
255
|
+
multipleSelectionGridPage.steps.addInputToTitleForQuestionStemInputField('Causes of Pollution');
|
256
|
+
multipleSelectionGridPage.steps.switchToPreviewTab();
|
257
|
+
multipleSelectionGridPage.previewTabAnswerTableQuestionStemTitle()
|
258
|
+
.verifyInnerText('Causes of Pollution');
|
259
|
+
});
|
260
|
+
});
|
261
|
+
});
|