itemengine-cypress-automation 1.0.119 → 1.0.121

Sign up to get free protection for your applications and to get access to all the features.
Files changed (123) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/editTabBasicSection.js +13 -1
  2. package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +2 -0
  3. package/cypress/e2e/ILC/AudioResponseNew/previewContentsForAllViews.smoke.js +1 -0
  4. package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +2 -0
  5. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +1 -1
  6. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +2 -2
  7. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/studentViewSettings.js +1 -4
  8. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingForAllViews.smoke.js +273 -0
  9. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/checkAnswerFunctionalityForAllViews.smoke.js +116 -0
  10. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +136 -0
  11. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/allOrNothingForAllView.smoke.js +224 -0
  12. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/checkAnswerFunctionalityForAllViews.smoke.js +120 -0
  13. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/previewContentsForAllViews.smoke.js +158 -0
  14. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +1 -1
  15. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -4
  16. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownAndDropdownMenuSection.js +246 -0
  17. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +332 -0
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +409 -0
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/headerSection.js +80 -0
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +213 -0
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +1 -1
  22. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsBasic.js +2 -2
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +1 -1
  24. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/allOrNothingForAllViews.smoke.js +2 -2
  25. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +68 -68
  26. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +6 -6
  27. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/previewContentsForAllViews.smoke.js +1 -1
  28. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +3 -289
  29. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +1 -1
  30. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +2 -2
  31. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +2 -23
  32. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +191 -0
  33. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +190 -0
  34. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +284 -0
  35. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingPenaltyScoring.js +52 -0
  36. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/manuallyAndNonScored.js +113 -0
  37. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +217 -0
  38. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsBasic.js +234 -0
  39. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +217 -0
  40. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +217 -0
  41. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsBasic.js +136 -0
  42. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +197 -0
  43. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +169 -0
  44. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +197 -0
  45. package/cypress/e2e/ILC/FillInTheGapsTextNew/allOrNothingForAllViews.smoke.js +219 -0
  46. package/cypress/e2e/ILC/FillInTheGapsTextNew/checkAnswerFunctionalityForAllViews.smoke.js +115 -0
  47. package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +142 -0
  48. package/cypress/e2e/ILC/FillInTheGapsTextNew/previewContentsForAllViews.smoke.js +152 -0
  49. package/cypress/e2e/ILC/FillInTheGapsTextNew/setLimitSection.js +39 -0
  50. package/cypress/e2e/ILC/MultipleSelection/studentViewSettings.js +2 -12
  51. package/cypress/e2e/ILC/ShortTextResponseNew/conditionalCheckboxes.js +497 -0
  52. package/cypress/e2e/ILC/ShortTextResponseNew/editTabBasicSections.js +503 -0
  53. package/cypress/e2e/ILC/ShortTextResponseNew/responseAnswersAndAcceptedStudentInput.js +233 -0
  54. package/cypress/e2e/ILC/ShortTextResponseNew/specialCharactersSection.js +291 -0
  55. package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +332 -0
  56. package/cypress/e2e/ILC/SingleSelection/studentViewSettings.js +2 -12
  57. package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +9 -8
  58. package/cypress/e2e/ILC/TextEntryMath/editTabScoringSection.js +4 -4
  59. package/cypress/e2e/ILC/TextEntryMath/minimumScoringPenaltyPointsAndRoundingDropdown.js +8 -2
  60. package/cypress/e2e/ILC/TextEntryMath/specifyCorrectAnswerSection.js +5 -2
  61. package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +334 -0
  62. package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +419 -0
  63. package/cypress/e2e/ILC/TextEntryMathWithImage/checkAnswerFunctionalityForAllViews.smoke.js +166 -0
  64. package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +166 -0
  65. package/cypress/e2e/ILC/UploadResponse/editTabScoringSection.js +51 -0
  66. package/cypress/e2e/ILC/UploadResponse/gradingViewAndCorrectAnswerViewContents.smoke.js +99 -0
  67. package/cypress/e2e/ILC/UploadResponse/manuallyAndNonScoredScoring.js +71 -0
  68. package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +155 -0
  69. package/cypress/e2e/ILC/UploadResponse/uploadResponseHeaderSection.js +66 -0
  70. package/cypress/e2e/migration/migration.js +6 -5
  71. package/cypress/e2e/migration/migration2.js +4 -3
  72. package/cypress/e2e/migration/migration3.js +4 -3
  73. package/cypress/e2e/migration/migration4.js +4 -3
  74. package/cypress/e2e/migration/migration5.js +4 -3
  75. package/cypress/fixtures/theme/ilc.json +3 -1
  76. package/cypress/pages/audioResponsePage.js +2 -1
  77. package/cypress/pages/components/additionalSettingsPanel.js +27 -0
  78. package/cypress/pages/components/autoScoredPreviewBase.js +1 -1
  79. package/cypress/pages/components/autoScoredScoringSection.js +1 -1
  80. package/cypress/pages/components/autoScoredScoringSectionMultipleResponsesType.js +1 -1
  81. package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +1 -1
  82. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +2 -2
  83. package/cypress/pages/components/autoScoredStudentViewSettings.js +8 -1
  84. package/cypress/pages/components/backgroundImageUploadComponent.js +5 -5
  85. package/cypress/pages/components/createQuestionBasePage.js +8 -2
  86. package/cypress/pages/components/essayResponseCommonComponents.js +6 -0
  87. package/cypress/pages/components/fillInTheGapsCommonComponents.js +13 -0
  88. package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +40 -0
  89. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +422 -314
  90. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +438 -710
  91. package/cypress/pages/components/{figOverImageCanvasComponent.js → imageCanvasComponent.js} +274 -272
  92. package/cypress/pages/components/index.js +3 -3
  93. package/cypress/pages/components/maximumRecorderLengthComponent.js +55 -11
  94. package/cypress/pages/components/previewScoringAndShowCorrectAnswerComponent.js +1 -1
  95. package/cypress/pages/components/questionInputFieldComponent.js +49 -23
  96. package/cypress/pages/components/scoringSectionBase.js +1 -1
  97. package/cypress/pages/createItemPage.js +67 -2
  98. package/cypress/pages/fillInTheGapsDragAndDropPage.js +172 -711
  99. package/cypress/pages/fillInTheGapsDropdownPage.js +75 -72
  100. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +4 -4
  101. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +109 -273
  102. package/cypress/pages/fillInTheGapsOverImageTextPage.js +49 -291
  103. package/cypress/pages/fillInTheGapsTextPage.js +52 -199
  104. package/cypress/pages/index.js +5 -5
  105. package/cypress/pages/multipleSelectionPage.js +1 -0
  106. package/cypress/pages/shortTextResponsePage.js +575 -33
  107. package/cypress/pages/singleSelectionGridPage.js +1 -2
  108. package/cypress/pages/singleSelectionPage.js +5 -6
  109. package/cypress/pages/textEntryMathPage.js +46 -22
  110. package/cypress/pages/textEntryMathWithImagePage.js +212 -0
  111. package/cypress/pages/uploadResponsePage.js +74 -21
  112. package/cypress/support/migrationHelpers/extractLrnQuestionData.js +73 -2
  113. package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +1 -0
  114. package/cypress/support/migrationHelpers/verifyIeQuestionData.js +49 -2
  115. package/package.json +1 -1
  116. package/cypress/e2e/ILC/AudioResponseNew/minimalRecorderStyle.js +0 -482
  117. package/cypress/e2e/ILC/EssayResponse/essayResponseEquationEditor.smoke.js +0 -412
  118. package/cypress/pages/components/figOverImageCommonComponent.js +0 -1113
  119. package/cypress/pages/dragAndDropIntoCategoriesAllOrNothingScoring.js +0 -1155
  120. package/cypress/pages/dragAndDropIntoCategoriesCellsScoring.js +0 -1561
  121. package/cypress/pages/dragAndDropIntoCategoriesResponseScoring.js +0 -1396
  122. package/cypress/pages/fillInTheGapsScoring.js +0 -5872
  123. package/cypress/pages/fillInTheGapsSetCorrectAnswerSection.js +0 -260
