itemengine-cypress-automation 1.0.573-IEI-7080-f70315e.0 → 1.0.574-IEI-7080-e6d1871.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +181 -0
  2. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsBasic.js +37 -2
  3. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsForAnswerInputFields.js +72 -4
  4. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +19 -1
  5. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +56 -1
  6. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +57 -3
  7. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +15 -18
  8. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +54 -1
  9. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/styleAndLayoutCustomization.js +12 -0
  10. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/styleAndLayoutCustomizationAllViews.js +156 -0
  11. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/supportedFileTypes.js +0 -2
  12. package/cypress/e2e/ILC/ImageHighlight/additionalSettings.js +86 -0
  13. package/cypress/e2e/ILC/ImageHighlight/backgroundImageAndCanvasProperties.js +60 -9
  14. package/cypress/e2e/ILC/ImageHighlight/customiseHighlightStyle.js +14 -12
  15. package/cypress/e2e/ILC/ImageHighlight/imageHighlightStyle.js +12 -3
  16. package/cypress/e2e/ILC/ImageHighlight/minimumScoringPenaltyPointsAndRoundingDropdown.js +65 -2
  17. package/cypress/e2e/ILC/ImageHighlight/studentViewSettings.js +15 -1
  18. package/cypress/e2e/ILC/MultipleSelection/allOrNothingBasicForAllViews.smoke.js +1 -168
  19. package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +284 -17
  20. package/cypress/e2e/ILC/MultipleSelection/partialDifferentWeightsWithAlternativeAnswer.js +397 -25
  21. package/cypress/e2e/ILC/MultipleSelection/partialEqualWeightsWithAlternativeAnswer.js +320 -20
  22. package/cypress/e2e/ILC/SingleSelection/allOrNothingBasicForAllViews.smoke.js +0 -130
  23. package/cypress/e2e/ILC/SingleSelection/allOrNothingWithAlternativeAnswer.js +97 -10
  24. package/cypress/e2e/ILC/dataApi/saveItems.js +1 -1
  25. package/cypress/e2e/ILC/dataApi/saveQuestions.js +7 -7
  26. package/cypress/e2e/ILC/dataApi/saveQuestionsMCQAlternateAnswers.js +6 -6
  27. package/cypress/pages/components/additionalSettingsPanel.js +9 -0
  28. package/cypress/pages/components/backgroundImageUploadComponent.js +1 -1
  29. package/cypress/pages/components/colorPopupComponent.js +1 -1
  30. package/cypress/pages/components/figCommonStyleAndLayoutComponent.js +4 -10
  31. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +15 -2
  32. package/cypress/pages/components/gradingViewEnumerationComponent.js +5 -0
  33. package/cypress/pages/components/imageCanvasComponent.js +0 -3
  34. package/cypress/pages/components/placeholderTextSectionComponent.js +10 -0
  35. package/cypress/pages/components/showAlternativeAnswersComponent.js +41 -65
  36. package/cypress/pages/fillInTheGapsOverImageTextPage.js +21 -1
  37. package/cypress/pages/imageHighlightPage.js +184 -7
  38. package/cypress/pages/itemPreviewPage.js +1 -0
  39. package/cypress/pages/multipleSelectionPage.js +32 -0
  40. package/cypress/pages/singleSelectionPage.js +17 -0
  41. package/cypress/support/helpers/utilities.js +16 -0
  42. package/package.json +1 -1
  43. package/scripts/sorry-cypress.mjs +47 -53
  44. package/service.yaml +2 -2
@@ -3,7 +3,6 @@ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
3
  import { dialogBoxBase, gradingViewPage, itemPreviewPage, studentViewPage } from "../../../pages";
4
4
  import utilities from "../../../support/helpers/utilities";
5
5
  const grepTags = Cypress.env('grepTags');
6
- const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT');
7
6
  let correctAnswerViews = ['Question preview', 'Item preview', 'Grading view'];
8
7
  const views = utilities.getViews(correctAnswerViews);
9
8
  var itemReferenceID = "";
@@ -169,135 +168,6 @@ describe('Create Item page - Single Selection: Scoring cases', () => {
169
168
  });
170
169
  });
171
170
 
