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
@@ -34,14 +34,14 @@ Cypress.Commands.add('lazyLoadPreviewQuestions', (count, retries = 5) => {
34
34
  cy.learnosityLoaderWait();
35
35
  })
36
36
 
37
- const migrationQuestionTypes = Cypress.env('migrationQuestionTypes');//["textEntryMath"]
37
+ const migrationQuestionTypes = Cypress.env('migrationQuestionTypes');//["textEntryMathImage"]
38
38
  const migrationQuestionTypesLrn = migrationQuestionTypes.map((questionType) => lrnQuestionTypesENUM[questionType]);
39
39
  let lrnMcqTypesRegex = /Multiple choice – standard|Multiple choice – multiple response|True or false|Multiple choice – block layout/;
40
40
 
41
41
  let lrnQuestionDataArr = [];
42
42
  let lrnGradingDataArr = [];
43
43
 
44
- let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(0, 100);//["eae30254-8637-4b59-a124-1b0caa68bc6e", "5acb0056-3d16-46d7-abbb-7a1ce08686ef", "6bd0f709-86c5-4e52-9510-9af3cd73e224"]
44
+ let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(0, 100);//["d526a378-de9e-4086-90ba-405057c48c3d", "9ee38abc-9c1c-4c10-9467-85f5823b7b17", "6521f6a7-4a9f-441f-8fc6-314ba7bf2386"]
45
45
 
