itemengine-cypress-automation 1.0.18 → 1.0.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +555 -0
  2. package/cypress/e2e/ILC/EssayResponse/essayResponseCreateCustomCategory.js +932 -0
  3. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.js +333 -0
  4. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions2.js +332 -0
  5. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions3.js +522 -0
  6. package/cypress/e2e/ILC/EssayResponse/essayResponseEditCategoryFlyout.js +402 -0
  7. package/cypress/e2e/ILC/EssayResponse/essayResponseEditTabBasicSections.js +558 -0
  8. package/cypress/e2e/ILC/EssayResponse/essayResponseEquationEditor.js +1346 -0
  9. package/cypress/e2e/ILC/EssayResponse/essayResponseHeaderSection.js +80 -0
  10. package/cypress/e2e/ILC/EssayResponse/essayResponseMathCharacters.js +38 -0
  11. package/cypress/e2e/ILC/EssayResponse/essayResponseMathCreateItem.js +243 -0
  12. package/cypress/e2e/ILC/EssayResponse/essayResponsePreviewAddTable.js +412 -0
  13. package/cypress/e2e/ILC/EssayResponse/essayResponsePreviewEditTable.js +659 -0
  14. package/cypress/e2e/ILC/EssayResponse/essayResponsePreviewHyperlink.js +318 -0
  15. package/cypress/e2e/ILC/EssayResponse/essayResponseScoringSection.js +59 -0
  16. package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +33 -0
  17. package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridAdditionalSettingsBasic.js +255 -0
  18. package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridAllOrNothingWithAlternateAnswer.js +731 -0
  19. package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridAutoScoredScoring.js +0 -719
  20. package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridOptionsAdditionalSettings.js +351 -0
  21. package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialDifferentWeights.js +0 -930
  22. package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialDifferentWeightsWithAlternateAnswer.js +942 -0
  23. package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialEqualWeights.js +0 -852
  24. package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridPartialEqualWeightsWithAlternateAnswer.js +864 -0
  25. package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridQuestionStemAdditionalSettings.js +261 -0
  26. package/package.json +1 -1
  27. package/cypress/e2e/ILC/MultipleSelectionGrid/multipleSelectionGridAdditionalSettings.js +0 -830