172
- views.forEach((view) => {
173
- describe(`Single selection: all or nothing with alternative answer - ${view}`, { tags: 'smoke' }, () => {
174
- abortEarlySetup();
175
- before(() => {
176
- switch (view) {
177
- case 'Question preview':
178
- singleSelectionPage.steps.navigateToCreateQuestion('single selection');
179
- cy.barsPreLoaderWait();
180
- singleSelectionPage.steps.addTextInQuestionInstructionsInputField('Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
181
- singleSelectionPage.steps.allotPoints(20);
182
- singleSelectionPage.steps.addInputToOptionsInputField(options);
183
- singleSelectionPage.steps.checkOptionInSpecifyCorrectAnswerSection(1);
184
- singleSelectionPage.steps.clickOnAddAlternativeAnswerButton();
185
- singleSelectionPage.steps.allotPoints(10);
186
- singleSelectionPage.steps.checkOptionInSpecifyCorrectAnswerSection(0);
187
- singleSelectionPage.steps.switchToPreviewTab();
188
- break;
189
- case 'Item preview':
190
- cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
191
- itemPreviewPage.steps.switchToPreviewTab();
192
- break;
193
- case 'Grading view':
194
- cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
195
- break;
196
- }
197
- });
198
-
199
- beforeEach(() => {
200
- switch (view) {
201
- case 'Question preview':
202
- singleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
203
- singleSelectionPage.steps.verifyCorrectIncorrectBorderNotExists();
204
- singleSelectionPage.steps.resetQuestionPreview();
205
- break;
206
- case 'Item preview':
207
- itemPreviewPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
208
- singleSelectionPage.steps.verifyCorrectIncorrectBorderNotExists();
209
- itemPreviewPage.steps.resetQuestionPreview();
210
- break;
211
- case 'Grading view':
212
- cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
213
- break;
214
- }
215
- });
216
-
217
- if (view === 'Question preview') {
218
- after(() => {
219
- singleSelectionPage.steps.clickOnSaveQuestionButton();
220
- utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
221
- itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
222
- });
223
- };
224
-
225
- it('When the user selects \'Grading\' view without attempting the question, no icons should be displayed besides responses, correct answer label and border should not be displayed and correct answer should be displayed in correct answer section', () => {
226
- if (view === 'Grading view') {
227
- studentViewPage.steps.submitResponse();
228
- utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
229
- studentViewPage.steps.clickOnGoToGradingViewButton();
230
- gradingViewPage.steps.verifyGradingViewScore(0, 20);
231
- }
232
- if (view === 'Question preview' || view === 'Item preview') {
233
- singleSelectionPage.steps.switchToGradingView();
234
- singleSelectionPage.steps.verifyPreviewScore(0, 20);
235
- }
236
- singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(0);
237
- singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(1);
238
- singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(2);
239
- singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(3);
240
- singleSelectionPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
241
- singleSelectionPage.steps.verifyCorrectIncorrectBorderNotExists();
242
- //correct answer section
243
- singleSelectionPage.steps.verifyCorrectOptionIconCorrectAnswerSection(1);
244
- if (alternativeAnswerCheck === 'true') {
245
- singleSelectionPage.steps.verifyShowAlternativeAnswersToggleFunctionality(1, 10);
246
- }
247
- });
248
-
249
- it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides incorrect responses, no icons should be displayed besides unattempted responses, incorrect answer border and label should not be displayed below the question preview and correct answer should be displayed in correct answer section', () => {
250
- singleSelectionPage.steps.checkOptionInPreviewTab(2);
251
- if (view === 'Grading view') {
252
- studentViewPage.steps.submitResponse();
253
- utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
254
- studentViewPage.steps.clickOnGoToGradingViewButton();
255
- gradingViewPage.steps.verifyGradingViewScore(0, 20);
256
- }
257
- if (view === 'Question preview' || view === 'Item preview') {
258
- singleSelectionPage.steps.switchToGradingView();
259
- singleSelectionPage.steps.verifyPreviewScore(0, 20);
260
- }
261
- singleSelectionPage.steps.verifyIncorrectOptionIconStudentView(2);
262
- singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(0);
263
- singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(1);
264
- singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(3);
265
- singleSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
266
- singleSelectionPage.steps.verifyCorrectIncorrectBorderNotExists();
267
- //correct answer section
268
- singleSelectionPage.steps.verifyCorrectOptionIconCorrectAnswerSection(1);
269
- if (alternativeAnswerCheck === 'true') {
270
- singleSelectionPage.steps.verifyShowAlternativeAnswersToggleFunctionality(1, 10);
271
- }
272
- });
273
-
274
- it(`Single selection ${view} - When user attempts the question correctly, the user should be awarded full points and on switching to 'Grading' view, then correct icons should be displayed beside all the correct responses, correct answer border and a label should not be displayed below the question preview and correct answer section should not be displayed`, () => {
275
- singleSelectionPage.steps.checkOptionInPreviewTab(1);
276
- if (view === 'Grading view') {
277
- studentViewPage.steps.submitResponse();
278
- utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
279
- studentViewPage.steps.clickOnGoToGradingViewButton();
280
- gradingViewPage.steps.verifyGradingViewScore(20, 20);
281
- }
282
- if (view === 'Question preview' || view === 'Item preview') {
283
- singleSelectionPage.steps.verifyPreviewScore(20, 20);
284
- singleSelectionPage.steps.switchToGradingView();
285
- }
286
- singleSelectionPage.steps.verifyCorrectOptionIconStudentView(1);
287
- singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(0);
288
- singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(2);
289
- singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(3);
290
- singleSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
291
- singleSelectionPage.steps.verifyCorrectIncorrectBorderNotExists();
292
- singleSelectionPage.steps.verifyCorrectAnswerSectionNotExist();
293
- if (alternativeAnswerCheck === 'true') {
294
- singleSelectionPage.steps.verifyShowAlternativeAnswersToggleNotExists();
295
- }
296
- cy.eyesCheckWindow(`Single selection ${view} - Correct attempt`);
297
- });
298
- });
299
- });
300
-
301
171
  views.forEach((view) => {
302
172
  describe(`Single selection - Manually scored: ${view}`, { tags: 'smoke' }, () => {
303
173
  abortEarlySetup();
@@ -36,6 +36,20 @@ describe('Create item page - Single selection: All or nothing with alternative a
36
36
  singleSelectionPage.steps.verifyCorrectIncorrectBorderNotExists();
37
37
  //correct answer section
38
38
  singleSelectionPage.steps.verifyCorrectOptionIconCorrectAnswerSection(1);
39
+ //show alternative answers
40
+ if (alternativeAnswerCheck === 'true') {
41
+ singleSelectionPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
42
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleExists();
43
+ singleSelectionPage.steps.disableShowAlternativeAnswersToggle();
44
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
45
+ singleSelectionPage.steps.verifyAlternativeAnswersSectionNotExist();
46
+ singleSelectionPage.steps.clickShowAlternativeAnswersToggle();
47
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleChecked();
48
+ singleSelectionPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
49
+ singleSelectionPage.steps.verifyAlternateAnswerOptionIconCorrectAnswerSection(2);
50
+ singleSelectionPage.steps.clickShowAlternativeAnswersToggle();
51
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
52
+ }
39
53
  singleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
40
54
  });
41
55
 
@@ -78,6 +92,9 @@ describe('Create item page - Single selection: All or nothing with alternative a
78
92
  singleSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
79
93
  singleSelectionPage.steps.verifyCorrectIncorrectBorderNotExists();
80
94
  singleSelectionPage.steps.verifyCorrectAnswerSectionNotExist();
95
+ if (alternativeAnswerCheck === 'true') {
96
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleNotExists();
97
+ }
81
98
  singleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
82
99
  /*cy.log('When the user has attempted the question with responses from the alternative accordion and clicks on \'Check answer\' button, then correct icons should only be displayed besides correct responses from the alternative accordion, correct answer border and a label should not be displayed below the question preview')
83
100
  singleSelectionPage.steps.checkAnswer();
@@ -100,12 +117,22 @@ describe('Create item page - Single selection: All or nothing with alternative a
100
117
  singleSelectionPage.steps.verifyIncorrectOptionIconStudentView(3);
101
118
  singleSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
102
119
  singleSelectionPage.steps.verifyCorrectIncorrectBorderNotExists();
120
+ //correct answer section
121
+ singleSelectionPage.steps.verifyCorrectOptionIconCorrectAnswerSection(1);
103
122
  //show alternative answers
104
123
  if (alternativeAnswerCheck === 'true') {
105
- singleSelectionPage.steps.verifyShowAlternativeAnswersToggleFunctionality(1, 10);
124
+ singleSelectionPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
125
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleExists();
126
+ singleSelectionPage.steps.disableShowAlternativeAnswersToggle();
127
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
128
+ singleSelectionPage.steps.verifyAlternativeAnswersSectionNotExist();
129
+ singleSelectionPage.steps.clickShowAlternativeAnswersToggle();
130
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleChecked();
131
+ singleSelectionPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
132
+ singleSelectionPage.steps.verifyAlternateAnswerOptionIconCorrectAnswerSection(2);
133
+ singleSelectionPage.steps.clickShowAlternativeAnswersToggle();
134
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
106
135
  }
107
- //correct answer section
108
- singleSelectionPage.steps.verifyCorrectOptionIconCorrectAnswerSection(1);
109
136
  //singleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
110
137
  /*cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should only be displayed besides incorrect responses, correct icons should not be displayed besides unattempted correct options, incorrect answer border and a label should not be displayed below the question preview')
111
138
  singleSelectionPage.steps.checkAnswer();
@@ -164,6 +191,20 @@ describe('Create item page - Single selection: All or nothing with alternative a
164
191
  singleSelectionPage.steps.verifyCorrectIncorrectBorderNotExists();
165
192
  //correct answer section
166
193
  singleSelectionPage.steps.verifyCorrectOptionIconCorrectAnswerSection(2);
194
+ // alternative answer section
195
+ if (alternativeAnswerCheck === 'true') {
196
+ singleSelectionPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
197
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleExists();
198
+ singleSelectionPage.steps.disableShowAlternativeAnswersToggle();
199
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
200
+ singleSelectionPage.steps.verifyAlternativeAnswersSectionNotExist();
201
+ singleSelectionPage.steps.clickShowAlternativeAnswersToggle();
202
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleChecked();
203
+ singleSelectionPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
204
+ singleSelectionPage.steps.verifyAlternateAnswerOptionIconCorrectAnswerSection(1);
205
+ singleSelectionPage.steps.clickShowAlternativeAnswersToggle();
206
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
207
+ }
167
208
  singleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
168
209
  });
169
210
 
@@ -178,6 +219,9 @@ describe('Create item page - Single selection: All or nothing with alternative a
178
219
  singleSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
179
220
  singleSelectionPage.steps.verifyCorrectIncorrectBorderNotExists();
180
221
  singleSelectionPage.steps.verifyCorrectAnswerSectionNotExist();
222
+ if (alternativeAnswerCheck === 'true') {
223
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleNotExists();
224
+ }
181
225
  singleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
182
226
  /*cy.log('When the user has attempted the question with responses from the correct accordion and clicks on \'Check answer\' button, then correct icons should be displayed besides correct responses, correct answer border and a label should not be displayed below the question preview')
183
227
  singleSelectionPage.steps.checkAnswer();
@@ -201,6 +245,9 @@ describe('Create item page - Single selection: All or nothing with alternative a
201
245
  singleSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
202
246
  singleSelectionPage.steps.verifyCorrectIncorrectBorderNotExists();
203
247
  singleSelectionPage.steps.verifyCorrectAnswerSectionNotExist();
248
+ if (alternativeAnswerCheck === 'true') {
249
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleNotExists();
250
+ }
204
251
  singleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
205
252
  /*cy.log('When the user has attempted the question with responses from the alternative accordion and clicks on \'Check answer\' button, then correct icons should only be displayed besides correct responses from the alternative accordion, correct answer border and a label should not be displayed below the question preview')
206
253
  singleSelectionPage.steps.checkAnswer();
@@ -223,12 +270,22 @@ describe('Create item page - Single selection: All or nothing with alternative a
223
270
  singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(3);
224
271
  singleSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
225
272
  singleSelectionPage.steps.verifyCorrectIncorrectBorderNotExists();
226
- //show alternative answers
227
- if (alternativeAnswerCheck === 'true') {
228
- singleSelectionPage.steps.verifyShowAlternativeAnswersToggleFunctionality(1, 10);
229
- }
230
273
  //correct answer section
231
274
  singleSelectionPage.steps.verifyCorrectOptionIconCorrectAnswerSection(2);
275
+ // alternative answer section
276
+ if (alternativeAnswerCheck === 'true') {
277
+ singleSelectionPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
278
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleExists();
279
+ singleSelectionPage.steps.disableShowAlternativeAnswersToggle();
280
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
281
+ singleSelectionPage.steps.verifyAlternativeAnswersSectionNotExist();
282
+ singleSelectionPage.steps.clickShowAlternativeAnswersToggle();
283
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleChecked();
284
+ singleSelectionPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(10 points)');
285
+ singleSelectionPage.steps.verifyAlternateAnswerOptionIconCorrectAnswerSection(1);
286
+ singleSelectionPage.steps.clickShowAlternativeAnswersToggle();
287
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
288
+ }
232
289
  singleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
233
290
  /*cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides incorrect responses, correct icons should not be displayed besides unattempted correct options, incorrect answer border and a label should not be displayed below the question preview')
234
291
  singleSelectionPage.steps.checkAnswer();
@@ -267,6 +324,20 @@ describe('Create item page - Single selection: All or nothing with alternative a
267
324
  singleSelectionPage.steps.verifyCorrectIncorrectBorderNotExists();
268
325
  //correct answer section
269
326
  singleSelectionPage.steps.verifyCorrectOptionIconCorrectAnswerSection(1);
327
+ // alternative answer section
328
+ if (alternativeAnswerCheck === 'true') {
329
+ singleSelectionPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
330
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleExists();
331
+ singleSelectionPage.steps.disableShowAlternativeAnswersToggle();
332
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
333
+ singleSelectionPage.steps.verifyAlternativeAnswersSectionNotExist();
334
+ singleSelectionPage.steps.clickShowAlternativeAnswersToggle();
335
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleChecked();
336
+ singleSelectionPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(20 points)');
337
+ singleSelectionPage.steps.verifyAlternateAnswerOptionIconCorrectAnswerSection(2);
338
+ singleSelectionPage.steps.clickShowAlternativeAnswersToggle();
339
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
340
+ }
270
341
  singleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
271
342
  });
272
343
 
@@ -281,6 +352,9 @@ describe('Create item page - Single selection: All or nothing with alternative a
281
352
  singleSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
282
353
  singleSelectionPage.steps.verifyCorrectIncorrectBorderNotExists();
283
354
  singleSelectionPage.steps.verifyCorrectAnswerSectionNotExist();
355
+ if (alternativeAnswerCheck === 'true') {
356
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleNotExists();
357
+ }
284
358
  singleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
285
359
  /*cy.log('When the user has attempted the question with responses from the correct accordion and clicks on \'Check answer\' button, then correct icons should be displayed besides correct responses, correct answer border and a label should not be displayed below the question preview')
286
360
  singleSelectionPage.steps.checkAnswer();
@@ -304,6 +378,9 @@ describe('Create item page - Single selection: All or nothing with alternative a
304
378
  singleSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
305
379
  singleSelectionPage.steps.verifyCorrectIncorrectBorderNotExists();
306
380
  singleSelectionPage.steps.verifyCorrectAnswerSectionNotExist();
381
+ if (alternativeAnswerCheck === 'true') {
382
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleNotExists();
383
+ }
307
384
  singleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
308
385
  /*cy.log('When the user has attempted the question with responses from the alternative accordion and clicks on \'Check answer\' button, then correct icons should only be displayed besides correct responses from the alternative accordion, correct answer border and a label should not be displayed below the question preview')
309
386
  singleSelectionPage.steps.checkAnswer();
@@ -326,12 +403,22 @@ describe('Create item page - Single selection: All or nothing with alternative a
326
403
  singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(3);
327
404
  singleSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
328
405
  singleSelectionPage.steps.verifyCorrectIncorrectBorderNotExists();
406
+ //correct answer section
407
+ singleSelectionPage.steps.verifyCorrectOptionIconCorrectAnswerSection(1);
329
408
  //show alternative answers
330
409
  if (alternativeAnswerCheck === 'true') {
331
- singleSelectionPage.steps.verifyShowAlternativeAnswersToggleFunctionality(1, 20);
410
+ singleSelectionPage.steps.verifyCorrectAnswersLabelAndPointVisible('(20 points)');
411
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleExists();
412
+ singleSelectionPage.steps.disableShowAlternativeAnswersToggle();
413
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
414
+ singleSelectionPage.steps.verifyAlternativeAnswersSectionNotExist();
415
+ singleSelectionPage.steps.clickShowAlternativeAnswersToggle();
416
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleChecked();
417
+ singleSelectionPage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, '(20 points)');
418
+ singleSelectionPage.steps.verifyAlternateAnswerOptionIconCorrectAnswerSection(2);
419
+ singleSelectionPage.steps.clickShowAlternativeAnswersToggle();
420
+ singleSelectionPage.steps.verifyShowAlternativeAnswersToggleUnchecked();
332
421
  }
333
- //correct answer section
334
- singleSelectionPage.steps.verifyCorrectOptionIconCorrectAnswerSection(1);
335
422
  singleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
336
423
  /*cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should only be displayed besides incorrect responses, correct icons should not be displayed besides unattempted correct options, incorrect answer border and a label should not be displayed below the question preview')
337
424
  singleSelectionPage.steps.checkAnswer();
@@ -32,7 +32,7 @@ describe('Save Item Data API cases', () => {
32
32
  .click();
33
33
  cy.get('textarea[class="body-param__text"]')
34
34
  .clear()
35
- .fill(`{"questions":[{"reference":'${dataApiQuestionAndResourceIds[0]}',"instruction":"question instructions","points":20,"is_auto_scored":false,"type":"extendedText","question_xml":"<assessmentItem xmlns=\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\" xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\" xsi:schemaLocation=\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\" identifier=\\"extendedText\\" title=\\"This is title for Essay Response\\" timeDependent=\\"false\\"><responseDeclaration identifier=\\"RESPONSE\\" cardinality=\\"single\\" baseType=\\"string\\"/><outcomeDeclaration identifier=\\"SCORE\\" cardinality=\\"single\\" baseType=\\"float\\"/><itemBody><p class=\\"predefinedText\\" role=\\"presentation\\"/><extendedTextInteraction responseIdentifier=\\"RESPONSE\\" placeholderText=\\"Your Answer\\" expectedLength=\\"\\"><prompt>Please write a short essay in the response field displayed below</prompt></extendedTextInteraction></itemBody></assessmentItem>","scoring_type_id":2,"teacher_guideline":"guidelines for this questions if any","penalty_points":"0","min_score_if_attempted":"0","min_score_type":1,"penalty_point_type":1,"is_auto_penalty_setting":false,"is_negative_rounded":true,"specific_penalty_type":1,"penalty_points_for_each":"0"}]}'`);
35
+ .fill(`{"questions":[{"reference":'${dataApiQuestionAndResourceIds[0]}',"instruction":"question instructions","points":20,"is_auto_scored":false,"type":"essay response","question_xml":"<assessmentItem xmlns=\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\" xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\" xsi:schemaLocation=\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\" identifier=\\"extendedText\\" title=\\"This is title for Essay Response\\" timeDependent=\\"false\\"><responseDeclaration identifier=\\"RESPONSE\\" cardinality=\\"single\\" baseType=\\"string\\"/><outcomeDeclaration identifier=\\"SCORE\\" cardinality=\\"single\\" baseType=\\"float\\"/><itemBody><p class=\\"predefinedText\\" role=\\"presentation\\"/><extendedTextInteraction responseIdentifier=\\"RESPONSE\\" placeholderText=\\"Your Answer\\" expectedLength=\\"\\"><prompt>Please write a short essay in the response field displayed below</prompt></extendedTextInteraction></itemBody></assessmentItem>","scoring_type_id":2,"teacher_guideline":"guidelines for this questions if any","penalty_points":"0","min_score_if_attempted":"0","min_score_type":1,"penalty_point_type":1,"is_auto_penalty_setting":false,"is_negative_rounded":true,"specific_penalty_type":1,"penalty_points_for_each":"0"}]}'`);
36
36
  cy.get('.execute')
37
37
  .click();
38
38
  cy.wait(2000);
@@ -94,7 +94,7 @@ describe('Set Question Data API cases', () => {
94
94
  .click();
95
95
  cy.get('textarea[class="body-param__text"]')
96
96
  .clear()
97
- .fill(`{\n "questions": [\n {\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "choiceMultiple",\n "question_xml": "Random XML",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0"\n }\n ],\n "meta": {\n "user": {\n "id": "dfbb6366-d88d-416d-9d9c-7ee6420817b3",\n "first_name": "fname",\n "last_name": "lname",\n "email": "user@demo.com"\n }\n }\n}`);
97
+ .fill(`{\n "questions": [\n {\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "Random XML",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0"\n }\n ],\n "meta": {\n "user": {\n "id": "dfbb6366-d88d-416d-9d9c-7ee6420817b3",\n "first_name": "fname",\n "last_name": "lname",\n "email": "user@demo.com"\n }\n }\n}`);
98
98
  cy.get('.execute')
99
99
  .click();
100
100
  cy.wait(2000);
@@ -116,7 +116,7 @@ describe('Set Question Data API cases', () => {
116
116
  it('Entering request with incorrect question_XML', () => {
117
117
  cy.get('textarea[class="body-param__text"]')
118
118
  .clear()
119
- .fill(`{\n "questions": [\n {\n "reference": "uniq ques ref 002",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "choiceMultiple",\n "question_xml": "Random XML",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0"\n }\n ],\n "meta": {\n "user": {\n "id": "f8888c-f3fe-4642-440a-a32d47cd20be",\n "first_name": "fname",\n "last_name": "lname",\n "email": "user@demo.com"\n }\n }\n}`);
119
+ .fill(`{\n "questions": [\n {\n "reference": "uniq ques ref 002",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "Random XML",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0"\n }\n ],\n "meta": {\n "user": {\n "id": "f8888c-f3fe-4642-440a-a32d47cd20be",\n "first_name": "fname",\n "last_name": "lname",\n "email": "user@demo.com"\n }\n }\n}`);
120
120
  cy.get('.execute')
121
121
  .click();
122
122
  cy.wait(2000);
@@ -144,7 +144,7 @@ describe('Set Question Data API cases', () => {
144
144
  it('Entering request with empty question_XML', () => {
145
145
  cy.get('textarea[class="body-param__text"]')
146
146
  .clear()
147
- .fill(`{\n "questions": [\n {\n "reference": "${uuid()}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "choiceMultiple",\n "question_xml": "",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0"\n }\n ],\n "meta": {\n "user": {\n "id": "dfbb6366-d88d-416d-9d9c-7ee6420817b3",\n "first_name": "fname",\n "last_name": "lname",\n "email": "user@demo.com"\n }\n }\n}`);
147
+ .fill(`{\n "questions": [\n {\n "reference": "${uuid()}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0"\n }\n ],\n "meta": {\n "user": {\n "id": "dfbb6366-d88d-416d-9d9c-7ee6420817b3",\n "first_name": "fname",\n "last_name": "lname",\n "email": "user@demo.com"\n }\n }\n}`);
148
148
  cy.get('.execute')
149
149
  .click();
150
150
  cy.wait(2000);
@@ -166,7 +166,7 @@ describe('Set Question Data API cases', () => {
166
166
  it('Entering request with already existing question reference', () => {
167
167
  cy.get('textarea[class="body-param__text"]')
168
168
  .clear()
169
- .fill('{\n "questions": [\n {\n "reference": "uniq ques ref 001",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "choiceMultiple",\n "question_xml": "<assessmentItem \\r\\n xmlns=\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\"\\r\\n xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\"\\r\\n xsi:schemaLocation=\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\"\\r\\n identifier=\\"choiceMultiple\\" \\r\\n title=\\"Welcome to Biodome\\" \\r\\n timeDependent=\\"false\\"\\r\\n>\\r\\n <responseDeclaration identifier=\\"RESPONSE\\" cardinality=\\"multiple\\" baseType=\\"identifier\\">\\r\\n <correctResponse>\\r\\n <value>ChoiceA</value>\\r\\n <value>ChoiceE</value>\\r\\n </correctResponse>\\r\\n <mapping>\\r\\n <mapEntry mapKey=\\"ChoiceA\\" mappedValue=\\"1\\"/>\\r\\n <mapEntry mapKey=\\"ChoiceE\\" mappedValue=\\"3\\"/>\\r\\n </mapping>\\r\\n </responseDeclaration>\\r\\n <outcomeDeclaration identifier=\\"SCORE\\" cardinality=\\"single\\" baseType=\\"float\\"/>\\r\\n <itemBody>\\r\\n <choiceInteraction responseIdentifier=\\"RESPONSE\\">\\r\\n <prompt> \\r\\n Zebras having stripes is a trait that might help them to survive. \\r\\n Which of the statements below are possible advantages of stripes. \\r\\n Select all that apply\\r\\n </prompt>\\r\\n <simpleChoice identifier=\\"ChoiceA\\" >Stripes help to confuse predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceB\\" >Stripes help to attract predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceC\\" >Stripes help human hunters to see zebras more easily.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceD\\" >Stripes help zebras attract biting insects.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceE\\" >Stripes help zebras to find mates to reproduce with.</simpleChoice>\\r\\n </choiceInteraction>\\r\\n </itemBody>\\r\\n <responseProcessing template=\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\"/>\\r\\n</assessmentItem>\\r\\n",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0"\n }\n ]\n}\n');
169
+ .fill('{\n "questions": [\n {\n "reference": "uniq ques ref 001",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "<assessmentItem \\r\\n xmlns=\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\"\\r\\n xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\"\\r\\n xsi:schemaLocation=\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\"\\r\\n identifier=\\"choiceMultiple\\" \\r\\n title=\\"Welcome to Biodome\\" \\r\\n timeDependent=\\"false\\"\\r\\n>\\r\\n <responseDeclaration identifier=\\"RESPONSE\\" cardinality=\\"multiple\\" baseType=\\"identifier\\">\\r\\n <correctResponse>\\r\\n <value>ChoiceA</value>\\r\\n <value>ChoiceE</value>\\r\\n </correctResponse>\\r\\n <mapping>\\r\\n <mapEntry mapKey=\\"ChoiceA\\" mappedValue=\\"1\\"/>\\r\\n <mapEntry mapKey=\\"ChoiceE\\" mappedValue=\\"3\\"/>\\r\\n </mapping>\\r\\n </responseDeclaration>\\r\\n <outcomeDeclaration identifier=\\"SCORE\\" cardinality=\\"single\\" baseType=\\"float\\"/>\\r\\n <itemBody>\\r\\n <choiceInteraction responseIdentifier=\\"RESPONSE\\">\\r\\n <prompt> \\r\\n Zebras having stripes is a trait that might help them to survive. \\r\\n Which of the statements below are possible advantages of stripes. \\r\\n Select all that apply\\r\\n </prompt>\\r\\n <simpleChoice identifier=\\"ChoiceA\\" >Stripes help to confuse predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceB\\" >Stripes help to attract predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceC\\" >Stripes help human hunters to see zebras more easily.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceD\\" >Stripes help zebras attract biting insects.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceE\\" >Stripes help zebras to find mates to reproduce with.</simpleChoice>\\r\\n </choiceInteraction>\\r\\n </itemBody>\\r\\n <responseProcessing template=\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\"/>\\r\\n</assessmentItem>\\r\\n",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0"\n }\n ]\n}\n');
170
170
  cy.get('.execute')
171
171
  .click();
172
172
  cy.wait(2000);
@@ -189,7 +189,7 @@ describe('Set Question Data API cases', () => {
189
189
  unique_reference_id_2 = uuid();
190
190
  cy.get('textarea[class="body-param__text"]')
191
191
  .clear()
192
- .fill(`{\n "questions": [\n {\n "reference": "${unique_reference_id_1}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "choiceMultiple",\n "question_xml": "<assessmentItem \\r\\n xmlns=\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\"\\r\\n xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\"\\r\\n xsi:schemaLocation=\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\"\\r\\n identifier=\\"choiceMultiple\\" \\r\\n title=\\"Welcome to Biodome\\" \\r\\n timeDependent=\\"false\\"\\r\\n>\\r\\n <responseDeclaration identifier=\\"RESPONSE\\" cardinality=\\"multiple\\" baseType=\\"identifier\\">\\r\\n <correctResponse>\\r\\n <value>ChoiceA</value>\\r\\n <value>ChoiceE</value>\\r\\n </correctResponse>\\r\\n <mapping>\\r\\n <mapEntry mapKey=\\"ChoiceA\\" mappedValue=\\"1\\"/>\\r\\n <mapEntry mapKey=\\"ChoiceE\\" mappedValue=\\"3\\"/>\\r\\n </mapping>\\r\\n </responseDeclaration>\\r\\n <outcomeDeclaration identifier=\\"SCORE\\" cardinality=\\"single\\" baseType=\\"float\\"/>\\r\\n <itemBody>\\r\\n <choiceInteraction responseIdentifier=\\"RESPONSE\\">\\r\\n <prompt> \\r\\n Zebras having stripes is a trait that might help them to survive. \\r\\n Which of the statements below are possible advantages of stripes. \\r\\n Select all that apply\\r\\n </prompt>\\r\\n <simpleChoice identifier=\\"ChoiceA\\" >Stripes help to confuse predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceB\\" >Stripes help to attract predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceC\\" >Stripes help human hunters to see zebras more easily.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceD\\" >Stripes help zebras attract biting insects.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceE\\" >Stripes help zebras to find mates to reproduce with.</simpleChoice>\\r\\n </choiceInteraction>\\r\\n </itemBody>\\r\\n <responseProcessing template=\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\"/>\\r\\n</assessmentItem>\\r\\n",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0"\n },\n {\n "reference": "${unique_reference_id_2}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "choiceMultiple",\n "question_xml": "<assessmentItem \\r\\n xmlns=\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\"\\r\\n xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\"\\r\\n xsi:schemaLocation=\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\"\\r\\n identifier=\\"choiceMultiple\\" \\r\\n title=\\"Welcome to Biodome\\" \\r\\n timeDependent=\\"false\\"\\r\\n>\\r\\n <responseDeclaration identifier=\\"RESPONSE\\" cardinality=\\"multiple\\" baseType=\\"identifier\\">\\r\\n <correctResponse>\\r\\n <value>ChoiceA</value>\\r\\n <value>ChoiceE</value>\\r\\n </correctResponse>\\r\\n <mapping>\\r\\n <mapEntry mapKey=\\"ChoiceA\\" mappedValue=\\"1\\"/>\\r\\n <mapEntry mapKey=\\"ChoiceE\\" mappedValue=\\"3\\"/>\\r\\n </mapping>\\r\\n </responseDeclaration>\\r\\n <outcomeDeclaration identifier=\\"SCORE\\" cardinality=\\"single\\" baseType=\\"float\\"/>\\r\\n <itemBody>\\r\\n <choiceInteraction responseIdentifier=\\"RESPONSE\\">\\r\\n <prompt> \\r\\n Zebras having stripes is a trait that might help them to survive. \\r\\n Which of the statements below are possible advantages of stripes. \\r\\n Select all that apply\\r\\n </prompt>\\r\\n <simpleChoice identifier=\\"ChoiceA\\" >Stripes help to confuse predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceB\\" >Stripes help to attract predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceC\\" >Stripes help human hunters to see zebras more easily.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceD\\" >Stripes help zebras attract biting insects.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceE\\" >Stripes help zebras to find mates to reproduce with.</simpleChoice>\\r\\n </choiceInteraction>\\r\\n </itemBody>\\r\\n <responseProcessing template=\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\"/>\\r\\n</assessmentItem>\\r\\n",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0"\n }\n ]\n}\n`);
192
+ .fill(`{\n "questions": [\n {\n "reference": "${unique_reference_id_1}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "<assessmentItem \\r\\n xmlns=\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\"\\r\\n xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\"\\r\\n xsi:schemaLocation=\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\"\\r\\n identifier=\\"choiceMultiple\\" \\r\\n title=\\"Welcome to Biodome\\" \\r\\n timeDependent=\\"false\\"\\r\\n>\\r\\n <responseDeclaration identifier=\\"RESPONSE\\" cardinality=\\"multiple\\" baseType=\\"identifier\\">\\r\\n <correctResponse>\\r\\n <value>ChoiceA</value>\\r\\n <value>ChoiceE</value>\\r\\n </correctResponse>\\r\\n <mapping>\\r\\n <mapEntry mapKey=\\"ChoiceA\\" mappedValue=\\"1\\"/>\\r\\n <mapEntry mapKey=\\"ChoiceE\\" mappedValue=\\"3\\"/>\\r\\n </mapping>\\r\\n </responseDeclaration>\\r\\n <outcomeDeclaration identifier=\\"SCORE\\" cardinality=\\"single\\" baseType=\\"float\\"/>\\r\\n <itemBody>\\r\\n <choiceInteraction responseIdentifier=\\"RESPONSE\\">\\r\\n <prompt> \\r\\n Zebras having stripes is a trait that might help them to survive. \\r\\n Which of the statements below are possible advantages of stripes. \\r\\n Select all that apply\\r\\n </prompt>\\r\\n <simpleChoice identifier=\\"ChoiceA\\" >Stripes help to confuse predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceB\\" >Stripes help to attract predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceC\\" >Stripes help human hunters to see zebras more easily.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceD\\" >Stripes help zebras attract biting insects.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceE\\" >Stripes help zebras to find mates to reproduce with.</simpleChoice>\\r\\n </choiceInteraction>\\r\\n </itemBody>\\r\\n <responseProcessing template=\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\"/>\\r\\n</assessmentItem>\\r\\n",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0"\n },\n {\n "reference": "${unique_reference_id_2}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "<assessmentItem \\r\\n xmlns=\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\"\\r\\n xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\"\\r\\n xsi:schemaLocation=\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\"\\r\\n identifier=\\"choiceMultiple\\" \\r\\n title=\\"Welcome to Biodome\\" \\r\\n timeDependent=\\"false\\"\\r\\n>\\r\\n <responseDeclaration identifier=\\"RESPONSE\\" cardinality=\\"multiple\\" baseType=\\"identifier\\">\\r\\n <correctResponse>\\r\\n <value>ChoiceA</value>\\r\\n <value>ChoiceE</value>\\r\\n </correctResponse>\\r\\n <mapping>\\r\\n <mapEntry mapKey=\\"ChoiceA\\" mappedValue=\\"1\\"/>\\r\\n <mapEntry mapKey=\\"ChoiceE\\" mappedValue=\\"3\\"/>\\r\\n </mapping>\\r\\n </responseDeclaration>\\r\\n <outcomeDeclaration identifier=\\"SCORE\\" cardinality=\\"single\\" baseType=\\"float\\"/>\\r\\n <itemBody>\\r\\n <choiceInteraction responseIdentifier=\\"RESPONSE\\">\\r\\n <prompt> \\r\\n Zebras having stripes is a trait that might help them to survive. \\r\\n Which of the statements below are possible advantages of stripes. \\r\\n Select all that apply\\r\\n </prompt>\\r\\n <simpleChoice identifier=\\"ChoiceA\\" >Stripes help to confuse predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceB\\" >Stripes help to attract predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceC\\" >Stripes help human hunters to see zebras more easily.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceD\\" >Stripes help zebras attract biting insects.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceE\\" >Stripes help zebras to find mates to reproduce with.</simpleChoice>\\r\\n </choiceInteraction>\\r\\n </itemBody>\\r\\n <responseProcessing template=\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\"/>\\r\\n</assessmentItem>\\r\\n",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0"\n }\n ]\n}\n`);
193
193
  cy.get('.execute')
194
194
  .click();
195
195
  cy.wait(2000);
@@ -211,13 +211,13 @@ describe('Set Question Data API cases', () => {
211
211
  .should('have.text', '200');
212
212
  cy.get('pre[class="microlight"]')
213
213
  .eq(1)
214
- .should('have.text', `{\n "meta": {\n "status": true,\n "timestamp": ${timestamp}\n },\n "data": [\n {\n "type": "choiceMultiple",\n "reference": "${unique_reference_id_1}"\n },\n {\n "type": "choiceMultiple",\n "reference": "${unique_reference_id_2}"\n }\n ]\n}\n`);
214
+ .should('have.text', `{\n "meta": {\n "status": true,\n "timestamp": ${timestamp}\n },\n "data": [\n {\n "type": "multiple selection",\n "reference": "${unique_reference_id_1}"\n },\n {\n "type": "multiple selection",\n "reference": "${unique_reference_id_2}"\n }\n ]\n}\n`);
215
215
  });
216
216
 
217
217
  it('Entering request without XML and providing the data content, response should come with status code 200', () => {
218
218
  cy.get('textarea[class="body-param__text"]')
219
219
  .clear()
220
- .fill('{\n "questions": [\n {\n \"type\": \"choiceMultiple\",\n \"reference\": \"${uuid()}\",\n \"content\": {\n \"instruction\": \"<p>test</p>\",\n \"acknowledgements\": \"Acknowledgements and references\",\n \"sampleAnswer\": \"Sample Answer\"\n },\n \"options\": [\n {\n \"id\": \"ChoiceA\",\n \"label\": \"option 1\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceB\",\n \"label\": \"option 2\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceC\",\n \"label\": \"option 3\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceD\",\n \"label\": \"option 4\",\n \"locked\": true\n }\n ],\n \"correctAnswer\": [\n {\n \"answers\": [\n { \"answer\": \"ChoiceA\", \"points\": 5 },\n { \"answer\": \"ChoiceC\", \"points\": 7 }\n ]\n },\n {\n \"answers\": [\n { \"answer\": \"ChoiceC\", \"points\": 7 }\n ]\n }\n ],\n \"scoring\": {\n \"points\": 10,\n \"scoringType\": \"auto-scored\",\n \"subScoringType\": \"partialMatch\",\n \"penaltyPoints\": 1,\n \"penaltyPointType\": \"penaltyForEntireQuestion\",\n \"penaltyPointsForEach\": null,\n \"minScoreType\": \"awardMinScoreOnlyIfAttempted\",\n \"minScorePoints\": 1,\n \"isRoundingEnabled\": true,\n \"roundingType\": \"roundToNearestInteger\",\n \"isNegativeRounded\": false,\n \"scoringGuidance\": \"Teacher Scoring Guidance\"\n },\n \"settings\": {\n \"studentViewSettings\": {\n \"shuffleOption\": true,\n \"positionLock\": true,\n \"allowSettingMinOrMaxNumOfAnswers\": true,\n \"minNumAnswers\": 1,\n \"maxNumAnswers\": 2,\n \"allowCheckAnswer\": true,\n \"maxAttemptsToCheckAnswer\": 1\n },\n \"additionalSettings\": {\n \"orientation\": \"horizontal\",\n \"multipleColumns\": true,\n \"numOfOptionColumns\": 2,\n \"fontSize\": \"medium\",\n \"alignment\": \"left\",\n \"multipleSelection\": true,\n \"optionStyleType\": \"Default\",\n \"optionNumeration\": \"Default\",\n \"nonAccessible\": true\n },\n \"printLayoutSettings\": {\n \"excludeFromPrint\": false,\n \"printInstruction\": \"Question instructions for print\"\n },\n \"toolSettings\": [\n {\n \"resource\": \"ruler\",\n \"enabled\": true\n },\n {\n \"resource\": \"protractor\",\n \"enabled\": true\n },\n {\n \"resource\": \"readingRuler\",\n \"enabled\": false\n },\n {\n \"resource\": \"simpleCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"scientificCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"compass\",\n \"enabled\": false\n }\n ]\n }\n} \n]\n}\n');
220
+ .fill('{\n "questions": [\n {\n \"type\": \"multiple selection\",\n \"reference\": \"${uuid()}\",\n \"content\": {\n \"instruction\": \"<p>test</p>\",\n \"acknowledgements\": \"Acknowledgements and references\",\n \"sampleAnswer\": \"Sample Answer\"\n },\n \"options\": [\n {\n \"id\": \"ChoiceA\",\n \"label\": \"option 1\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceB\",\n \"label\": \"option 2\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceC\",\n \"label\": \"option 3\",\n \"locked\": false\n },\n {\n \"id\": \"ChoiceD\",\n \"label\": \"option 4\",\n \"locked\": true\n }\n ],\n \"correctAnswer\": [\n {\n \"answers\": [\n { \"answer\": \"ChoiceA\", \"points\": 5 },\n { \"answer\": \"ChoiceC\", \"points\": 7 }\n ]\n },\n {\n \"answers\": [\n { \"answer\": \"ChoiceC\", \"points\": 7 }\n ]\n }\n ],\n \"scoring\": {\n \"points\": 10,\n \"scoringType\": \"auto-scored\",\n \"subScoringType\": \"partialMatch\",\n \"penaltyPoints\": 1,\n \"penaltyPointType\": \"penaltyForEntireQuestion\",\n \"penaltyPointsForEach\": null,\n \"minScoreType\": \"awardMinScoreOnlyIfAttempted\",\n \"minScorePoints\": 1,\n \"isRoundingEnabled\": true,\n \"roundingType\": \"roundToNearestInteger\",\n \"isNegativeRounded\": false,\n \"scoringGuidance\": \"Teacher Scoring Guidance\"\n },\n \"settings\": {\n \"studentViewSettings\": {\n \"shuffleOption\": true,\n \"positionLock\": true,\n \"allowSettingMinOrMaxNumOfAnswers\": true,\n \"minNumAnswers\": 1,\n \"maxNumAnswers\": 2,\n \"allowCheckAnswer\": true,\n \"maxAttemptsToCheckAnswer\": 1\n },\n \"additionalSettings\": {\n \"orientation\": \"horizontal\",\n \"multipleColumns\": true,\n \"numOfOptionColumns\": 2,\n \"fontSize\": \"medium\",\n \"alignment\": \"left\",\n \"multipleSelection\": true,\n \"optionStyleType\": \"Default\",\n \"optionNumeration\": \"Default\",\n \"nonAccessible\": true\n },\n \"printLayoutSettings\": {\n \"excludeFromPrint\": false,\n \"printInstruction\": \"Question instructions for print\"\n },\n \"toolSettings\": [\n {\n \"resource\": \"ruler\",\n \"enabled\": true\n },\n {\n \"resource\": \"protractor\",\n \"enabled\": true\n },\n {\n \"resource\": \"readingRuler\",\n \"enabled\": false\n },\n {\n \"resource\": \"simpleCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"scientificCalculator\",\n \"enabled\": false\n },\n {\n \"resource\": \"compass\",\n \"enabled\": false\n }\n ]\n }\n} \n]\n}\n');
221
221
  cy.get('.execute')
222
222
  .click();
223
223
  cy.wait(2000);
@@ -28,7 +28,7 @@ describe('Save MCQ Question with Alternate Answers API cases', () => {
28
28
  .click();
29
29
  cy.get('textarea[class="body-param__text"]')
30
30
  .clear()
31
- .fill(`{\n "questions": [\n {\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "choiceMultiple",\n "question_xml": "<assessmentItem \\r\\n xmlns=\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\"\\r\\n xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\"\\r\\n xsi:schemaLocation=\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\"\\r\\n identifier=\\"choiceMultiple\\" \\r\\n title=\\"Welcome to Biodome\\" \\r\\n timeDependent=\\"false\\"\\r\\n>\\r\\n <responseDeclaration identifier=\\"RESPONSE\\" cardinality=\\"multiple\\" baseType=\\"identifier\\">\\r\\n <correctResponse>\\r\\n <value>ChoiceA</value>\\r\\n <value>ChoiceE</value>\\r\\n </correctResponse>\\r\\n <mapping>\\r\\n <mapEntry mapKey=\\"ChoiceA\\" mappedValue=\\"1\\"/>\\r\\n <mapEntry mapKey=\\"ChoiceE\\" mappedValue=\\"3\\"/>\\r\\n </mapping>\\r\\n </responseDeclaration>\\r\\n <outcomeDeclaration identifier=\\"SCORE\\" cardinality=\\"single\\" baseType=\\"float\\"/>\\r\\n <itemBody>\\r\\n <choiceInteraction responseIdentifier=\\"RESPONSE\\">\\r\\n <prompt> \\r\\n Zebras having stripes is a trait that might help them to survive. \\r\\n Which of the statements below are possible advantages of stripes. \\r\\n Select all that apply\\r\\n </prompt>\\r\\n <simpleChoice identifier=\\"ChoiceA\\" >Stripes help to confuse predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceB\\" >Stripes help to attract predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceC\\" >Stripes help human hunters to see zebras more easily.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceD\\" >Stripes help zebras attract biting insects.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceE\\" >Stripes help zebras to find mates to reproduce with.</simpleChoice>\\r\\n </choiceInteraction>\\r\\n </itemBody>\\r\\n <responseProcessing template=\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\"/>\\r\\n</assessmentItem>\\r\\n",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n [\n {\n "score": 1,\n "value": "ChoiceA"\n },\n {\n "score": 3,\n "value": "ChoiceE"\n }\n ],\n [\n {\n "score": 2,\n "value": "ChoiceB"\n },\n {\n "score": 2,\n "value": "ChoiceD"\n }\n ]\n ]\n }\n }\n ]\n}`);
31
+ .fill(`{\n "questions": [\n {\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "<assessmentItem \\r\\n xmlns=\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\"\\r\\n xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\"\\r\\n xsi:schemaLocation=\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\"\\r\\n identifier=\\"choiceMultiple\\" \\r\\n title=\\"Welcome to Biodome\\" \\r\\n timeDependent=\\"false\\"\\r\\n>\\r\\n <responseDeclaration identifier=\\"RESPONSE\\" cardinality=\\"multiple\\" baseType=\\"identifier\\">\\r\\n <correctResponse>\\r\\n <value>ChoiceA</value>\\r\\n <value>ChoiceE</value>\\r\\n </correctResponse>\\r\\n <mapping>\\r\\n <mapEntry mapKey=\\"ChoiceA\\" mappedValue=\\"1\\"/>\\r\\n <mapEntry mapKey=\\"ChoiceE\\" mappedValue=\\"3\\"/>\\r\\n </mapping>\\r\\n </responseDeclaration>\\r\\n <outcomeDeclaration identifier=\\"SCORE\\" cardinality=\\"single\\" baseType=\\"float\\"/>\\r\\n <itemBody>\\r\\n <choiceInteraction responseIdentifier=\\"RESPONSE\\">\\r\\n <prompt> \\r\\n Zebras having stripes is a trait that might help them to survive. \\r\\n Which of the statements below are possible advantages of stripes. \\r\\n Select all that apply\\r\\n </prompt>\\r\\n <simpleChoice identifier=\\"ChoiceA\\" >Stripes help to confuse predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceB\\" >Stripes help to attract predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceC\\" >Stripes help human hunters to see zebras more easily.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceD\\" >Stripes help zebras attract biting insects.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceE\\" >Stripes help zebras to find mates to reproduce with.</simpleChoice>\\r\\n </choiceInteraction>\\r\\n </itemBody>\\r\\n <responseProcessing template=\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\"/>\\r\\n</assessmentItem>\\r\\n",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n [\n {\n "score": 1,\n "value": "ChoiceA"\n },\n {\n "score": 3,\n "value": "ChoiceE"\n }\n ],\n [\n {\n "score": 2,\n "value": "ChoiceB"\n },\n {\n "score": 2,\n "value": "ChoiceD"\n }\n ]\n ]\n }\n }\n ]\n}`);
32
32
  cy.get('.execute')
33
33
  .click();
34
34
  cy.wait(2000);
@@ -50,7 +50,7 @@ describe('Save MCQ Question with Alternate Answers API cases', () => {
50
50
  it('Entering request with incorrect question_XML', () => {
51
51
  cy.get('textarea[class="body-param__text"]')
52
52
  .clear()
53
- .fill(`{\n "questions": [\n {\n "reference": "1ed861b-7dd3-1a1-0abc-7158cf8d4a7-dataAPiTest",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "choiceMultiple",\n "question_xml": "Random XML",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n [\n {\n "score": 1,\n "value": "ChoiceA"\n },\n {\n "score": 3,\n "value": "ChoiceE"\n }\n ],\n [\n {\n "score": 2,\n "value": "ChoiceB"\n },\n {\n "score": 2,\n "value": "ChoiceD"\n }\n ]\n ]\n }\n }\n ]\n}`);
53
+ .fill(`{\n "questions": [\n {\n "reference": "1ed861b-7dd3-1a1-0abc-7158cf8d4a7-dataAPiTest",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "Random XML",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n [\n {\n "score": 1,\n "value": "ChoiceA"\n },\n {\n "score": 3,\n "value": "ChoiceE"\n }\n ],\n [\n {\n "score": 2,\n "value": "ChoiceB"\n },\n {\n "score": 2,\n "value": "ChoiceD"\n }\n ]\n ]\n }\n }\n ]\n}`);
54
54
  cy.get('.execute')
55
55
  .click();
56
56
  cy.wait(2000);
@@ -78,7 +78,7 @@ describe('Save MCQ Question with Alternate Answers API cases', () => {
78
78
  it('Entering request with empty question_XML', () => {
79
79
  cy.get('textarea[class="body-param__text"]')
80
80
  .clear()
81
- .fill(`{\n "questions": [\n {\n "reference": "${uuid()}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "choiceMultiple",\n "question_xml": "",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n [\n {\n "score": 1,\n "value": "ChoiceA"\n },\n {\n "score": 3,\n "value": "ChoiceE"\n }\n ],\n [\n {\n "score": 2,\n "value": "ChoiceB"\n },\n {\n "score": 2,\n "value": "ChoiceD"\n }\n ]\n ]\n }\n }\n ]\n}`);
81
+ .fill(`{\n "questions": [\n {\n "reference": "${uuid()}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n [\n {\n "score": 1,\n "value": "ChoiceA"\n },\n {\n "score": 3,\n "value": "ChoiceE"\n }\n ],\n [\n {\n "score": 2,\n "value": "ChoiceB"\n },\n {\n "score": 2,\n "value": "ChoiceD"\n }\n ]\n ]\n }\n }\n ]\n}`);
82
82
  cy.get('.execute')
83
83
  .click();
84
84
  cy.wait(2000);
@@ -100,7 +100,7 @@ describe('Save MCQ Question with Alternate Answers API cases', () => {
100
100
  it('Entering request with already existing question reference', () => {
101
101
  cy.get('textarea[class="body-param__text"]')
102
102
  .clear()
103
- .fill('{\n "questions": [\n {\n "reference": "1ed861b-7dd3-1a1-0abc-7158cf8d4a7-dataAPiTest",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "choiceMultiple",\n "question_xml": "<assessmentItem \\r\\n xmlns=\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\"\\r\\n xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\"\\r\\n xsi:schemaLocation=\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\"\\r\\n identifier=\\"choiceMultiple\\" \\r\\n title=\\"Welcome to Biodome\\" \\r\\n timeDependent=\\"false\\"\\r\\n>\\r\\n <responseDeclaration identifier=\\"RESPONSE\\" cardinality=\\"multiple\\" baseType=\\"identifier\\">\\r\\n <correctResponse>\\r\\n <value>ChoiceA</value>\\r\\n <value>ChoiceE</value>\\r\\n </correctResponse>\\r\\n <mapping>\\r\\n <mapEntry mapKey=\\"ChoiceA\\" mappedValue=\\"1\\"/>\\r\\n <mapEntry mapKey=\\"ChoiceE\\" mappedValue=\\"3\\"/>\\r\\n </mapping>\\r\\n </responseDeclaration>\\r\\n <outcomeDeclaration identifier=\\"SCORE\\" cardinality=\\"single\\" baseType=\\"float\\"/>\\r\\n <itemBody>\\r\\n <choiceInteraction responseIdentifier=\\"RESPONSE\\">\\r\\n <prompt> \\r\\n Zebras having stripes is a trait that might help them to survive. \\r\\n Which of the statements below are possible advantages of stripes. \\r\\n Select all that apply\\r\\n </prompt>\\r\\n <simpleChoice identifier=\\"ChoiceA\\" >Stripes help to confuse predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceB\\" >Stripes help to attract predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceC\\" >Stripes help human hunters to see zebras more easily.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceD\\" >Stripes help zebras attract biting insects.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceE\\" >Stripes help zebras to find mates to reproduce with.</simpleChoice>\\r\\n </choiceInteraction>\\r\\n </itemBody>\\r\\n <responseProcessing template=\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\"/>\\r\\n</assessmentItem>\\r\\n",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n [\n {\n "score": 1,\n "value": "ChoiceA"\n },\n {\n "score": 3,\n "value": "ChoiceE"\n }\n ],\n [\n {\n "score": 2,\n "value": "ChoiceB"\n },\n {\n "score": 2,\n "value": "ChoiceD"\n }\n ]\n ]\n }\n }\n ]\n}');
103
+ .fill('{\n "questions": [\n {\n "reference": "1ed861b-7dd3-1a1-0abc-7158cf8d4a7-dataAPiTest",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "<assessmentItem \\r\\n xmlns=\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\"\\r\\n xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\"\\r\\n xsi:schemaLocation=\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\"\\r\\n identifier=\\"choiceMultiple\\" \\r\\n title=\\"Welcome to Biodome\\" \\r\\n timeDependent=\\"false\\"\\r\\n>\\r\\n <responseDeclaration identifier=\\"RESPONSE\\" cardinality=\\"multiple\\" baseType=\\"identifier\\">\\r\\n <correctResponse>\\r\\n <value>ChoiceA</value>\\r\\n <value>ChoiceE</value>\\r\\n </correctResponse>\\r\\n <mapping>\\r\\n <mapEntry mapKey=\\"ChoiceA\\" mappedValue=\\"1\\"/>\\r\\n <mapEntry mapKey=\\"ChoiceE\\" mappedValue=\\"3\\"/>\\r\\n </mapping>\\r\\n </responseDeclaration>\\r\\n <outcomeDeclaration identifier=\\"SCORE\\" cardinality=\\"single\\" baseType=\\"float\\"/>\\r\\n <itemBody>\\r\\n <choiceInteraction responseIdentifier=\\"RESPONSE\\">\\r\\n <prompt> \\r\\n Zebras having stripes is a trait that might help them to survive. \\r\\n Which of the statements below are possible advantages of stripes. \\r\\n Select all that apply\\r\\n </prompt>\\r\\n <simpleChoice identifier=\\"ChoiceA\\" >Stripes help to confuse predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceB\\" >Stripes help to attract predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceC\\" >Stripes help human hunters to see zebras more easily.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceD\\" >Stripes help zebras attract biting insects.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceE\\" >Stripes help zebras to find mates to reproduce with.</simpleChoice>\\r\\n </choiceInteraction>\\r\\n </itemBody>\\r\\n <responseProcessing template=\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\"/>\\r\\n</assessmentItem>\\r\\n",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n [\n {\n "score": 1,\n "value": "ChoiceA"\n },\n {\n "score": 3,\n "value": "ChoiceE"\n }\n ],\n [\n {\n "score": 2,\n "value": "ChoiceB"\n },\n {\n "score": 2,\n "value": "ChoiceD"\n }\n ]\n ]\n }\n }\n ]\n}');
104
104
  cy.get('.execute')
105
105
  .click();
106
106
  cy.wait(2000);
@@ -121,7 +121,7 @@ describe('Save MCQ Question with Alternate Answers API cases', () => {
121
121
  unique_reference_id_2 = uuid();
122
122
  cy.get('textarea[class="body-param__text"]')
123
123
  .clear()
124
- .fill(`{\n "questions": [\n {\n "reference": "${unique_reference_id_1}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "choiceMultiple",\n "question_xml": "<assessmentItem \\r\\n xmlns=\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\"\\r\\n xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\"\\r\\n xsi:schemaLocation=\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\"\\r\\n identifier=\\"choiceMultiple\\" \\r\\n title=\\"Welcome to Biodome\\" \\r\\n timeDependent=\\"false\\"\\r\\n>\\r\\n <responseDeclaration identifier=\\"RESPONSE\\" cardinality=\\"multiple\\" baseType=\\"identifier\\">\\r\\n <correctResponse>\\r\\n <value>ChoiceA</value>\\r\\n <value>ChoiceE</value>\\r\\n </correctResponse>\\r\\n <mapping>\\r\\n <mapEntry mapKey=\\"ChoiceA\\" mappedValue=\\"1\\"/>\\r\\n <mapEntry mapKey=\\"ChoiceE\\" mappedValue=\\"3\\"/>\\r\\n </mapping>\\r\\n </responseDeclaration>\\r\\n <outcomeDeclaration identifier=\\"SCORE\\" cardinality=\\"single\\" baseType=\\"float\\"/>\\r\\n <itemBody>\\r\\n <choiceInteraction responseIdentifier=\\"RESPONSE\\">\\r\\n <prompt> \\r\\n Zebras having stripes is a trait that might help them to survive. \\r\\n Which of the statements below are possible advantages of stripes. \\r\\n Select all that apply\\r\\n </prompt>\\r\\n <simpleChoice identifier=\\"ChoiceA\\" >Stripes help to confuse predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceB\\" >Stripes help to attract predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceC\\" >Stripes help human hunters to see zebras more easily.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceD\\" >Stripes help zebras attract biting insects.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceE\\" >Stripes help zebras to find mates to reproduce with.</simpleChoice>\\r\\n </choiceInteraction>\\r\\n </itemBody>\\r\\n <responseProcessing template=\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\"/>\\r\\n</assessmentItem>\\r\\n",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n [\n {\n "score": 1,\n "value": "ChoiceA"\n },\n {\n "score": 3,\n "value": "ChoiceE"\n }\n ],\n [\n {\n "score": 2,\n "value": "ChoiceB"\n },\n {\n "score": 2,\n "value": "ChoiceD"\n }\n ]\n ]\n }\n },\n {\n "reference": "${unique_reference_id_2}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "choiceMultiple",\n "question_xml": "<assessmentItem \\r\\n xmlns=\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\"\\r\\n xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\"\\r\\n xsi:schemaLocation=\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\"\\r\\n identifier=\\"choiceMultiple\\" \\r\\n title=\\"Welcome to Biodome\\" \\r\\n timeDependent=\\"false\\"\\r\\n>\\r\\n <responseDeclaration identifier=\\"RESPONSE\\" cardinality=\\"multiple\\" baseType=\\"identifier\\">\\r\\n <correctResponse>\\r\\n <value>ChoiceA</value>\\r\\n <value>ChoiceE</value>\\r\\n </correctResponse>\\r\\n </responseDeclaration>\\r\\n <outcomeDeclaration identifier=\\"SCORE\\" cardinality=\\"single\\" baseType=\\"float\\"/>\\r\\n <itemBody>\\r\\n <choiceInteraction responseIdentifier=\\"RESPONSE\\">\\r\\n <prompt> \\r\\n Zebras having stripes is a trait that might help them to survive. \\r\\n Which of the statements below are possible advantages of stripes. \\r\\n Select all that apply\\r\\n </prompt>\\r\\n <simpleChoice identifier=\\"ChoiceA\\" >Stripes help to confuse predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceB\\" >Stripes help to attract predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceC\\" >Stripes help human hunters to see zebras more easily.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceD\\" >Stripes help zebras attract biting insects.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceE\\" >Stripes help zebras to find mates to reproduce with.</simpleChoice>\\r\\n </choiceInteraction>\\r\\n </itemBody>\\r\\n <responseProcessing template=\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\"/>\\r\\n</assessmentItem>\\r\\n",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n {\n "score": 4,\n "values": [\n "ChoiceA",\n "ChoiceE"\n ]\n },\n {\n "score": 4,\n "values": [\n "ChoiceB",\n "ChoiceD"\n ]\n }\n ]\n }\n }\n ]\n}`);
124
+ .fill(`{\n "questions": [\n {\n "reference": "${unique_reference_id_1}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "<assessmentItem \\r\\n xmlns=\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\"\\r\\n xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\"\\r\\n xsi:schemaLocation=\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\"\\r\\n identifier=\\"choiceMultiple\\" \\r\\n title=\\"Welcome to Biodome\\" \\r\\n timeDependent=\\"false\\"\\r\\n>\\r\\n <responseDeclaration identifier=\\"RESPONSE\\" cardinality=\\"multiple\\" baseType=\\"identifier\\">\\r\\n <correctResponse>\\r\\n <value>ChoiceA</value>\\r\\n <value>ChoiceE</value>\\r\\n </correctResponse>\\r\\n <mapping>\\r\\n <mapEntry mapKey=\\"ChoiceA\\" mappedValue=\\"1\\"/>\\r\\n <mapEntry mapKey=\\"ChoiceE\\" mappedValue=\\"3\\"/>\\r\\n </mapping>\\r\\n </responseDeclaration>\\r\\n <outcomeDeclaration identifier=\\"SCORE\\" cardinality=\\"single\\" baseType=\\"float\\"/>\\r\\n <itemBody>\\r\\n <choiceInteraction responseIdentifier=\\"RESPONSE\\">\\r\\n <prompt> \\r\\n Zebras having stripes is a trait that might help them to survive. \\r\\n Which of the statements below are possible advantages of stripes. \\r\\n Select all that apply\\r\\n </prompt>\\r\\n <simpleChoice identifier=\\"ChoiceA\\" >Stripes help to confuse predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceB\\" >Stripes help to attract predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceC\\" >Stripes help human hunters to see zebras more easily.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceD\\" >Stripes help zebras attract biting insects.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceE\\" >Stripes help zebras to find mates to reproduce with.</simpleChoice>\\r\\n </choiceInteraction>\\r\\n </itemBody>\\r\\n <responseProcessing template=\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\"/>\\r\\n</assessmentItem>\\r\\n",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n [\n {\n "score": 1,\n "value": "ChoiceA"\n },\n {\n "score": 3,\n "value": "ChoiceE"\n }\n ],\n [\n {\n "score": 2,\n "value": "ChoiceB"\n },\n {\n "score": 2,\n "value": "ChoiceD"\n }\n ]\n ]\n }\n },\n {\n "reference": "${unique_reference_id_2}",\n "instruction": "question instructions",\n "points": 10,\n "is_auto_scored": true,\n "type": "multiple selection",\n "question_xml": "<assessmentItem \\r\\n xmlns=\\"http://www.imsglobal.org/xsd/imsqti_v2p2\\"\\r\\n xmlns:xsi=\\"http://www.w3.org/2001/XMLSchema-instance\\"\\r\\n xsi:schemaLocation=\\"http://www.imsglobal.org/xsd/imsqti_v2p2 http://www.imsglobal.org/xsd/qti/qtiv2p2/imsqti_v2p2p2.xsd\\"\\r\\n identifier=\\"choiceMultiple\\" \\r\\n title=\\"Welcome to Biodome\\" \\r\\n timeDependent=\\"false\\"\\r\\n>\\r\\n <responseDeclaration identifier=\\"RESPONSE\\" cardinality=\\"multiple\\" baseType=\\"identifier\\">\\r\\n <correctResponse>\\r\\n <value>ChoiceA</value>\\r\\n <value>ChoiceE</value>\\r\\n </correctResponse>\\r\\n </responseDeclaration>\\r\\n <outcomeDeclaration identifier=\\"SCORE\\" cardinality=\\"single\\" baseType=\\"float\\"/>\\r\\n <itemBody>\\r\\n <choiceInteraction responseIdentifier=\\"RESPONSE\\">\\r\\n <prompt> \\r\\n Zebras having stripes is a trait that might help them to survive. \\r\\n Which of the statements below are possible advantages of stripes. \\r\\n Select all that apply\\r\\n </prompt>\\r\\n <simpleChoice identifier=\\"ChoiceA\\" >Stripes help to confuse predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceB\\" >Stripes help to attract predators.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceC\\" >Stripes help human hunters to see zebras more easily.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceD\\" >Stripes help zebras attract biting insects.</simpleChoice>\\r\\n <simpleChoice identifier=\\"ChoiceE\\" >Stripes help zebras to find mates to reproduce with.</simpleChoice>\\r\\n </choiceInteraction>\\r\\n </itemBody>\\r\\n <responseProcessing template=\\"http://www.imsglobal.org/question/qti_v2p2/rptemplates/map_response\\"/>\\r\\n</assessmentItem>\\r\\n",\n "scoring_type_id": 1,\n "teacher_guideline": "guidelines for this questions if any",\n "penalty_points": "0",\n "min_score_if_attempted": "0",\n "validation": {\n "alt_responses": [\n {\n "score": 4,\n "values": [\n "ChoiceA",\n "ChoiceE"\n ]\n },\n {\n "score": 4,\n "values": [\n "ChoiceB",\n "ChoiceD"\n ]\n }\n ]\n }\n }\n ]\n}`);
125
125
  cy.get('.execute')
126
126
  .click();
127
127
  cy.wait(2000);
@@ -144,6 +144,6 @@ describe('Save MCQ Question with Alternate Answers API cases', () => {
144
144
  .should('have.text', '200');
145
145
  cy.get('pre[class="microlight"]')
146
146
  .eq(1)
147
- .should('have.text', `{\n "meta": {\n "status": true,\n "timestamp": ${timestamp}\n },\n "data": [\n {\n "type": "choiceMultiple",\n "reference": "${unique_reference_id_1}"\n },\n {\n "type": "choiceMultiple",\n "reference": "${unique_reference_id_2}"\n }\n ]\n}\n`);
147
+ .should('have.text', `{\n "meta": {\n "status": true,\n "timestamp": ${timestamp}\n },\n "data": [\n {\n "type": "multiple selection",\n "reference": "${unique_reference_id_1}"\n },\n {\n "type": "multiple selection",\n "reference": "${unique_reference_id_2}"\n }\n ]\n}\n`);
148
148
  });
149
149
  });