@@ -10,6 +10,7 @@ export const lrnPage = {
10
10
  clozeMathResponse: () => cy.get('.lrn_cloze_response'),
11
11
  clozeMathCorrectAnswerMathMl: () => cy.get('.lrn_correctAnswerList math'),
12
12
  correctAnswersResponseText: () => cy.get('.lrn_responseText'),
13
+ backgroundCanvasImage: () => cy.get('.lrn_imagecloze_image'),
13
14
  steps: {
14
15
  checkShowAnswersToggle: () => {
15
16
  lrnPage.showAnswersToggle()
@@ -183,8 +184,78 @@ export const extractLrnQuestionData = {
183
184
  });
184
185
  obj.correctAnswersMathMl = correctAnswersMathMl;
185
186
  obj.correctAnswersText = correctAnswersText;
186
- //extract math outerhtml
187
- //extract response text and outer html, verify it with the other one
187
+ //response numeration in show answers
188
+ });
189
+ lrnGradingDataArr.push(obj);
190
+ },
191
+
192
+ textEntryMathImage: (lrnQuestionDataArr, index) => {
193
+ let obj = {};
194
+ cy.log(`Extracting the question instructions, question and response count from question ${index}`);
195
+ obj.questionIndex = index;
196
+ obj.questionType = 'textEntryMathImage';
197
+ lrnPage.questionWrapper()
198
+ .eq(index)
199
+ .within(() => {
200
+ lrnPage.questionInstructions()
201
+ .then(($ins) => {
202
+ let text = $ins[0].innerText;
203
+ obj.previewQuestionInstructions = text;
204
+ });
205
+ lrnPage.clozeMathResponse()
206
+ .then(($responseFields) => {
207
+ obj.previewResponseCount = $responseFields.length;
208
+ });
209
+ lrnPage.backgroundCanvasImage()
210
+ .then(($element) => {
211
+ let bgImageAltText = $element[0].alt;
212
+ obj.bgImageAltText = bgImageAltText;
213
+ });
214
+ });
215
+ lrnQuestionDataArr.push(obj);
216
+ },
217
+
218
+ textEntryMathImageGrading: (lrnGradingDataArr, index) => {
219
+ let obj = {};
220
+ cy.log(`Extracting the question instructions, question, response count and correct responses from question ${index}`);
221
+ obj.questionIndex = index;
222
+ obj.questionType = 'textEntryMathImage';
223
+ lrnPage.questionWrapper()
224
+ .eq(index)
225
+ .within(() => {
226
+ lrnPage.questionInstructions()
227
+ .then(($ins) => {
228
+ let text = $ins[0].innerText;
229
+ obj.gradingQuestionInstructions = text;
230
+ });
231
+ lrnPage.clozeMathResponseWrapper()
232
+ .then(($question) => {
233
+ let innerText = $question[0].innerText;
234
+ obj.gradingQuestion = innerText;
235
+ });
236
+ lrnPage.clozeMathResponse()
237
+ .then(($responseFields) => {
238
+ obj.gradingResponseCount = $responseFields.length;
239
+ });
240
+ const correctAnswersMathMl = [];
241
+ const correctAnswersText = [];
242
+ lrnPage.clozeMathCorrectAnswerMathMl()
243
+ .each(($element) => {
244
+ let outerHtml = $element[0].outerHTML;
245
+ correctAnswersMathMl.push(outerHtml);
246
+ });
247
+ lrnPage.correctAnswersResponseText()
248
+ .each(($element) => {
249
+ let innerText = $element[0].innerText;
250
+ correctAnswersText.push(innerText);
251
+ });
252
+ lrnPage.backgroundCanvasImage()
253
+ .then(($element) => {
254
+ let bgImageAltText = $element[0].alt;
255
+ obj.bgImageAltText = bgImageAltText;
256
+ });
257
+ obj.correctAnswersMathMl = correctAnswersMathMl;
258
+ obj.correctAnswersText = correctAnswersText;
188
259
  });
189
260
  lrnGradingDataArr.push(obj);
190
261
  },