46
46
  if (referenceIds.length > 0) {
47
47
  describe('Migration item check for MCQ questions', () => {
@@ -76,13 +76,11 @@ if (referenceIds.length > 0) {
76
76
  if (lrnMcqTypesRegex.test(currQuestionType)) {
77
77
  currQuestionType = lrnQuestionTypesENUM.mcq
78
78
  }
79
- if (currQuestionType.includes(lrnQuestionTypesENUM.textEntryMath)) {
80
- currQuestionType = lrnQuestionTypesENUM.textEntryMath
81
- }
82
79
  if (migrationQuestionTypesLrn.includes(currQuestionType)) {
83
80
  switch (currQuestionType) {
84
81
  case lrnQuestionTypesENUM.mcq: return extractLrnQuestionData.mcq(lrnQuestionDataArr, index);
85
82
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMath(lrnQuestionDataArr, index);
83
+ case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImage(lrnQuestionDataArr, index);
86
84
  default: throw new Error('Invalid lrn question type');
87
85
  }
88
86
  }
@@ -98,6 +96,7 @@ if (referenceIds.length > 0) {
98
96
  switch (questionType) {
99
97
  case 'mcq': return verifyIeQuestionData.mcq(questionData, index);
100
98
  case 'textEntryMath': return verifyIeQuestionData.textEntryMath(questionData, index);
99
+ case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImage(questionData, index);
101
100
  default: throw new Error('Invalid ngie question type');
102
101
  }
103
102
  });
@@ -116,6 +115,7 @@ if (referenceIds.length > 0) {
116
115
  switch (currQuestionType) {
117
116
  case lrnQuestionTypesENUM.mcq: return extractLrnQuestionData.mcqGrading(lrnGradingDataArr, index);
118
117
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
118
+ case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
119
119
  default: throw new Error('Invalid lrn question type');
120
120
  }
121
121
  }
@@ -133,6 +133,7 @@ if (referenceIds.length > 0) {
133
133
  switch (questionType) {
134
134
  case 'mcq': return verifyIeQuestionData.mcqGrading(questionData, index);
135
135
  case 'textEntryMath': return verifyIeQuestionData.textEntryMathGrading(questionData, index);
136
+ case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImageGrading(questionData, index);
136
137
  default: throw new Error('Invalid ngie question type');
137
138
  }
138
139
  });
@@ -76,13 +76,11 @@ if (referenceIds.length > 0) {
76
76
  if (lrnMcqTypesRegex.test(currQuestionType)) {
77
77
  currQuestionType = lrnQuestionTypesENUM.mcq
78
78
  }
79
- if (currQuestionType.includes(lrnQuestionTypesENUM.textEntryMath)) {
80
- currQuestionType = lrnQuestionTypesENUM.textEntryMath
81
- }
82
79
  if (migrationQuestionTypesLrn.includes(currQuestionType)) {
83
80
  switch (currQuestionType) {
84
81
  case lrnQuestionTypesENUM.mcq: return extractLrnQuestionData.mcq(lrnQuestionDataArr, index);
85
82
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMath(lrnQuestionDataArr, index);
83
+ case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImage(lrnQuestionDataArr, index);
86
84
  default: throw new Error('Invalid lrn question type');
87
85
  }
88
86
  }
@@ -98,6 +96,7 @@ if (referenceIds.length > 0) {
98
96
  switch (questionType) {
99
97
  case 'mcq': return verifyIeQuestionData.mcq(questionData, index);
100
98
  case 'textEntryMath': return verifyIeQuestionData.textEntryMath(questionData, index);
99
+ case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImage(questionData, index);
101
100
  default: throw new Error('Invalid ngie question type');
102
101
  }
103
102
  });
@@ -116,6 +115,7 @@ if (referenceIds.length > 0) {
116
115
  switch (currQuestionType) {
117
116
  case lrnQuestionTypesENUM.mcq: return extractLrnQuestionData.mcqGrading(lrnGradingDataArr, index);
118
117
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
118
+ case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
119
119
  default: throw new Error('Invalid lrn question type');
120
120
  }
121
121
  }
@@ -133,6 +133,7 @@ if (referenceIds.length > 0) {
133
133
  switch (questionType) {
134
134
  case 'mcq': return verifyIeQuestionData.mcqGrading(questionData, index);
135
135
  case 'textEntryMath': return verifyIeQuestionData.textEntryMathGrading(questionData, index);
136
+ case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImageGrading(questionData, index);
136
137
  default: throw new Error('Invalid ngie question type');
137
138
  }
138
139
  });
@@ -76,13 +76,11 @@ if (referenceIds.length > 0) {
76
76
  if (lrnMcqTypesRegex.test(currQuestionType)) {
77
77
  currQuestionType = lrnQuestionTypesENUM.mcq
78
78
  }
79
- if (currQuestionType.includes(lrnQuestionTypesENUM.textEntryMath)) {
80
- currQuestionType = lrnQuestionTypesENUM.textEntryMath
81
- }
82
79
  if (migrationQuestionTypesLrn.includes(currQuestionType)) {
83
80
  switch (currQuestionType) {
84
81
  case lrnQuestionTypesENUM.mcq: return extractLrnQuestionData.mcq(lrnQuestionDataArr, index);
85
82
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMath(lrnQuestionDataArr, index);
83
+ case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImage(lrnQuestionDataArr, index);
86
84
  default: throw new Error('Invalid lrn question type');
87
85
  }
88
86
  }
@@ -98,6 +96,7 @@ if (referenceIds.length > 0) {
98
96
  switch (questionType) {
99
97
  case 'mcq': return verifyIeQuestionData.mcq(questionData, index);
100
98
  case 'textEntryMath': return verifyIeQuestionData.textEntryMath(questionData, index);
99
+ case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImage(questionData, index);
101
100
  default: throw new Error('Invalid ngie question type');
102
101
  }
103
102
  });
@@ -116,6 +115,7 @@ if (referenceIds.length > 0) {
116
115
  switch (currQuestionType) {
117
116
  case lrnQuestionTypesENUM.mcq: return extractLrnQuestionData.mcqGrading(lrnGradingDataArr, index);
118
117
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
118
+ case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
119
119
  default: throw new Error('Invalid lrn question type');
120
120
  }
121
121
  }
@@ -133,6 +133,7 @@ if (referenceIds.length > 0) {
133
133
  switch (questionType) {
134
134
  case 'mcq': return verifyIeQuestionData.mcqGrading(questionData, index);
135
135
  case 'textEntryMath': return verifyIeQuestionData.textEntryMathGrading(questionData, index);
136
+ case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImageGrading(questionData, index);
136
137
  default: throw new Error('Invalid ngie question type');
137
138
  }
138
139
  });