@@ -0,0 +1,351 @@
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 gridStyleDropdownOptions = ['With border', 'Row dividers', 'No border', 'Inline', 'Inline - row dividers'];
9
+ const questionStemNumerationOptions = ['None', 'Numerical', 'Uppercase alphabet', 'Lowercase alphabet'];
10
+ const fontSizeDropdownOptions = ['Default', 'Small', 'Normal', 'Large', 'Extra large', 'Huge'];
11
+ const numbers = ['1', '2', '3', '4'];
12
+ const lowercase = ['a', 'b', 'c', 'd'];
13
+ const uppercase = ['A', 'B', 'C', 'D'];
14
+ const fontSizes = ['16px', '12px', '14px', '17px', '20px', '24px'];
15
+
16
+ describe('Create Item page - Multiple Selection Grid: Additional settings', () => {
17
+ before(() => {
18
+ cy.loginAs('admin');
19
+ });
20
+
21
+ describe('Additional settings: Grid style contents', () => {
22
+ abortEarlySetup();
23
+ before(() => {
24
+ cy.log('Navigating to multiple selection grid question type');
25
+ multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
26
+ multipleSelectionGridPage.steps.expandAdditonalSettings();
27
+ });
28
+
29
+ it(`\'Grid style\' label and dropdown should be displayed and by default, ${gridStyleDropdownOptions[1]} option should be selected in the dropdown`, () => {
30
+ multipleSelectionGridPage.gridStyleLabel()
31
+ .verifyInnerText('Grid style')
32
+ .should('be.visible');
33
+ multipleSelectionGridPage.gridStyleDropdown()
34
+ .verifyInnerText(`${gridStyleDropdownOptions[1]}`)
35
+ .should('be.visible');
36
+ });
37
+
38
+ it('CSS of Grid style section', { tags: 'css' }, () => {
39
+ multipleSelectionGridPage.gridStyleLabel()
40
+ .verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
41
+ multipleSelectionGridPage.gridStyleDropdown()
42
+ .verifyCSS(css.color.liText, css.fontSize.default, css.fontWeight.regular);
43
+ });
44
+
45
+ it(`When user clicks on the Grid style dropdown a list of 5 options - ${gridStyleDropdownOptions} should be displayed`, () => {
46
+ multipleSelectionGridPage.steps.expandGridStyleDropdown();
47
+ multipleSelectionGridPage.steps.verifyGridStyleDropdownOptions(gridStyleDropdownOptions);
48
+ });
49
+
50
+ it('CSS of Grid style dropdown in active state', { tags: 'css' }, () => {
51
+ multipleSelectionGridPage.gridStyleDropdownOptions()
52
+ .eq(1)
53
+ .verifyCSS(css.color.liText, css.fontSize.default, css.fontWeight.regular)
54
+ .should('have.css', 'background-color', css.color.liTextSelectedBg);
55
+ multipleSelectionGridPage.gridStyleDropdownOptions()
56
+ .eq(0)
57
+ .should('have.css', 'background-color', css.color.transparent);
58
+ cy.log('Selecting a dropdown option to close the dropdown')
59
+ multipleSelectionGridPage.gridStyleDropdownOptions()
60
+ .eq(1)
61
+ .click();
62
+ });
63
+
64
+ it('Accessibility of Grid style dropdown in active state', { tags: 'a11y' }, () => {
65
+ multipleSelectionGridPage.steps.expandGridStyleDropdown();
66
+ cy.checkAccessibility(multipleSelectionGridPage.dropdownList());
67
+ });
68
+ });
69
+
70
+ //Note: This needs to be checked manually during full execution, added this to the Manual sheet
71
+ describe.skip('Additional settings: Grid style set correct answer section', () => {
72
+ abortEarlySetup();
73
+ before(() => {
74
+ cy.log('Navigating to multiple selection grid question type');
75
+ multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
76
+ multipleSelectionGridPage.steps.addQuestionInstructions();
77
+ multipleSelectionGridPage.steps.addInputToAllQuestionStemFields(questionStems);
78
+ multipleSelectionGridPage.steps.addInputToAllOptionsFields(options);
79
+ multipleSelectionGridPage.steps.allotPoints(10);
80
+ multipleSelectionGridPage.steps.expandAdditonalSettings();
81
+ });
82
+
83
+ it(`By default when ${gridStyleDropdownOptions[1]} option is selected then row dividers should be displayed in the set correct answer table`, () => {
84
+
85
+ });
86
+
87
+ it(`When user selects ${gridStyleDropdownOptions[0]} option then only table borders should be displayed in the set correct answer table`, () => {
88
+
89
+ });
90
+
91
+ it(`When user selects ${gridStyleDropdownOptions[2]} option then table borders should not be displayed in the set correct answer table`, () => {
92
+
93
+ });
94
+
95
+ it(`When user selects ${gridStyleDropdownOptions[3]} option then the options should not be displayed in the table header and should be displayed inline with the question stems without row dividers in the set correct answer table`, () => {
96
+
97
+ });
98
+
99
+
100
+ it(`When user selects ${gridStyleDropdownOptions[4]} option then the options should not be displayed in the table header and should be displayed inline with the question stems with row dividers in the set correct answer table`, () => {
101
+
102
+ });
103
+ });
104
+
105
+ describe.skip('Additional settings: Grid style preview tab section', () => {
106
+ abortEarlySetup();
107
+ before(() => {
108
+ cy.log('Navigating to multiple selection grid question type');
109
+ multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
110
+ multipleSelectionGridPage.steps.addQuestionInstructions();
111
+ multipleSelectionGridPage.steps.addInputToAllQuestionStemFields(questionStems);
112
+ multipleSelectionGridPage.steps.addInputToAllOptionsFields(options);
113
+ multipleSelectionGridPage.steps.allotPoints(10);
114
+ multipleSelectionGridPage.steps.expandAdditonalSettings();
115
+ });
116
+
117
+ it(`By default when ${gridStyleDropdownOptions[1]} option is selected then row dividers should be displayed in the preview tab answer table`, () => {
118
+
119
+ });
120
+
121
+ it(`When user selects ${gridStyleDropdownOptions[0]} option then only table borders should be displayed in the preview tab answer table`, () => {
122
+
123
+ });
124
+
125
+ it(`When user selects ${gridStyleDropdownOptions[2]} option then table borders should not be displayed in the preview tab answer table`, () => {
126
+
127
+ });
128
+
129
+ it(`When user selects ${gridStyleDropdownOptions[3]} option then the options should not be displayed in the table header and should be displayed inline with the question stems without row dividers in the preview tab answer table`, () => {
130
+
131
+ });
132
+
133
+
134
+ it(`When user selects ${gridStyleDropdownOptions[4]} option then the options should not be displayed in the table header and should be displayed inline with the question stems with row dividers in the preview tab answer table`, () => {
135
+
136
+ });
137
+ });
138
+
139
+ describe('Additional settings: Title for options contents', () => {
140
+ abortEarlySetup();
141
+ before(() => {
142
+ cy.log('Navigating to multiple selection grid question type');
143
+ multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
144
+ multipleSelectionGridPage.steps.expandAdditonalSettings();
145
+ });
146
+
147
+ it('\'Title for options\' label and input field should be displayed and by default, the input field should be empty', () => {
148
+ multipleSelectionGridPage.titleForOptionsLabel()
149
+ .verifyInnerText('Title for options')
150
+ .should('be.visible');
151
+ multipleSelectionGridPage.titleForOptionsInputField()
152
+ .should('have.text', '');
153
+ });
154
+
155
+ it('CSS of Title for options label and input field', { tags: 'css' }, () => {
156
+ multipleSelectionGridPage.titleForOptionsLabel()
157
+ .verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
158
+ multipleSelectionGridPage.titleForOptionsInputField()
159
+ .verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular);
160
+ });
161
+
162
+ //Note: a11y covered in verifyAdditonalSettingsAccordionProperties
163
+ });
164
+
165
+ describe('Additional settings: Title for options set correct answer section', () => {
166
+ abortEarlySetup();
167
+ before(() => {
168
+ cy.log('Navigating to multiple selection grid question type');
169
+ multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
170
+ multipleSelectionGridPage.steps.addQuestionInstructions();
171
+ multipleSelectionGridPage.steps.addOption();
172
+ multipleSelectionGridPage.steps.addInputToAllQuestionStemFields(questionStems);
173
+ multipleSelectionGridPage.steps.addInputToAllOptionsFields(options);
174
+ multipleSelectionGridPage.steps.allotPoints(10);
175
+ multipleSelectionGridPage.steps.expandAdditonalSettings();
176
+ });
177
+
178
+ it('By default, only options should be displayed in the header of the set correct answer table', () => {
179
+ multipleSelectionGridPage.steps.verifyTableHeaderContentsInSetCorrectAnswerTable(options)
180
+ multipleSelectionGridPage.setCorrectAnswerTableOptionsTitle()
181
+ .should('not.exist');
182
+ });
183
+
184
+ it('When user enters any text in the Title for options then that title should be displayed along with the options in the header section of the set correct answer table', () => {
185
+ multipleSelectionGridPage.steps.addInputToTitleForOptionsInputField('Choose the correct option')
186
+ multipleSelectionGridPage.setCorrectAnswerTableOptionsTitle()
187
+ .verifyInnerText('Choose the correct option');
188
+ multipleSelectionGridPage.steps.verifyTableHeaderContentsInSetCorrectAnswerTable(options)
189
+ });
190
+ });
191
+
192
+ describe('Additional settings: Title for options preview tab section', () => {
193
+ abortEarlySetup();
194
+ before(() => {
195
+ cy.log('Navigating to multiple selection grid question type');
196
+ multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
197
+ multipleSelectionGridPage.steps.addQuestionInstructions();
198
+ multipleSelectionGridPage.steps.addOption();
199
+ multipleSelectionGridPage.steps.addInputToAllQuestionStemFields(questionStems);
200
+ multipleSelectionGridPage.steps.addInputToAllOptionsFields(options);
201
+ multipleSelectionGridPage.steps.allotPoints(10);
202
+ multipleSelectionGridPage.steps.expandAdditonalSettings();
203
+ multipleSelectionGridPage.steps.switchToPreviewTab()
204
+ });
205
+
206
+ it('By default, only options should be displayed in the header of the preview tab answer table', () => {
207
+ multipleSelectionGridPage.steps.verifyTableHeaderContentsInPreviewTabAnswerTable(options)
208
+ multipleSelectionGridPage.previewTabAnswerTableOptionsTitle()
209
+ .should('not.exist');
210
+ });
211
+
212
+ it('When user enters any text in the Title for options then that title should be displayed along with the options in the header section of the preview tab answer table', () => {
213
+ multipleSelectionGridPage.steps.switchToEditTab();
214
+ multipleSelectionGridPage.steps.addInputToTitleForOptionsInputField('Choose the correct option');
215
+ multipleSelectionGridPage.steps.switchToPreviewTab();
216
+ multipleSelectionGridPage.previewTabAnswerTableOptionsTitle()
217
+ .verifyInnerText('Choose the correct option');
218
+ multipleSelectionGridPage.steps.verifyTableHeaderContentsInPreviewTabAnswerTable(options);
219
+ });
220
+ });
221
+
222
+ describe('Additional settings: Question stem width and Option width contents', () => {
223
+ abortEarlySetup();
224
+ before(() => {
225
+ cy.log('Navigating to multiple selection grid question type');
226
+ multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
227
+ multipleSelectionGridPage.steps.expandAdditonalSettings();
228
+ });
229
+
230
+ it('\'Question stem width\' and \'Option width\' labels and input fields should be displayed and by default, the input fields should be empty', () => {
231
+ multipleSelectionGridPage.questionStemWidthLabel()
232
+ .verifyInnerText('Question stem width')
233
+ .should('be.visible');
234
+ multipleSelectionGridPage.questionStemWidthInputField()
235
+ .should('have.text', '');
236
+ multipleSelectionGridPage.optionsWidthLabel()
237
+ .verifyInnerText('Option width')
238
+ .should('be.visible');
239
+ multipleSelectionGridPage.optionWidthInputField()
240
+ .should('have.text', '');
241
+ });
242
+
243
+ it('CSS of \'Question stem width\' and \'Option width\' section', { tags: 'css' }, () => {
244
+ multipleSelectionGridPage.questionStemWidthLabel()
245
+ .verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
246
+ multipleSelectionGridPage.questionStemWidthInputField()
247
+ .verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular);
248
+ multipleSelectionGridPage.optionsWidthLabel()
249
+ .verifyCSS(css.color.labels, css.fontSize.normal, css.fontWeight.semibold);
250
+ multipleSelectionGridPage.optionWidthInputField()
251
+ .verifyCSS(css.color.text, css.fontSize.default, css.fontWeight.regular);
252
+ });
253
+ });
254
+
255
+ describe('Additional settings: Question stem width and Option width set correct section', () => {
256
+ abortEarlySetup();
257
+ before(() => {
258
+ cy.log('Navigating to multiple selection grid question type');
259
+ multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
260
+ multipleSelectionGridPage.steps.addQuestionInstructions();
261
+ multipleSelectionGridPage.steps.addOption()
262
+ multipleSelectionGridPage.steps.addInputToAllQuestionStemFields(questionStems);
263
+ multipleSelectionGridPage.steps.addInputToAllOptionsFields(options);
264
+ multipleSelectionGridPage.steps.allotPoints(10);
265
+ multipleSelectionGridPage.steps.expandAdditonalSettings();
266
+ });
267
+
268
+ it('When the input field of \'Question stem width\' kept empty, the question stem should have min and max width 140px and 380px respectively in set correct answer table', () => {
269
+ multipleSelectionGridPage.questionStemWidthInputField()
270
+ .should('have.text', '');
271
+ multipleSelectionGridPage.steps.verifyQuestionStemWidthInSetCorrectAnswerTable('140', '380');
272
+ });
273
+
274
+ it('When user enters value for \'Question stem width\', the width should get updated accordingly in set correct answer table', () => {
275
+ multipleSelectionGridPage.steps.addInputToQuestionStemWidthInputField('200');
276
+ multipleSelectionGridPage.steps.verifyQuestionStemWidthInSetCorrectAnswerTable('200', '200');
277
+ });
278
+
279
+ it('When the user enters a value above 500px in the \'Option width\' input field then the width of the input field should remain 500px in \'Set correct answer\' section', () => {
280
+ multipleSelectionGridPage.steps.addInputToQuestionStemWidthInputField('700');
281
+ multipleSelectionGridPage.steps.verifyQuestionStemWidthInSetCorrectAnswerTable('500', '500');
282
+ });
283
+
284
+ it('When the input field of \'Option width\' kept empty, the question stem should have width 128px in set correct answer table', () => {
285
+ multipleSelectionGridPage.optionWidthInputField()
286
+ .should('have.text', '');
287
+ multipleSelectionGridPage.steps.verifyTableHeaderWidthInSetCorrectAnswerTable('128');
288
+ });
289
+
290
+ it('When user enters value for \'Option width\', the width should get updated accordingly in set correct answer table', () => {
291
+ multipleSelectionGridPage.steps.addInputToOptionsWidthInputField('250');
292
+ multipleSelectionGridPage.steps.verifyTableHeaderWidthInSetCorrectAnswerTable('250')
293
+ });
294
+
295
+ it('When the user enters a value above 500px in the \'Option width\' input field then the width of the input field should remain 500px in \'Set correct answer\' section', () => {
296
+ multipleSelectionGridPage.steps.addInputToOptionsWidthInputField('950');
297
+ multipleSelectionGridPage.steps.verifyTableHeaderWidthInSetCorrectAnswerTable('500')
298
+ });
299
+ });
300
+
301
+ describe('Additional settings: Question stem width and Option width set correct section', () => {
302
+ abortEarlySetup();
303
+ before(() => {
304
+ cy.log('Navigating to multiple selection grid question type');
305
+ multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
306
+ multipleSelectionGridPage.steps.addQuestionInstructions();
307
+ multipleSelectionGridPage.steps.addOption()
308
+ multipleSelectionGridPage.steps.addInputToAllQuestionStemFields(questionStems);
309
+ multipleSelectionGridPage.steps.addInputToAllOptionsFields(options);
310
+ multipleSelectionGridPage.steps.allotPoints(10);
311
+ multipleSelectionGridPage.steps.expandAdditonalSettings();
312
+ multipleSelectionGridPage.steps.switchToPreviewTab();
313
+ });
314
+
315
+ it('When the input field of \'Question stem width\' kept empty, the question stem should have min and max width 140px and 380px respectively in preview tab answer table', () => {
316
+ multipleSelectionGridPage.steps.verifyQuestionStemWidthInPreviewTabAnswerTable('140', '380');
317
+ });
318
+
319
+ it('When user enters value for \'Question stem width\', the width should get updated accordingly in preview tab answer table', () => {
320
+ multipleSelectionGridPage.steps.switchToEditTab();
321
+ multipleSelectionGridPage.steps.addInputToQuestionStemWidthInputField('200');
322
+ multipleSelectionGridPage.steps.switchToPreviewTab();
323
+ multipleSelectionGridPage.steps.verifyQuestionStemWidthInPreviewTabAnswerTable('200', '200');
324
+ });
325
+
326
+ it('When the user enters a value above 500px in the \'Option width\' input field then the width of the input field should remain 500px in \'Set correct answer\' section', () => {
327
+ multipleSelectionGridPage.steps.switchToEditTab();
328
+ multipleSelectionGridPage.steps.addInputToQuestionStemWidthInputField('700');
329
+ multipleSelectionGridPage.steps.switchToPreviewTab();
330
+ multipleSelectionGridPage.steps.verifyQuestionStemWidthInPreviewTabAnswerTable('500', '500');
331
+ });
332
+
333
+ it('When the input field of \'Option width\' kept empty, the question stem should have width 128px in preview tab answer table', () => {
334
+ multipleSelectionGridPage.steps.verifyTableHeaderWidthInPreviewTabAnswerTable('128')
335
+ });
336
+
337
+ it('When user enters value for \'Option width\', the width should get updated accordingly in preview tab answer table', () => {
338
+ multipleSelectionGridPage.steps.switchToEditTab();
339
+ multipleSelectionGridPage.steps.addInputToOptionsWidthInputField('250');
340
+ multipleSelectionGridPage.steps.switchToPreviewTab();
341
+ multipleSelectionGridPage.steps.verifyTableHeaderWidthInPreviewTabAnswerTable('250')
342
+ });
343
+
344
+ it('When the user enters a value above 500px in the \'Option width\' input field then the width of the input field should remain 500px in \'Set correct answer\' section', () => {
345
+ multipleSelectionGridPage.steps.switchToEditTab();
346
+ multipleSelectionGridPage.steps.addInputToOptionsWidthInputField('950');
347
+ multipleSelectionGridPage.steps.switchToPreviewTab();
348
+ multipleSelectionGridPage.steps.verifyTableHeaderWidthInPreviewTabAnswerTable('500')
349
+ });
350
+ });
351
+ });