@@ -1,6 +1,7 @@
1
1
  const lrnQuestionTypesENUM = {
2
2
  mcq: 'mcq',
3
3
  textEntryMath: 'Cloze math',
4
+ textEntryMathImage: 'Cloze math with image',
4
5
  essayResponseMath: 'Math essay with rich text',
5
6
  singleSelection: 'Multiple choice – standard',
6
7
  multipleSelection: 'Multiple choice – multiple response',
@@ -8,9 +8,10 @@ export const iePage = {
8
8
  questionWrapper: () => cy.get('.ngie-question-wrapper'),
9
9
  barsPreloader: () => cy.get('[id="question-item-instruction-loader"]'),
10
10
  previewQuestionTextWrapper: () => cy.get('.preview-question-text-wrapper'),
11
- textEntryMathResponseWrapper: () => cy.get('.preview-question-text-wrapper .cloze-response-wrapper '),
11
+ textEntryMathResponseWrapper: () => cy.get('.cloze-math-preview-wrapper .cloze-math-response-input-field'),
12
12
  textEntryMathCorrectAnswerMathMl: () => cy.get('.ngie_latex math'),
13
13
  textEntryMathCorrectAnswersResponseText: () => cy.get('.ngie_latex'),
14
+ backgroundCanvasImage: () => cy.get('.background-image'),
14
15
  };
15
16
 
16
17
  export const verifyIeQuestionData = {
@@ -70,7 +71,6 @@ export const verifyIeQuestionData = {
70
71
  });
71
72
  },