@@ -76,13 +76,11 @@ if (referenceIds.length > 0) {
76
76
  if (lrnMcqTypesRegex.test(currQuestionType)) {
77
77
  currQuestionType = lrnQuestionTypesENUM.mcq
78
78
  }
79
- if (currQuestionType.includes(lrnQuestionTypesENUM.textEntryMath)) {
80
- currQuestionType = lrnQuestionTypesENUM.textEntryMath
81
- }
82
79
  if (migrationQuestionTypesLrn.includes(currQuestionType)) {
83
80
  switch (currQuestionType) {
84
81
  case lrnQuestionTypesENUM.mcq: return extractLrnQuestionData.mcq(lrnQuestionDataArr, index);
85
82
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMath(lrnQuestionDataArr, index);
83
+ case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImage(lrnQuestionDataArr, index);
86
84
  default: throw new Error('Invalid lrn question type');
87
85
  }
88
86
  }
@@ -98,6 +96,7 @@ if (referenceIds.length > 0) {
98
96
  switch (questionType) {
99
97
  case 'mcq': return verifyIeQuestionData.mcq(questionData, index);
100
98
  case 'textEntryMath': return verifyIeQuestionData.textEntryMath(questionData, index);
99
+ case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImage(questionData, index);
101
100
  default: throw new Error('Invalid ngie question type');
102
101
  }
103
102
  });
@@ -116,6 +115,7 @@ if (referenceIds.length > 0) {
116
115
  switch (currQuestionType) {
117
116
  case lrnQuestionTypesENUM.mcq: return extractLrnQuestionData.mcqGrading(lrnGradingDataArr, index);
118
117
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
118
+ case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
119
119
  default: throw new Error('Invalid lrn question type');
120
120
  }
121
121
  }
@@ -133,6 +133,7 @@ if (referenceIds.length > 0) {
133
133
  switch (questionType) {
134
134
  case 'mcq': return verifyIeQuestionData.mcqGrading(questionData, index);
135
135
  case 'textEntryMath': return verifyIeQuestionData.textEntryMathGrading(questionData, index);
136
+ case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImageGrading(questionData, index);
136
137
  default: throw new Error('Invalid ngie question type');
137
138
  }
138
139
  });
@@ -76,13 +76,11 @@ if (referenceIds.length > 0) {
76
76
  if (lrnMcqTypesRegex.test(currQuestionType)) {
77
77
  currQuestionType = lrnQuestionTypesENUM.mcq
78
78
  }
79
- if (currQuestionType.includes(lrnQuestionTypesENUM.textEntryMath)) {
80
- currQuestionType = lrnQuestionTypesENUM.textEntryMath
81
- }
82
79
  if (migrationQuestionTypesLrn.includes(currQuestionType)) {
83
80
  switch (currQuestionType) {
84
81
  case lrnQuestionTypesENUM.mcq: return extractLrnQuestionData.mcq(lrnQuestionDataArr, index);
85
82
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMath(lrnQuestionDataArr, index);
83
+ case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImage(lrnQuestionDataArr, index);
86
84
  default: throw new Error('Invalid lrn question type');
87
85
  }
88
86
  }
@@ -98,6 +96,7 @@ if (referenceIds.length > 0) {
98
96
  switch (questionType) {
99
97
  case 'mcq': return verifyIeQuestionData.mcq(questionData, index);
100
98
  case 'textEntryMath': return verifyIeQuestionData.textEntryMath(questionData, index);
99
+ case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImage(questionData, index);
101
100
  default: throw new Error('Invalid ngie question type');
102
101
  }
103
102
  });
@@ -116,6 +115,7 @@ if (referenceIds.length > 0) {
116
115
  switch (currQuestionType) {
117
116
  case lrnQuestionTypesENUM.mcq: return extractLrnQuestionData.mcqGrading(lrnGradingDataArr, index);
118
117
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
118
+ case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
119
119
  default: throw new Error('Invalid lrn question type');
120
120
  }
121
121
  }
@@ -133,6 +133,7 @@ if (referenceIds.length > 0) {
133
133
  switch (questionType) {
134
134
  case 'mcq': return verifyIeQuestionData.mcqGrading(questionData, index);
135
135
  case 'textEntryMath': return verifyIeQuestionData.textEntryMathGrading(questionData, index);
136
+ case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImageGrading(questionData, index);
136
137
  default: throw new Error('Invalid ngie question type');
137
138
  }
138
139
  });
@@ -109,7 +109,9 @@
109
109
  "checkboxLabel": "rgb(34, 34, 76)",
110
110
  "separatorsUnselectedOption": "rgb(68, 68, 97)",
111
111
  "microphoneIcon": "rgb(59, 126, 255)",
112
- "playerButtonBorder": "rgb(107, 139, 255)"
112
+ "playerButtonBorder": "rgb(107, 139, 255)",
113
+ "toggleButtonSelectedBg": "rgb(81, 0, 255)",
114
+ "UnselectedToggleButton": "rgb(68, 68, 97)"
113
115
  },
114
116
  "fontSize": {
115
117
  "extraSmall": "10px",
@@ -1,5 +1,5 @@
1
1
  import utilities from "../support/helpers/utilities";
2
- import { createQuestionBasePage, questionInstructionsComponent, scoringSectionBaseEditTab, maximumRecorderLengthComponent, commonComponents, playbackControlsBaseComponent, autoScoredScoringPreviewTab, studentViewSettingsLabelComponent } from "./components"
2
+ import { createQuestionBasePage, questionInstructionsComponent, scoringSectionBaseEditTab, maximumRecorderLengthComponent, commonComponents, playbackControlsBaseComponent, autoScoredScoringPreviewTab, studentViewSettingsLabelComponent, additionalSettingsPanel } from "./components"
3
3
  import { dialogBoxBase } from "./dialogBoxBase";
4
4
  const css = Cypress.env('css');
5
5
 
@@ -117,6 +117,7 @@ const steps = {
117
117
  ...questionInstructionsComponent.steps,
118
118
  ...maximumRecorderLengthComponent.steps,
119
119
  ...playbackControlsBaseComponent.steps,
120
+ ...additionalSettingsPanel.steps,
120
121
  startRecordingStandardPreview: () => {
121
122
  audioResponsePage.standardPreviewStartRecordingButton()
122
123
  .click();
@@ -36,6 +36,33 @@ const steps = {
36
36
  .click();
37
37
  },
38
38
 
39
+ enterTextInTeacherGuidelinesInputField: (teacherGuidelinesText) => {
40
+ additionalSettingsPanel.additionalSettingsTeacherGuidelinesInputField()
41
+ .click()
42
+ .type(teacherGuidelinesText)
43
+ .blur();
44
+ additionalSettingsPanel.additionalSettingsTeacherGuidelinesInputField()
45
+ .should('have.text', teacherGuidelinesText);
46
+ },
47
+
48
+ enterTextInSampleAnswerInputField: (sampleAnswer) => {
49
+ additionalSettingsPanel.additionalSettingsSampleAnswerInputField()
50
+ .click()
51
+ .type(sampleAnswer)
52
+ .blur();
53
+ additionalSettingsPanel.additionalSettingsSampleAnswerInputField()
54
+ .should('have.text', sampleAnswer);
55
+ },
56
+
57
+ enterTextInAcknowledgementsInputField: (acknowledgements) => {
58
+ additionalSettingsPanel.additionalSettingsAcknowledgementsInputField()
59
+ .click()
60
+ .type(acknowledgements)
61
+ .blur();
62
+ additionalSettingsPanel.additionalSettingsAcknowledgementsInputField()
63
+ .should('have.text', acknowledgements);
64
+ },
65
+
39
66
  expandAdditionalSettings: () => {
40
67
  additionalSettingsPanel.additionalSettingsPanel()
41
68
  .click()
@@ -1,5 +1,5 @@
1
1
  import { previewScoringAndShowCorrectAnswerComponent } from "./previewScoringAndShowCorrectAnswerComponent";
2
-
2
+ //Note: deprecated file
3
3
  const css = Cypress.env('css');
4
4
  const selectors = {
5
5
  correctIcon: () => cy.get('.icon-correct'),
@@ -5,7 +5,7 @@ import { scoringSectionBase } from "./scoringSectionBase";
5
5
  import { commonComponents } from "./commonComponents";
6
6
  import { previewScoringAndShowCorrectAnswerComponent } from "./previewScoringAndShowCorrectAnswerComponent";
7
7
  const css = Cypress.env('css');
8
- //Enhancement: This file should be deprecated, new file: autoScoredScoringPreviewTab.js
8
+ //Note: deprecated file
9
9
  const steps = {
10
10
  correctIncorrectLabelAndBorderExists: (questionType) => {
11
11
  switch (questionType) {
@@ -2,7 +2,7 @@ import utilities from "../../support/helpers/utilities";
2
2
  import { commonComponents } from "./commonComponents";
3
3
  import { scoringSectionBase } from "./scoringSectionBase";
4
4
  const css = Cypress.env('css');
5
- //Enhancement: This file will get deprecated: New file - autoScoredScoringSectionMultiResponseType
5
+ //Note: deprecated file
6
6
  const selectors = {
7
7
  allOrNothingCheckboxLabel: () => cy.get('label[for*="defaultScoring"]'),
8
8
  allOrNothingCheckbox: () => cy.get('input[type*="radio"][aria-label="All or Nothing"]'),
@@ -2,7 +2,7 @@ import { dialogBoxBase } from "../dialogBoxBase";
2
2
  import { scoringSectionBase } from "./scoringSectionBase";
3
3
  import { commonComponents } from "./commonComponents";
4
4
  const css = Cypress.env('css');
5
- //Enhancement: This file should be deprecated, new file: autoScoredSpecifyCorrectAnswerSection.js
5
+ //Note: deprecated file
6
6
  const selectors = {
7
7
  setCorrectAnswerLabel: () => cy.get('.set-correct-answer-label'),
8
8
  setCorrectAnswerHelpText: () => cy.get('.edit-set-correct-answer-help-text'),
@@ -345,13 +345,13 @@ const tests = {
345
345
  });
346
346
  utilities.verifyInnerText(utilities.getNthElement(scoringSectionBase.pleaseEnterPointsErrorMessage(), 0), 'Error: Please enter points.');
347
347
  utilities.verifyElementVisibilityState(scoringSectionBase.pleaseEnterPointsErrorMessage(), 'visible');
348
- if (questionType != 'list ordering' && questionType != 'short text response') {
348
+ if (questionType != 'list ordering' && questionType != 'short text response' && questionType != 'text entry math') {
349
349
  steps.verifySpecifyCorrectAnswerErrorMessage();
350
350
  }
351
351
  else if (questionType === 'short text response') {
352
352
  utilities.verifyInnerText(utilities.getNthElement(commonComponents.errorMessage(), -1), 'Error: Answer is required.');
353
353
  }
354
- if (questionType === 'fill in the gaps over image text' || questionType === 'text entry math') {
354
+ else if (questionType === 'fill in the gaps over image text' || questionType === 'text entry math') {
355
355
  utilities.verifyInnerText(commonComponents.errorMessage().last(), 'Error: Please enter points.');
356
356
  utilities.verifyElementVisibilityState(commonComponents.errorMessage().last(), 'visible');
357
357
  }
@@ -46,7 +46,7 @@ const steps = {
46
46
  setMaximumCheckAnswerAttempts: (maxCheckAnswerAttempts) => {
47
47
  autoScoredStudentViewSettings.steps.checkAllowStudentToCheckAnswerCheckbox();
48
48
  autoScoredStudentViewSettings.steps.expandMaxCheckAnswerAttemptsDropdown();
49
- autoScoredStudentViewSettings.steps.addInputToMaximumCheckAnswerAttemptsInputField(maxCheckAnswerAttempts)
49
+ autoScoredStudentViewSettings.steps.selectMaxCheckAnswerAttemptsDropdownListOption(maxCheckAnswerAttempts)
50
50
  },
51
51
 
52
52
  expandMaxCheckAnswerAttemptsDropdown: () => {
@@ -89,6 +89,13 @@ const tests = {
89
89
  });
90
90
  },
91
91
 
92
+ verifyMaximumAttemptsDropdownDisplayedWhenAllowStudentsToCheckAnswerIsChecked: () => {
93
+ it('When the user checks the \'Allow student to check answer\' checkbox, then \'Maximum check answer attempts\' dropdown should be displayed', () => {
94
+ autoScoredStudentViewSettings.steps.checkAllowStudentsToCheckAnswerCheckbox();
95
+ utilities.verifyElementVisibilityState(autoScoredStudentViewSettings.maximumCheckAnswerAttemptsDropdown(), 'visible');
96
+ });
97
+ },
98
+
92
99
  verifyMaxCheckAnswerAttemptsDropdown: () => {
93
100
  it('\'Maximum check answer attempts\' should have \'No limit\' selected by default and on expanding the dropdown options 1 to 10 should also be displayed', () => {
94
101
  utilities.verifyInnerText(autoScoredStudentViewSettings.maximumCheckAnswerAttemptsDropdownLabel(), 'Maximum check answer attempts');
@@ -1,7 +1,7 @@
1
1
  import utilities from "../../support/helpers/utilities";
2
2
  import { dialogBoxBase } from "../dialogBoxBase";
3
3
  import { commonComponents } from "./commonComponents";
4
- import { figOverImageCanvasComponent } from "./figOverImageCanvasComponent";
4
+ import { imageCanvasComponent } from "./imageCanvasComponent";
5
5
  const css = Cypress.env('css');
6
6
 
7
7
  const selectors = {
@@ -110,9 +110,9 @@ const tests = {
110
110
  backgroundImageUploadComponent.steps.uploadFile('highlightImage.jpg');
111
111
  utilities.verifyElementVisibilityState(backgroundImageUploadComponent.uploadImageProgressBar(), 'visible');
112
112
  backgroundImageUploadComponent.steps.verifyFileNameLabel('highlightImage.jpg');
113
- utilities.verifyElementVisibilityState( figOverImageCanvasComponent.canvasImage(), 'visible');
113
+ utilities.verifyElementVisibilityState( imageCanvasComponent.canvasImage(), 'visible');
114
114
  utilities.verifyElementVisibilityState(backgroundImageUploadComponent.uploadImageProgressBar(), 'notExist');
115
- figOverImageCanvasComponent.steps.verifyImageIsUploaded();
115
+ imageCanvasComponent.steps.verifyImageIsUploaded();
116
116
  });
117
117
 
118
118
  it('Delete button should appear beside uploaded file\'s name', () => {
@@ -184,7 +184,7 @@ const tests = {
184
184
  backgroundImageUploadComponent.steps.clickOnCancelButtonInDeleteImagePopup();
185
185
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
186
186
  utilities.verifyInnerText(backgroundImageUploadComponent.uploadedFileNameLabel(), 'sample1.jpg');
187
- utilities.verifyElementVisibilityState(figOverImageCanvasComponent.canvasImage(), 'visible');
187
+ utilities.verifyElementVisibilityState(imageCanvasComponent.canvasImage(), 'visible');
188
188
  });
189
189
 
190
190
  it('When user clicks on \'Delete image\' button, then popup should close and image inside the canvas should be deleted', () => {
@@ -192,7 +192,7 @@ const tests = {
192
192
  backgroundImageUploadComponent.steps.clickOnDeleteButtonInDeleteImagePopup();
193
193
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
194
194
  utilities.verifyInnerText(backgroundImageUploadComponent.noFileChosenLabel(), 'No file chosen');
195
- figOverImageCanvasComponent.steps.verifyCanvasImageNotExist();
195
+ imageCanvasComponent.steps.verifyCanvasImageNotExist();
196
196
  });
197
197
  }
198
198
  }
@@ -86,10 +86,16 @@ const steps = {
86
86
  createQuestionBasePage.previewTab()
87
87
  .should('have.attr', 'aria-selected', 'false');
88
88
  },
89
-
89
+
90
+ verifySavedSuccessfullySnackbar: () => {
91
+ commonComponents.snackbar()
92
+ .should('have.text', 'Saved successfully!')
93
+ .should('be.visible');
94
+ },
95
+
90
96
  clickOnCancelButton: () => {
91
97
  createQuestionBasePage.cancelButton()
92
- .click();
98
+ .click();
93
99
  }
94
100
  }
95
101
 
@@ -287,6 +287,12 @@ const steps = {
287
287
  .type('{backspace}');
288
288
  },
289
289
 
290
+ enterTextInPredefinedTextInputField: (predefinedText) => {
291
+ essayResponseCommonComponents.predefinedTextInputField()
292
+ .type(predefinedText)
293
+ .should('have.text', predefinedText);
294
+ },
295
+
290
296
  verifyGradingViewResponseFieldIsNonEditable: () => {
291
297
  essayResponseCommonComponents.responseField()
292
298
  .should('have.attr', 'contenteditable', 'false');
@@ -143,6 +143,19 @@ const steps = {
143
143
  fillInTheGapsCommonComponents.previewTabCorrectAnswerResponseWrapper()
144
144
  .should('have.length', correctAnswerArray.length);
145
145
  },
146
+
147
+ setPlaceholderText: (placeholder) => {
148
+ fillInTheGapsCommonComponents.placeholderTextInputField()
149
+ .type(placeholder)
150
+ .should('have.value', placeholder);
151
+ },
152
+
153
+ setResponseContainerHeight: (height) => {
154
+ fillInTheGapsCommonComponents.heightInputField()
155
+ .type(height)
156
+ .should('have.value', height)
157
+ .blur();
158
+ }
146
159
  }
147
160
 
148
161
  const tests = {
@@ -0,0 +1,40 @@
1
+ import utilities from "../../support/helpers/utilities";
2
+
3
+ const selectors = {
4
+ correctAnswersNumeration: () => cy.get('[class*="__AnswerCell"] .answer-numeration-number-box'),
5
+ correctAnswersOptions: () => cy.get('[class*="__AnswerWrapper"] .question-text-wrapper'),
6
+ correctAnswersLabel: () => cy.get('.correct-answers-label'),
7
+ tickIconWrapper: () => cy.get('.tick-icon-wrapper'),
8
+ correctAnswerContainer: () => cy.get('.dnd-correct-answer-wrapper'),
9
+ correctIncorrectAnswerLabel: () => cy.get('[class*="CorrectIncorrectLabel"]'),
10
+ }
11
+
12
+ const steps = {
13
+ /**
14
+ *@description Verifies the correctness of answer responses in the correct answer section, including the count.
15
+ * @param {string[][]} correctAnswerArray An array of arrays, each containing the expected answer options for a specific correct answer section.
16
+ */
17
+ verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount: (correctAnswerArray) => {
18
+ utilities.verifyElementCount(fillInTheGapsDragAndDropCommonComponents.correctAnswersOptions(), correctAnswerArray.length);
19
+ correctAnswerArray.forEach((correctAnswer, index) => {
20
+ utilities.verifyTextContent(utilities.getNthElement(fillInTheGapsDragAndDropCommonComponents.correctAnswersNumeration(), index), index + 1);
21
+ correctAnswer.forEach((answerOption) => {
22
+ utilities.verifyTextContent(utilities.getNthElement(fillInTheGapsDragAndDropCommonComponents.correctAnswersOptions(), index), answerOption);
23
+ });
24
+ });
25
+ },
26
+
27
+ verifyCorrectAnswerSectionNotExists: () => {
28
+ utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropCommonComponents.correctAnswerContainer(), 'notExist');
29
+ },
30
+ }
31
+
32
+ const tests = {
33
+
34
+ }
35
+
36
+ export const fillInTheGapsDragAndDropCommonComponents = {
37
+ ...selectors,
38
+ steps,
39
+ tests
40
+ }