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.
- package/cypress/e2e/ILC/AudioResponseNew/editTabBasicSection.js +13 -1
- package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +2 -0
- package/cypress/e2e/ILC/AudioResponseNew/previewContentsForAllViews.smoke.js +1 -0
- package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +2 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/studentViewSettings.js +1 -4
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingForAllViews.smoke.js +273 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/checkAnswerFunctionalityForAllViews.smoke.js +116 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +136 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/allOrNothingForAllView.smoke.js +224 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/checkAnswerFunctionalityForAllViews.smoke.js +120 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/previewContentsForAllViews.smoke.js +158 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownAndDropdownMenuSection.js +246 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +332 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +409 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/headerSection.js +80 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +213 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsBasic.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/allOrNothingForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +68 -68
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +6 -6
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +3 -289
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +2 -23
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +191 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +190 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +284 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingPenaltyScoring.js +52 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/manuallyAndNonScored.js +113 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +217 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsBasic.js +234 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +217 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +217 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsBasic.js +136 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +197 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +169 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +197 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/allOrNothingForAllViews.smoke.js +219 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/checkAnswerFunctionalityForAllViews.smoke.js +115 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +142 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/previewContentsForAllViews.smoke.js +152 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/setLimitSection.js +39 -0
- package/cypress/e2e/ILC/MultipleSelection/studentViewSettings.js +2 -12
- package/cypress/e2e/ILC/ShortTextResponseNew/conditionalCheckboxes.js +497 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/editTabBasicSections.js +503 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/responseAnswersAndAcceptedStudentInput.js +233 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/specialCharactersSection.js +291 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +332 -0
- package/cypress/e2e/ILC/SingleSelection/studentViewSettings.js +2 -12
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +9 -8
- package/cypress/e2e/ILC/TextEntryMath/editTabScoringSection.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/minimumScoringPenaltyPointsAndRoundingDropdown.js +8 -2
- package/cypress/e2e/ILC/TextEntryMath/specifyCorrectAnswerSection.js +5 -2
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +334 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +419 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/checkAnswerFunctionalityForAllViews.smoke.js +166 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +166 -0
- package/cypress/e2e/ILC/UploadResponse/editTabScoringSection.js +51 -0
- package/cypress/e2e/ILC/UploadResponse/gradingViewAndCorrectAnswerViewContents.smoke.js +99 -0
- package/cypress/e2e/ILC/UploadResponse/manuallyAndNonScoredScoring.js +71 -0
- package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +155 -0
- package/cypress/e2e/ILC/UploadResponse/uploadResponseHeaderSection.js +66 -0
- package/cypress/e2e/migration/migration.js +6 -5
- package/cypress/e2e/migration/migration2.js +4 -3
- package/cypress/e2e/migration/migration3.js +4 -3
- package/cypress/e2e/migration/migration4.js +4 -3
- package/cypress/e2e/migration/migration5.js +4 -3
- package/cypress/fixtures/theme/ilc.json +3 -1
- package/cypress/pages/audioResponsePage.js +2 -1
- package/cypress/pages/components/additionalSettingsPanel.js +27 -0
- package/cypress/pages/components/autoScoredPreviewBase.js +1 -1
- package/cypress/pages/components/autoScoredScoringSection.js +1 -1
- package/cypress/pages/components/autoScoredScoringSectionMultipleResponsesType.js +1 -1
- package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +2 -2
- package/cypress/pages/components/autoScoredStudentViewSettings.js +8 -1
- package/cypress/pages/components/backgroundImageUploadComponent.js +5 -5
- package/cypress/pages/components/createQuestionBasePage.js +8 -2
- package/cypress/pages/components/essayResponseCommonComponents.js +6 -0
- package/cypress/pages/components/fillInTheGapsCommonComponents.js +13 -0
- package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +40 -0
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +422 -314
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +438 -710
- package/cypress/pages/components/{figOverImageCanvasComponent.js → imageCanvasComponent.js} +274 -272
- package/cypress/pages/components/index.js +3 -3
- package/cypress/pages/components/maximumRecorderLengthComponent.js +55 -11
- package/cypress/pages/components/previewScoringAndShowCorrectAnswerComponent.js +1 -1
- package/cypress/pages/components/questionInputFieldComponent.js +49 -23
- package/cypress/pages/components/scoringSectionBase.js +1 -1
- package/cypress/pages/createItemPage.js +67 -2
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +172 -711
- package/cypress/pages/fillInTheGapsDropdownPage.js +75 -72
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +4 -4
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +109 -273
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +49 -291
- package/cypress/pages/fillInTheGapsTextPage.js +52 -199
- package/cypress/pages/index.js +5 -5
- package/cypress/pages/multipleSelectionPage.js +1 -0
- package/cypress/pages/shortTextResponsePage.js +575 -33
- package/cypress/pages/singleSelectionGridPage.js +1 -2
- package/cypress/pages/singleSelectionPage.js +5 -6
- package/cypress/pages/textEntryMathPage.js +46 -22
- package/cypress/pages/textEntryMathWithImagePage.js +212 -0
- package/cypress/pages/uploadResponsePage.js +74 -21
- package/cypress/support/migrationHelpers/extractLrnQuestionData.js +73 -2
- package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +1 -0
- package/cypress/support/migrationHelpers/verifyIeQuestionData.js +49 -2
- package/package.json +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/minimalRecorderStyle.js +0 -482
- package/cypress/e2e/ILC/EssayResponse/essayResponseEquationEditor.smoke.js +0 -412
- package/cypress/pages/components/figOverImageCommonComponent.js +0 -1113
- package/cypress/pages/dragAndDropIntoCategoriesAllOrNothingScoring.js +0 -1155
- package/cypress/pages/dragAndDropIntoCategoriesCellsScoring.js +0 -1561
- package/cypress/pages/dragAndDropIntoCategoriesResponseScoring.js +0 -1396
- package/cypress/pages/fillInTheGapsScoring.js +0 -5872
- 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
|
-
//
|
187
|
-
|
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('.
|
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)
|