72
73
 
73
-
74
74
  textEntryMath: (expectedQuestionData, index) => {
75
75
  cy.get('.cloze-math-preview-wrapper')
76
76
  .eq(index)
@@ -92,6 +92,7 @@ export const verifyIeQuestionData = {
92
92
  utilities.verifyInnerText(singleSelectionPage.questionInstructionsText(), expectedQuestionData.gradingQuestionInstructions);
93
93
  iePage.previewQuestionTextWrapper()
94
94
  .should('exist');
95
+ //Not working due to numeration being displayed above responses in IE
95
96
  // utilities.verifyInnerText(iePage.previewQuestionTextWrapper(), expectedQuestionData.gradingQuestion);
96
97
  iePage.textEntryMathResponseWrapper()
97
98
  .then(($resposneWrapper) => {
@@ -108,6 +109,52 @@ export const verifyIeQuestionData = {
108
109
  });
109
110
  },
110
111
 
112
+ textEntryMathImage: (expectedQuestionData, index) => {
113
+ //Limitations: Verifying text content of the question wrapper as in ie numeration is displayed in the question wrapper section as well
114
+ //Correct answer numeration, as lrn has an option to not select numeration but still numeration is displayed in the correct ans but in that case numeration in not displayed in IE
115
+ cy.get('.cloze-math-preview-wrapper .label-image-with-text-preview')
116
+ .eq(index)
117
+ .parents('.ngie-question-wrapper')
118
+ .within(() => {
119
+ utilities.verifyInnerText(singleSelectionPage.questionInstructionsText(), expectedQuestionData.previewQuestionInstructions);
120
+ // Not working due to numeration being displayed above responses in IE
121
+ // utilities.verifyInnerText(iePage.previewQuestionTextWrapper(), expectedQuestionData.previewQuestion);
122
+ iePage.textEntryMathResponseWrapper()
123
+ .then(($resposneWrapper) => {
124
+ expect($resposneWrapper.length).to.be.eq(expectedQuestionData.previewResponseCount);
125
+ });
126
+ iePage.backgroundCanvasImage()
127
+ .then(($element) => {
128
+ expect($element[0].alt).to.be.eq(expectedQuestionData.bgImageAltText);
129
+ });
130
+ });
131
+ },
132
+
133
+ textEntryMathImageGrading: (expectedQuestionData, index) => {
134
+ cy.get('.cloze-math-preview-wrapper .label-image-with-text-preview')
135
+ .eq(index)
136
+ .parents('.ngie-question-wrapper')
137
+ .within(() => {
138
+ utilities.verifyInnerText(singleSelectionPage.questionInstructionsText(), expectedQuestionData.gradingQuestionInstructions);
139
+ iePage.textEntryMathResponseWrapper()
140
+ .then(($resposneWrapper) => {
141
+ expect($resposneWrapper.length).to.be.eq(expectedQuestionData.gradingResponseCount);
142
+ });
143
+ iePage.textEntryMathCorrectAnswerMathMl()
144
+ .each(($element, index) => {
145
+ expect($element.get(0).outerHTML).to.deep.eq(expectedQuestionData.correctAnswersMathMl[index]);
146
+ });
147
+ iePage.textEntryMathCorrectAnswersResponseText()
148
+ .each(($element, index) => {
149
+ utilities.verifyInnerText(cy.wrap($element), expectedQuestionData.correctAnswersText[index]);
150
+ });
151
+ iePage.backgroundCanvasImage()
152
+ .then(($element) => {
153
+ expect($element[0].alt).to.be.eq(expectedQuestionData.bgImageAltText);
154
+ });
155
+ });
156
+ },
157
+
111
158
  essayResponseMath: (expectedQuestionData, index) => {
112
159
  cy.get('.ngie-essay-response-math')
113
160
  .eq(index)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.119",
3
+ "version": "1.0.121",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {