itemengine-cypress-automation 1.0.164-migrationScripts-f3c3f29.0 → 1.0.164
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
|
|
1
1
|
import { migrationScript } from "../../support/migrationHelpers/migrationScript"
|
2
2
|
|
3
|
-
let referenceIds =
|
3
|
+
let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(0, 50);//["8.8.7 Practice 5"]
|
4
4
|
|
5
5
|
migrationScript(referenceIds);
|
@@ -43,11 +43,14 @@ const verifyIePreviewData = (questionType, questionData, index) => {
|
|
43
43
|
}
|
44
44
|
|
45
45
|
const extractLrnGradingData = (currQuestionType, lrnGradingDataArr, index) => {
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
46
|
+
switch (currQuestionType) {
|
47
|
+
case lrnQuestionTypesENUM.mcq: return extractLrnQuestionData.mcqGrading(lrnGradingDataArr, index);
|
48
|
+
case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
|
49
|
+
case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
|
50
|
+
case lrnQuestionTypesENUM.dndIntoCategories: return extractLrnQuestionData.dndIntoCategoriesGrading(lrnGradingDataArr, index);
|
51
|
+
case lrnQuestionTypesENUM.figText: return extractLrnQuestionData.figTextGrading(lrnGradingDataArr, index);
|
52
|
+
default: throw new Error('Invalid lrn question type');
|
53
|
+
}
|
51
54
|
}
|
52
55
|
|
53
56
|
const verifyIeGradingData = (questionType, questionData, index) => {
|
@@ -108,7 +108,6 @@ export const verifyIeQuestionData = {
|
|
108
108
|
const textEntryMathQuestionsArr = [];
|
109
109
|
cy.get('.cloze-math-preview-wrapper')
|
110
110
|
.each(($question) => {
|
111
|
-
console.log('$question', $question)
|
112
111
|
if (!$question[0].innerHTML.includes('label-image-with-text-preview')) {
|
113
112
|
textEntryMathQuestionsArr.push($question);
|
114
113
|
}
|
@@ -117,7 +116,8 @@ export const verifyIeQuestionData = {
|
|
117
116
|
cy.wrap(textEntryMathQuestionsArr[index])
|
118
117
|
.within(() => {
|
119
118
|
iePage.steps.verifyQuestionInstructions(expectedQuestionData);
|
120
|
-
|
119
|
+
let previewQuestion = expectedQuestionData.previewQuestion.replace(/\u22c5/g, '·');
|
120
|
+
utilities.verifyInnerText(iePage.previewQuestionTextWrapper(), previewQuestion);
|
121
121
|
textEntryMathPage.answersInputField()
|
122
122
|
.then(($resposneWrapper) => {
|
123
123
|
expect($resposneWrapper.length).to.be.eq(expectedQuestionData.previewResponseCount);
|
@@ -140,7 +140,6 @@ export const verifyIeQuestionData = {
|
|
140
140
|
const textEntryMathQuestionsArr = [];
|
141
141
|
cy.get('.cloze-math-preview-wrapper')
|
142
142
|
.each(($question) => {
|
143
|
-
console.log('$question', $question)
|
144
143
|
if (!$question[0].innerHTML.includes('label-image-with-text-preview')) {
|
145
144
|
textEntryMathQuestionsArr.push($question);
|
146
145
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "itemengine-cypress-automation",
|
3
|
-
"version": "1.0.164
|
3
|
+
"version": "1.0.164",
|
4
4
|
"description": "",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
@@ -35,4 +35,4 @@
|
|
35
35
|
"node-fetch": "^3.3.2",
|
36
36
|
"react-uuid": "^2.0.0"
|
37
37
|
}
|
38
|
-
}
|
38
|
+
}
|