itemengine-cypress-automation 1.0.148-migrationScripts-10f40db.0 → 1.0.149-migrationScripts-88aadf4.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/migration/migration.js +6 -2
- package/cypress/e2e/migration/migration10.js +5 -1
- package/cypress/e2e/migration/migration11.js +141 -0
- package/cypress/e2e/migration/migration2.js +5 -1
- package/cypress/e2e/migration/migration3.js +5 -1
- package/cypress/e2e/migration/migration4.js +5 -1
- package/cypress/e2e/migration/migration5.js +5 -1
- package/cypress/e2e/migration/migration6.js +5 -1
- package/cypress/e2e/migration/migration7.js +5 -1
- package/cypress/e2e/migration/migration8.js +5 -1
- package/cypress/e2e/migration/migration9.js +5 -1
- package/cypress/support/migrationHelpers/extractLrnQuestionData.js +66 -5
- package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +1 -0
- package/cypress/support/migrationHelpers/verifyIeQuestionData.js +43 -1
- package/deploy/e2e/deploy.yaml +2 -2
- package/deploy/migration/deploy.yaml +2 -2
- package/package.json +1 -1
@@ -5,7 +5,7 @@ import lrnQuestionTypesENUM from "../../support/migrationHelpers/lrnQestionTypes
|
|
5
5
|
import { verifyIeQuestionData } from "../../support/migrationHelpers/verifyIeQuestionData";
|
6
6
|
import abortEarlySetup from "../../support/helpers/abortEarly";
|
7
7
|
|
8
|
-
const migrationQuestionTypes = Cypress.env('migrationQuestionTypes');//["
|
8
|
+
const migrationQuestionTypes = Cypress.env('migrationQuestionTypes');//["figText"]
|
9
9
|
const migrationQuestionTypesLrn = migrationQuestionTypes.map((questionType) => lrnQuestionTypesENUM[questionType]);
|
10
10
|
let lrnMcqTypesRegex = /Multiple choice – standard|Multiple choice – multiple response|True or false|Multiple choice – block layout/;
|
11
11
|
let lrnEssayResponseRegex = /Math essay with rich text|Essay with rich text/
|
@@ -14,7 +14,7 @@ let lrnEssayResponseRegex = /Math essay with rich text|Essay with rich text/
|
|
14
14
|
let lrnQuestionDataArr = [];
|
15
15
|
let lrnGradingDataArr = [];
|
16
16
|
|
17
|
-
let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(0,
|
17
|
+
let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(0, 91);//["b4e6a98c-4ec2-4045-acaf-44f024d0be89"]
|
18
18
|
|
19
19
|
if (referenceIds.length > 0) {
|
20
20
|
describe('Migration item check for MCQ questions', () => {
|
@@ -63,6 +63,7 @@ if (referenceIds.length > 0) {
|
|
63
63
|
case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
|
64
64
|
case lrnQuestionTypesENUM.drawingResponse: return extractLrnQuestionData.drawingResponse(lrnQuestionDataArr, index);
|
65
65
|
case lrnQuestionTypesENUM.dndIntoCategories: return extractLrnQuestionData.dndIntoCategories(lrnQuestionDataArr, index);
|
66
|
+
case lrnQuestionTypesENUM.figText: return extractLrnQuestionData.figText(lrnQuestionDataArr, index);
|
66
67
|
default: throw new Error('Invalid lrn question type');
|
67
68
|
}
|
68
69
|
}
|
@@ -83,6 +84,7 @@ if (referenceIds.length > 0) {
|
|
83
84
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
84
85
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
85
86
|
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
87
|
+
case 'figText': return verifyIeQuestionData.figText(questionData, index);
|
86
88
|
default: throw new Error('Invalid ngie question type');
|
87
89
|
}
|
88
90
|
});
|
@@ -105,6 +107,7 @@ if (referenceIds.length > 0) {
|
|
105
107
|
else if (currQuestionType === lrnQuestionTypesENUM.textEntryMath) extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
|
106
108
|
else if (currQuestionType === lrnQuestionTypesENUM.textEntryMathImage) extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
|
107
109
|
else if (currQuestionType === lrnQuestionTypesENUM.dndIntoCategories) extractLrnQuestionData.dndIntoCategoriesGrading(lrnGradingDataArr, index);
|
110
|
+
else if (currQuestionType === lrnQuestionTypesENUM.figText) extractLrnQuestionData.figTextGrading(lrnGradingDataArr, index);
|
108
111
|
}
|
109
112
|
});
|
110
113
|
}
|
@@ -124,6 +127,7 @@ if (referenceIds.length > 0) {
|
|
124
127
|
case 'textEntryMath': return verifyIeQuestionData.textEntryMathGrading(questionData, index);
|
125
128
|
case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImageGrading(questionData, index);
|
126
129
|
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategoriesGrading(questionData, index);
|
130
|
+
case 'figText': return verifyIeQuestionData.figTextGrading(questionData, index);
|
127
131
|
default: throw new Error('Invalid ngie question type');
|
128
132
|
}
|
129
133
|
});
|
@@ -14,7 +14,7 @@ let lrnEssayResponseRegex = /Math essay with rich text|Essay with rich text/
|
|
14
14
|
let lrnQuestionDataArr = [];
|
15
15
|
let lrnGradingDataArr = [];
|
16
16
|
|
17
|
-
let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(
|
17
|
+
let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(819, 910);//["85f864fd-8ce9-4d9d-a326-afb13963d6bd", "6ff35364-0fb6-4cc4-b09c-426f6199e3d6", "d5644e39-1f23-4c4d-a6ad-f80fee66cb62"]
|
18
18
|
|
19
19
|
if (referenceIds.length > 0) {
|
20
20
|
describe('Migration item check for MCQ questions', () => {
|
@@ -63,6 +63,7 @@ if (referenceIds.length > 0) {
|
|
63
63
|
case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
|
64
64
|
case lrnQuestionTypesENUM.drawingResponse: return extractLrnQuestionData.drawingResponse(lrnQuestionDataArr, index);
|
65
65
|
case lrnQuestionTypesENUM.dndIntoCategories: return extractLrnQuestionData.dndIntoCategories(lrnQuestionDataArr, index);
|
66
|
+
case lrnQuestionTypesENUM.figText: return extractLrnQuestionData.figText(lrnQuestionDataArr, index);
|
66
67
|
default: throw new Error('Invalid lrn question type');
|
67
68
|
}
|
68
69
|
}
|
@@ -83,6 +84,7 @@ if (referenceIds.length > 0) {
|
|
83
84
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
84
85
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
85
86
|
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
87
|
+
case 'figText': return verifyIeQuestionData.figText(questionData, index);
|
86
88
|
default: throw new Error('Invalid ngie question type');
|
87
89
|
}
|
88
90
|
});
|
@@ -105,6 +107,7 @@ if (referenceIds.length > 0) {
|
|
105
107
|
else if (currQuestionType === lrnQuestionTypesENUM.textEntryMath) extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
|
106
108
|
else if (currQuestionType === lrnQuestionTypesENUM.textEntryMathImage) extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
|
107
109
|
else if (currQuestionType === lrnQuestionTypesENUM.dndIntoCategories) extractLrnQuestionData.dndIntoCategoriesGrading(lrnGradingDataArr, index);
|
110
|
+
else if (currQuestionType === lrnQuestionTypesENUM.figText) extractLrnQuestionData.figTextGrading(lrnGradingDataArr, index);
|
108
111
|
}
|
109
112
|
});
|
110
113
|
}
|
@@ -124,6 +127,7 @@ if (referenceIds.length > 0) {
|
|
124
127
|
case 'textEntryMath': return verifyIeQuestionData.textEntryMathGrading(questionData, index);
|
125
128
|
case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImageGrading(questionData, index);
|
126
129
|
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategoriesGrading(questionData, index);
|
130
|
+
case 'figText': return verifyIeQuestionData.figTextGrading(questionData, index);
|
127
131
|
default: throw new Error('Invalid ngie question type');
|
128
132
|
}
|
129
133
|
});
|
@@ -0,0 +1,141 @@
|
|
1
|
+
import { autoScoredScoringPreviewTab } from "../../pages/components";
|
2
|
+
import utilities from "../../support/helpers/utilities";
|
3
|
+
import { extractLrnQuestionData, lrnPage } from "../../support/migrationHelpers/extractLrnQuestionData";
|
4
|
+
import lrnQuestionTypesENUM from "../../support/migrationHelpers/lrnQestionTypesENUM";
|
5
|
+
import { verifyIeQuestionData } from "../../support/migrationHelpers/verifyIeQuestionData";
|
6
|
+
import abortEarlySetup from "../../support/helpers/abortEarly";
|
7
|
+
|
8
|
+
const migrationQuestionTypes = Cypress.env('migrationQuestionTypes');//["drawingResponse"]
|
9
|
+
const migrationQuestionTypesLrn = migrationQuestionTypes.map((questionType) => lrnQuestionTypesENUM[questionType]);
|
10
|
+
let lrnMcqTypesRegex = /Multiple choice – standard|Multiple choice – multiple response|True or false|Multiple choice – block layout/;
|
11
|
+
let lrnEssayResponseRegex = /Math essay with rich text|Essay with rich text/
|
12
|
+
|
13
|
+
|
14
|
+
let lrnQuestionDataArr = [];
|
15
|
+
let lrnGradingDataArr = [];
|
16
|
+
|
17
|
+
let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(910, 1001);//["85f864fd-8ce9-4d9d-a326-afb13963d6bd", "6ff35364-0fb6-4cc4-b09c-426f6199e3d6", "d5644e39-1f23-4c4d-a6ad-f80fee66cb62"]
|
18
|
+
|
19
|
+
if (referenceIds.length > 0) {
|
20
|
+
describe('Migration item check for MCQ questions', () => {
|
21
|
+
before(() => {
|
22
|
+
cy.loginAs('technicalTester');
|
23
|
+
});
|
24
|
+
|
25
|
+
referenceIds.forEach((referenceId) => {
|
26
|
+
describe(`Migration item check for item "${referenceId}"`, () => {
|
27
|
+
abortEarlySetup();
|
28
|
+
before(() => {
|
29
|
+
cy.interceptGraphql('getItemPreview');
|
30
|
+
cy.setGraphqlWait();
|
31
|
+
cy.visit(`/items-list/item/${utilities.base64Encoding(referenceId)}`);
|
32
|
+
cy.pageLoadWait('getItemPreview');
|
33
|
+
cy.get('@getItemPreview').then((req) => {
|
34
|
+
let questionCount = req.response.body.data.getItemPreview.item.questionParts.length;
|
35
|
+
cy.lazyLoadPreviewQuestions(questionCount);
|
36
|
+
});
|
37
|
+
});
|
38
|
+
|
39
|
+
after(() => {
|
40
|
+
console.log(lrnQuestionDataArr)
|
41
|
+
console.log(lrnGradingDataArr)
|
42
|
+
lrnQuestionDataArr = [];
|
43
|
+
lrnGradingDataArr = [];
|
44
|
+
});
|
45
|
+
|
46
|
+
it(`Extracting learnosity preview data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
47
|
+
lrnPage.questionTypeDiv()
|
48
|
+
.each(($el, index) => {
|
49
|
+
let currQuestionType = $el[0].innerText
|
50
|
+
if (lrnMcqTypesRegex.test(currQuestionType)) {
|
51
|
+
currQuestionType = lrnQuestionTypesENUM.mcq;
|
52
|
+
}
|
53
|
+
if (lrnEssayResponseRegex.test(currQuestionType)) {
|
54
|
+
;
|
55
|
+
currQuestionType = lrnQuestionTypesENUM.essayResponse;
|
56
|
+
}
|
57
|
+
if (migrationQuestionTypesLrn.includes(currQuestionType)) {
|
58
|
+
switch (currQuestionType) {
|
59
|
+
case lrnQuestionTypesENUM.mcq: return extractLrnQuestionData.mcq(lrnQuestionDataArr, index);
|
60
|
+
case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMath(lrnQuestionDataArr, index);
|
61
|
+
case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImage(lrnQuestionDataArr, index);
|
62
|
+
case lrnQuestionTypesENUM.essayResponse: return extractLrnQuestionData.essayResponse(lrnQuestionDataArr, index);
|
63
|
+
case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
|
64
|
+
case lrnQuestionTypesENUM.drawingResponse: return extractLrnQuestionData.drawingResponse(lrnQuestionDataArr, index);
|
65
|
+
case lrnQuestionTypesENUM.dndIntoCategories: return extractLrnQuestionData.dndIntoCategories(lrnQuestionDataArr, index);
|
66
|
+
case lrnQuestionTypesENUM.figText: return extractLrnQuestionData.figText(lrnQuestionDataArr, index);
|
67
|
+
default: throw new Error('Invalid lrn question type');
|
68
|
+
}
|
69
|
+
}
|
70
|
+
});
|
71
|
+
});
|
72
|
+
|
73
|
+
it(`Verifying itemengine preview data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
74
|
+
migrationQuestionTypes.forEach((questionType) => {
|
75
|
+
cy.log(`Verifying data for all ${questionType} question type`);
|
76
|
+
let currQuestionTypeArr = lrnQuestionDataArr.filter((question) => question.questionType === questionType);
|
77
|
+
currQuestionTypeArr.forEach((questionData, index) => {
|
78
|
+
cy.log(`Verifying data for ${questionType} ${index}`);
|
79
|
+
switch (questionType) {
|
80
|
+
case 'mcq': return verifyIeQuestionData.mcq(questionData, index);
|
81
|
+
case 'textEntryMath': return verifyIeQuestionData.textEntryMath(questionData, index);
|
82
|
+
case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImage(questionData, index);
|
83
|
+
case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
|
84
|
+
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
85
|
+
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
86
|
+
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
87
|
+
case 'figText': return verifyIeQuestionData.figText(questionData, index);
|
88
|
+
default: throw new Error('Invalid ngie question type');
|
89
|
+
}
|
90
|
+
});
|
91
|
+
});
|
92
|
+
});
|
93
|
+
|
94
|
+
it(`Extracting learnosity grading data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
95
|
+
lrnPage.authorItemToolbarControlsWrapper()
|
96
|
+
.then(($element) => {
|
97
|
+
if ($element[0].innerHTML.includes('lrn-author-validate-questions-toggle')) {
|
98
|
+
lrnPage.steps.checkShowAnswersToggle();
|
99
|
+
lrnPage.questionTypeDiv()
|
100
|
+
.each(($el, index) => {
|
101
|
+
let currQuestionType = $el[0].innerText
|
102
|
+
if (lrnMcqTypesRegex.test(currQuestionType)) {
|
103
|
+
currQuestionType = lrnQuestionTypesENUM.mcq
|
104
|
+
}
|
105
|
+
if (migrationQuestionTypesLrn.includes(currQuestionType)) {
|
106
|
+
if (currQuestionType === lrnQuestionTypesENUM.mcq) extractLrnQuestionData.mcqGrading(lrnGradingDataArr, index);
|
107
|
+
else if (currQuestionType === lrnQuestionTypesENUM.textEntryMath) extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
|
108
|
+
else if (currQuestionType === lrnQuestionTypesENUM.textEntryMathImage) extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
|
109
|
+
else if (currQuestionType === lrnQuestionTypesENUM.dndIntoCategories) extractLrnQuestionData.dndIntoCategoriesGrading(lrnGradingDataArr, index);
|
110
|
+
else if (currQuestionType === lrnQuestionTypesENUM.figText) extractLrnQuestionData.figTextGrading(lrnGradingDataArr, index);
|
111
|
+
}
|
112
|
+
});
|
113
|
+
}
|
114
|
+
});
|
115
|
+
});
|
116
|
+
|
117
|
+
it(`Verifying itemengine grading data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
118
|
+
autoScoredScoringPreviewTab.steps.switchToGradingView();
|
119
|
+
cy.wait(500);
|
120
|
+
migrationQuestionTypes.forEach((questionType) => {
|
121
|
+
cy.log(`Verifying grading data for all ${questionType} question type`);
|
122
|
+
let currQuestionTypeArr = lrnGradingDataArr.filter((question) => question.questionType === questionType);
|
123
|
+
currQuestionTypeArr.forEach((questionData, index) => {
|
124
|
+
cy.log(`Verifying grading data for ${questionType} ${index}`);
|
125
|
+
switch (questionType) {
|
126
|
+
case 'mcq': return verifyIeQuestionData.mcqGrading(questionData, index);
|
127
|
+
case 'textEntryMath': return verifyIeQuestionData.textEntryMathGrading(questionData, index);
|
128
|
+
case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImageGrading(questionData, index);
|
129
|
+
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategoriesGrading(questionData, index);
|
130
|
+
case 'figText': return verifyIeQuestionData.figTextGrading(questionData, index);
|
131
|
+
default: throw new Error('Invalid ngie question type');
|
132
|
+
}
|
133
|
+
});
|
134
|
+
});
|
135
|
+
});
|
136
|
+
});
|
137
|
+
});
|
138
|
+
});
|
139
|
+
}
|
140
|
+
|
141
|
+
//https://s3.console.aws.amazon.com/s3/object/itemengine-qa-bucket?region=us-west-2&bucketType=general&prefix=cypressAutomation/migrationFixtures.json
|
@@ -14,7 +14,7 @@ let lrnEssayResponseRegex = /Math essay with rich text|Essay with rich text/
|
|
14
14
|
let lrnQuestionDataArr = [];
|
15
15
|
let lrnGradingDataArr = [];
|
16
16
|
|
17
|
-
let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(
|
17
|
+
let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(91, 182);//["85f864fd-8ce9-4d9d-a326-afb13963d6bd", "6ff35364-0fb6-4cc4-b09c-426f6199e3d6", "d5644e39-1f23-4c4d-a6ad-f80fee66cb62"]
|
18
18
|
|
19
19
|
if (referenceIds.length > 0) {
|
20
20
|
describe('Migration item check for MCQ questions', () => {
|
@@ -63,6 +63,7 @@ if (referenceIds.length > 0) {
|
|
63
63
|
case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
|
64
64
|
case lrnQuestionTypesENUM.drawingResponse: return extractLrnQuestionData.drawingResponse(lrnQuestionDataArr, index);
|
65
65
|
case lrnQuestionTypesENUM.dndIntoCategories: return extractLrnQuestionData.dndIntoCategories(lrnQuestionDataArr, index);
|
66
|
+
case lrnQuestionTypesENUM.figText: return extractLrnQuestionData.figText(lrnQuestionDataArr, index);
|
66
67
|
default: throw new Error('Invalid lrn question type');
|
67
68
|
}
|
68
69
|
}
|
@@ -83,6 +84,7 @@ if (referenceIds.length > 0) {
|
|
83
84
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
84
85
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
85
86
|
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
87
|
+
case 'figText': return verifyIeQuestionData.figText(questionData, index);
|
86
88
|
default: throw new Error('Invalid ngie question type');
|
87
89
|
}
|
88
90
|
});
|
@@ -105,6 +107,7 @@ if (referenceIds.length > 0) {
|
|
105
107
|
else if (currQuestionType === lrnQuestionTypesENUM.textEntryMath) extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
|
106
108
|
else if (currQuestionType === lrnQuestionTypesENUM.textEntryMathImage) extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
|
107
109
|
else if (currQuestionType === lrnQuestionTypesENUM.dndIntoCategories) extractLrnQuestionData.dndIntoCategoriesGrading(lrnGradingDataArr, index);
|
110
|
+
else if (currQuestionType === lrnQuestionTypesENUM.figText) extractLrnQuestionData.figTextGrading(lrnGradingDataArr, index);
|
108
111
|
}
|
109
112
|
});
|
110
113
|
}
|
@@ -124,6 +127,7 @@ if (referenceIds.length > 0) {
|
|
124
127
|
case 'textEntryMath': return verifyIeQuestionData.textEntryMathGrading(questionData, index);
|
125
128
|
case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImageGrading(questionData, index);
|
126
129
|
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategoriesGrading(questionData, index);
|
130
|
+
case 'figText': return verifyIeQuestionData.figTextGrading(questionData, index);
|
127
131
|
default: throw new Error('Invalid ngie question type');
|
128
132
|
}
|
129
133
|
});
|
@@ -14,7 +14,7 @@ let lrnEssayResponseRegex = /Math essay with rich text|Essay with rich text/
|
|
14
14
|
let lrnQuestionDataArr = [];
|
15
15
|
let lrnGradingDataArr = [];
|
16
16
|
|
17
|
-
let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(
|
17
|
+
let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(182, 273);//["85f864fd-8ce9-4d9d-a326-afb13963d6bd", "6ff35364-0fb6-4cc4-b09c-426f6199e3d6", "d5644e39-1f23-4c4d-a6ad-f80fee66cb62"]
|
18
18
|
|
19
19
|
if (referenceIds.length > 0) {
|
20
20
|
describe('Migration item check for MCQ questions', () => {
|
@@ -63,6 +63,7 @@ if (referenceIds.length > 0) {
|
|
63
63
|
case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
|
64
64
|
case lrnQuestionTypesENUM.drawingResponse: return extractLrnQuestionData.drawingResponse(lrnQuestionDataArr, index);
|
65
65
|
case lrnQuestionTypesENUM.dndIntoCategories: return extractLrnQuestionData.dndIntoCategories(lrnQuestionDataArr, index);
|
66
|
+
case lrnQuestionTypesENUM.figText: return extractLrnQuestionData.figText(lrnQuestionDataArr, index);
|
66
67
|
default: throw new Error('Invalid lrn question type');
|
67
68
|
}
|
68
69
|
}
|
@@ -83,6 +84,7 @@ if (referenceIds.length > 0) {
|
|
83
84
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
84
85
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
85
86
|
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
87
|
+
case 'figText': return verifyIeQuestionData.figText(questionData, index);
|
86
88
|
default: throw new Error('Invalid ngie question type');
|
87
89
|
}
|
88
90
|
});
|
@@ -105,6 +107,7 @@ if (referenceIds.length > 0) {
|
|
105
107
|
else if (currQuestionType === lrnQuestionTypesENUM.textEntryMath) extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
|
106
108
|
else if (currQuestionType === lrnQuestionTypesENUM.textEntryMathImage) extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
|
107
109
|
else if (currQuestionType === lrnQuestionTypesENUM.dndIntoCategories) extractLrnQuestionData.dndIntoCategoriesGrading(lrnGradingDataArr, index);
|
110
|
+
else if (currQuestionType === lrnQuestionTypesENUM.figText) extractLrnQuestionData.figTextGrading(lrnGradingDataArr, index);
|
108
111
|
}
|
109
112
|
});
|
110
113
|
}
|
@@ -124,6 +127,7 @@ if (referenceIds.length > 0) {
|
|
124
127
|
case 'textEntryMath': return verifyIeQuestionData.textEntryMathGrading(questionData, index);
|
125
128
|
case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImageGrading(questionData, index);
|
126
129
|
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategoriesGrading(questionData, index);
|
130
|
+
case 'figText': return verifyIeQuestionData.figTextGrading(questionData, index);
|
127
131
|
default: throw new Error('Invalid ngie question type');
|
128
132
|
}
|
129
133
|
});
|
@@ -14,7 +14,7 @@ let lrnEssayResponseRegex = /Math essay with rich text|Essay with rich text/
|
|
14
14
|
let lrnQuestionDataArr = [];
|
15
15
|
let lrnGradingDataArr = [];
|
16
16
|
|
17
|
-
let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(
|
17
|
+
let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(273, 364);//["85f864fd-8ce9-4d9d-a326-afb13963d6bd", "6ff35364-0fb6-4cc4-b09c-426f6199e3d6", "d5644e39-1f23-4c4d-a6ad-f80fee66cb62"]
|
18
18
|
|
19
19
|
if (referenceIds.length > 0) {
|
20
20
|
describe('Migration item check for MCQ questions', () => {
|
@@ -63,6 +63,7 @@ if (referenceIds.length > 0) {
|
|
63
63
|
case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
|
64
64
|
case lrnQuestionTypesENUM.drawingResponse: return extractLrnQuestionData.drawingResponse(lrnQuestionDataArr, index);
|
65
65
|
case lrnQuestionTypesENUM.dndIntoCategories: return extractLrnQuestionData.dndIntoCategories(lrnQuestionDataArr, index);
|
66
|
+
case lrnQuestionTypesENUM.figText: return extractLrnQuestionData.figText(lrnQuestionDataArr, index);
|
66
67
|
default: throw new Error('Invalid lrn question type');
|
67
68
|
}
|
68
69
|
}
|
@@ -83,6 +84,7 @@ if (referenceIds.length > 0) {
|
|
83
84
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
84
85
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
85
86
|
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
87
|
+
case 'figText': return verifyIeQuestionData.figText(questionData, index);
|
86
88
|
default: throw new Error('Invalid ngie question type');
|
87
89
|
}
|
88
90
|
});
|
@@ -105,6 +107,7 @@ if (referenceIds.length > 0) {
|
|
105
107
|
else if (currQuestionType === lrnQuestionTypesENUM.textEntryMath) extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
|
106
108
|
else if (currQuestionType === lrnQuestionTypesENUM.textEntryMathImage) extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
|
107
109
|
else if (currQuestionType === lrnQuestionTypesENUM.dndIntoCategories) extractLrnQuestionData.dndIntoCategoriesGrading(lrnGradingDataArr, index);
|
110
|
+
else if (currQuestionType === lrnQuestionTypesENUM.figText) extractLrnQuestionData.figTextGrading(lrnGradingDataArr, index);
|
108
111
|
}
|
109
112
|
});
|
110
113
|
}
|
@@ -124,6 +127,7 @@ if (referenceIds.length > 0) {
|
|
124
127
|
case 'textEntryMath': return verifyIeQuestionData.textEntryMathGrading(questionData, index);
|
125
128
|
case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImageGrading(questionData, index);
|
126
129
|
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategoriesGrading(questionData, index);
|
130
|
+
case 'figText': return verifyIeQuestionData.figTextGrading(questionData, index);
|
127
131
|
default: throw new Error('Invalid ngie question type');
|
128
132
|
}
|
129
133
|
});
|
@@ -14,7 +14,7 @@ let lrnEssayResponseRegex = /Math essay with rich text|Essay with rich text/
|
|
14
14
|
let lrnQuestionDataArr = [];
|
15
15
|
let lrnGradingDataArr = [];
|
16
16
|
|
17
|
-
let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(
|
17
|
+
let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(364, 455);//["85f864fd-8ce9-4d9d-a326-afb13963d6bd", "6ff35364-0fb6-4cc4-b09c-426f6199e3d6", "d5644e39-1f23-4c4d-a6ad-f80fee66cb62"]
|
18
18
|
|
19
19
|
if (referenceIds.length > 0) {
|
20
20
|
describe('Migration item check for MCQ questions', () => {
|
@@ -63,6 +63,7 @@ if (referenceIds.length > 0) {
|
|
63
63
|
case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
|
64
64
|
case lrnQuestionTypesENUM.drawingResponse: return extractLrnQuestionData.drawingResponse(lrnQuestionDataArr, index);
|
65
65
|
case lrnQuestionTypesENUM.dndIntoCategories: return extractLrnQuestionData.dndIntoCategories(lrnQuestionDataArr, index);
|
66
|
+
case lrnQuestionTypesENUM.figText: return extractLrnQuestionData.figText(lrnQuestionDataArr, index);
|
66
67
|
default: throw new Error('Invalid lrn question type');
|
67
68
|
}
|
68
69
|
}
|
@@ -83,6 +84,7 @@ if (referenceIds.length > 0) {
|
|
83
84
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
84
85
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
85
86
|
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
87
|
+
case 'figText': return verifyIeQuestionData.figText(questionData, index);
|
86
88
|
default: throw new Error('Invalid ngie question type');
|
87
89
|
}
|
88
90
|
});
|
@@ -105,6 +107,7 @@ if (referenceIds.length > 0) {
|
|
105
107
|
else if (currQuestionType === lrnQuestionTypesENUM.textEntryMath) extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
|
106
108
|
else if (currQuestionType === lrnQuestionTypesENUM.textEntryMathImage) extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
|
107
109
|
else if (currQuestionType === lrnQuestionTypesENUM.dndIntoCategories) extractLrnQuestionData.dndIntoCategoriesGrading(lrnGradingDataArr, index);
|
110
|
+
else if (currQuestionType === lrnQuestionTypesENUM.figText) extractLrnQuestionData.figTextGrading(lrnGradingDataArr, index);
|
108
111
|
}
|
109
112
|
});
|
110
113
|
}
|
@@ -124,6 +127,7 @@ if (referenceIds.length > 0) {
|
|
124
127
|
case 'textEntryMath': return verifyIeQuestionData.textEntryMathGrading(questionData, index);
|
125
128
|
case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImageGrading(questionData, index);
|
126
129
|
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategoriesGrading(questionData, index);
|
130
|
+
case 'figText': return verifyIeQuestionData.figTextGrading(questionData, index);
|
127
131
|
default: throw new Error('Invalid ngie question type');
|
128
132
|
}
|
129
133
|
});
|
@@ -14,7 +14,7 @@ let lrnEssayResponseRegex = /Math essay with rich text|Essay with rich text/
|
|
14
14
|
let lrnQuestionDataArr = [];
|
15
15
|
let lrnGradingDataArr = [];
|
16
16
|
|
17
|
-
let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(
|
17
|
+
let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(455, 546);//["85f864fd-8ce9-4d9d-a326-afb13963d6bd", "6ff35364-0fb6-4cc4-b09c-426f6199e3d6", "d5644e39-1f23-4c4d-a6ad-f80fee66cb62"]
|
18
18
|
|
19
19
|
if (referenceIds.length > 0) {
|
20
20
|
describe('Migration item check for MCQ questions', () => {
|
@@ -63,6 +63,7 @@ if (referenceIds.length > 0) {
|
|
63
63
|
case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
|
64
64
|
case lrnQuestionTypesENUM.drawingResponse: return extractLrnQuestionData.drawingResponse(lrnQuestionDataArr, index);
|
65
65
|
case lrnQuestionTypesENUM.dndIntoCategories: return extractLrnQuestionData.dndIntoCategories(lrnQuestionDataArr, index);
|
66
|
+
case lrnQuestionTypesENUM.figText: return extractLrnQuestionData.figText(lrnQuestionDataArr, index);
|
66
67
|
default: throw new Error('Invalid lrn question type');
|
67
68
|
}
|
68
69
|
}
|
@@ -83,6 +84,7 @@ if (referenceIds.length > 0) {
|
|
83
84
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
84
85
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
85
86
|
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
87
|
+
case 'figText': return verifyIeQuestionData.figText(questionData, index);
|
86
88
|
default: throw new Error('Invalid ngie question type');
|
87
89
|
}
|
88
90
|
});
|
@@ -105,6 +107,7 @@ if (referenceIds.length > 0) {
|
|
105
107
|
else if (currQuestionType === lrnQuestionTypesENUM.textEntryMath) extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
|
106
108
|
else if (currQuestionType === lrnQuestionTypesENUM.textEntryMathImage) extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
|
107
109
|
else if (currQuestionType === lrnQuestionTypesENUM.dndIntoCategories) extractLrnQuestionData.dndIntoCategoriesGrading(lrnGradingDataArr, index);
|
110
|
+
else if (currQuestionType === lrnQuestionTypesENUM.figText) extractLrnQuestionData.figTextGrading(lrnGradingDataArr, index);
|
108
111
|
}
|
109
112
|
});
|
110
113
|
}
|
@@ -124,6 +127,7 @@ if (referenceIds.length > 0) {
|
|
124
127
|
case 'textEntryMath': return verifyIeQuestionData.textEntryMathGrading(questionData, index);
|
125
128
|
case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImageGrading(questionData, index);
|
126
129
|
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategoriesGrading(questionData, index);
|
130
|
+
case 'figText': return verifyIeQuestionData.figTextGrading(questionData, index);
|
127
131
|
default: throw new Error('Invalid ngie question type');
|
128
132
|
}
|
129
133
|
});
|
@@ -14,7 +14,7 @@ let lrnEssayResponseRegex = /Math essay with rich text|Essay with rich text/
|
|
14
14
|
let lrnQuestionDataArr = [];
|
15
15
|
let lrnGradingDataArr = [];
|
16
16
|
|
17
|
-
let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(
|
17
|
+
let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(546, 637);//["85f864fd-8ce9-4d9d-a326-afb13963d6bd", "6ff35364-0fb6-4cc4-b09c-426f6199e3d6", "d5644e39-1f23-4c4d-a6ad-f80fee66cb62"]
|
18
18
|
|
19
19
|
if (referenceIds.length > 0) {
|
20
20
|
describe('Migration item check for MCQ questions', () => {
|
@@ -63,6 +63,7 @@ if (referenceIds.length > 0) {
|
|
63
63
|
case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
|
64
64
|
case lrnQuestionTypesENUM.drawingResponse: return extractLrnQuestionData.drawingResponse(lrnQuestionDataArr, index);
|
65
65
|
case lrnQuestionTypesENUM.dndIntoCategories: return extractLrnQuestionData.dndIntoCategories(lrnQuestionDataArr, index);
|
66
|
+
case lrnQuestionTypesENUM.figText: return extractLrnQuestionData.figText(lrnQuestionDataArr, index);
|
66
67
|
default: throw new Error('Invalid lrn question type');
|
67
68
|
}
|
68
69
|
}
|
@@ -83,6 +84,7 @@ if (referenceIds.length > 0) {
|
|
83
84
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
84
85
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
85
86
|
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
87
|
+
case 'figText': return verifyIeQuestionData.figText(questionData, index);
|
86
88
|
default: throw new Error('Invalid ngie question type');
|
87
89
|
}
|
88
90
|
});
|
@@ -105,6 +107,7 @@ if (referenceIds.length > 0) {
|
|
105
107
|
else if (currQuestionType === lrnQuestionTypesENUM.textEntryMath) extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
|
106
108
|
else if (currQuestionType === lrnQuestionTypesENUM.textEntryMathImage) extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
|
107
109
|
else if (currQuestionType === lrnQuestionTypesENUM.dndIntoCategories) extractLrnQuestionData.dndIntoCategoriesGrading(lrnGradingDataArr, index);
|
110
|
+
else if (currQuestionType === lrnQuestionTypesENUM.figText) extractLrnQuestionData.figTextGrading(lrnGradingDataArr, index);
|
108
111
|
}
|
109
112
|
});
|
110
113
|
}
|
@@ -124,6 +127,7 @@ if (referenceIds.length > 0) {
|
|
124
127
|
case 'textEntryMath': return verifyIeQuestionData.textEntryMathGrading(questionData, index);
|
125
128
|
case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImageGrading(questionData, index);
|
126
129
|
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategoriesGrading(questionData, index);
|
130
|
+
case 'figText': return verifyIeQuestionData.figTextGrading(questionData, index);
|
127
131
|
default: throw new Error('Invalid ngie question type');
|
128
132
|
}
|
129
133
|
});
|
@@ -14,7 +14,7 @@ let lrnEssayResponseRegex = /Math essay with rich text|Essay with rich text/
|
|
14
14
|
let lrnQuestionDataArr = [];
|
15
15
|
let lrnGradingDataArr = [];
|
16
16
|
|
17
|
-
let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(
|
17
|
+
let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(637, 728);//["85f864fd-8ce9-4d9d-a326-afb13963d6bd", "6ff35364-0fb6-4cc4-b09c-426f6199e3d6", "d5644e39-1f23-4c4d-a6ad-f80fee66cb62"]
|
18
18
|
|
19
19
|
if (referenceIds.length > 0) {
|
20
20
|
describe('Migration item check for MCQ questions', () => {
|
@@ -63,6 +63,7 @@ if (referenceIds.length > 0) {
|
|
63
63
|
case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
|
64
64
|
case lrnQuestionTypesENUM.drawingResponse: return extractLrnQuestionData.drawingResponse(lrnQuestionDataArr, index);
|
65
65
|
case lrnQuestionTypesENUM.dndIntoCategories: return extractLrnQuestionData.dndIntoCategories(lrnQuestionDataArr, index);
|
66
|
+
case lrnQuestionTypesENUM.figText: return extractLrnQuestionData.figText(lrnQuestionDataArr, index);
|
66
67
|
default: throw new Error('Invalid lrn question type');
|
67
68
|
}
|
68
69
|
}
|
@@ -83,6 +84,7 @@ if (referenceIds.length > 0) {
|
|
83
84
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
84
85
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
85
86
|
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
87
|
+
case 'figText': return verifyIeQuestionData.figText(questionData, index);
|
86
88
|
default: throw new Error('Invalid ngie question type');
|
87
89
|
}
|
88
90
|
});
|
@@ -105,6 +107,7 @@ if (referenceIds.length > 0) {
|
|
105
107
|
else if (currQuestionType === lrnQuestionTypesENUM.textEntryMath) extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
|
106
108
|
else if (currQuestionType === lrnQuestionTypesENUM.textEntryMathImage) extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
|
107
109
|
else if (currQuestionType === lrnQuestionTypesENUM.dndIntoCategories) extractLrnQuestionData.dndIntoCategoriesGrading(lrnGradingDataArr, index);
|
110
|
+
else if (currQuestionType === lrnQuestionTypesENUM.figText) extractLrnQuestionData.figTextGrading(lrnGradingDataArr, index);
|
108
111
|
}
|
109
112
|
});
|
110
113
|
}
|
@@ -124,6 +127,7 @@ if (referenceIds.length > 0) {
|
|
124
127
|
case 'textEntryMath': return verifyIeQuestionData.textEntryMathGrading(questionData, index);
|
125
128
|
case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImageGrading(questionData, index);
|
126
129
|
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategoriesGrading(questionData, index);
|
130
|
+
case 'figText': return verifyIeQuestionData.figTextGrading(questionData, index);
|
127
131
|
default: throw new Error('Invalid ngie question type');
|
128
132
|
}
|
129
133
|
});
|
@@ -14,7 +14,7 @@ let lrnEssayResponseRegex = /Math essay with rich text|Essay with rich text/
|
|
14
14
|
let lrnQuestionDataArr = [];
|
15
15
|
let lrnGradingDataArr = [];
|
16
16
|
|
17
|
-
let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(
|
17
|
+
let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(728, 819);//["85f864fd-8ce9-4d9d-a326-afb13963d6bd", "6ff35364-0fb6-4cc4-b09c-426f6199e3d6", "d5644e39-1f23-4c4d-a6ad-f80fee66cb62"]
|
18
18
|
|
19
19
|
if (referenceIds.length > 0) {
|
20
20
|
describe('Migration item check for MCQ questions', () => {
|
@@ -63,6 +63,7 @@ if (referenceIds.length > 0) {
|
|
63
63
|
case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
|
64
64
|
case lrnQuestionTypesENUM.drawingResponse: return extractLrnQuestionData.drawingResponse(lrnQuestionDataArr, index);
|
65
65
|
case lrnQuestionTypesENUM.dndIntoCategories: return extractLrnQuestionData.dndIntoCategories(lrnQuestionDataArr, index);
|
66
|
+
case lrnQuestionTypesENUM.figText: return extractLrnQuestionData.figText(lrnQuestionDataArr, index);
|
66
67
|
default: throw new Error('Invalid lrn question type');
|
67
68
|
}
|
68
69
|
}
|
@@ -83,6 +84,7 @@ if (referenceIds.length > 0) {
|
|
83
84
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
84
85
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
85
86
|
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
87
|
+
case 'figText': return verifyIeQuestionData.figText(questionData, index);
|
86
88
|
default: throw new Error('Invalid ngie question type');
|
87
89
|
}
|
88
90
|
});
|
@@ -105,6 +107,7 @@ if (referenceIds.length > 0) {
|
|
105
107
|
else if (currQuestionType === lrnQuestionTypesENUM.textEntryMath) extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
|
106
108
|
else if (currQuestionType === lrnQuestionTypesENUM.textEntryMathImage) extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
|
107
109
|
else if (currQuestionType === lrnQuestionTypesENUM.dndIntoCategories) extractLrnQuestionData.dndIntoCategoriesGrading(lrnGradingDataArr, index);
|
110
|
+
else if (currQuestionType === lrnQuestionTypesENUM.figText) extractLrnQuestionData.figTextGrading(lrnGradingDataArr, index);
|
108
111
|
}
|
109
112
|
});
|
110
113
|
}
|
@@ -124,6 +127,7 @@ if (referenceIds.length > 0) {
|
|
124
127
|
case 'textEntryMath': return verifyIeQuestionData.textEntryMathGrading(questionData, index);
|
125
128
|
case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImageGrading(questionData, index);
|
126
129
|
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategoriesGrading(questionData, index);
|
130
|
+
case 'figText': return verifyIeQuestionData.figTextGrading(questionData, index);
|
127
131
|
default: throw new Error('Invalid ngie question type');
|
128
132
|
}
|
129
133
|
});
|
@@ -8,7 +8,7 @@ export const lrnPage = {
|
|
8
8
|
questionsLoader: () => cy.get('.lrn-spinner'),
|
9
9
|
showAnswersToggle: () => cy.get('.lrn-author-validate-questions-toggle'),
|
10
10
|
clozeMathResponseWrapper: () => cy.get('.lrn_cloze_response_container'),
|
11
|
-
|
11
|
+
clozeResponse: () => cy.get('.lrn_cloze_response'),
|
12
12
|
clozeMathCorrectAnswerMathMl: () => cy.get('.lrn_correctAnswerList math'),
|
13
13
|
correctAnswersResponseText: () => cy.get('.lrn_responseText'),
|
14
14
|
backgroundCanvasImage: () => cy.get('.lrn_imagecloze_image'),
|
@@ -25,6 +25,7 @@ export const lrnPage = {
|
|
25
25
|
draggableResponse: () => cy.get('[aria-label="Possible responses"] .lrn_btn_drag'),
|
26
26
|
draggableResponseImage: () => cy.get('[aria-label="Possible responses"] .lrn_btn_drag img'),
|
27
27
|
draggableResponseMathMl: () => cy.get('[aria-label="Possible responses"] .lrn_btn_drag math'),
|
28
|
+
questionContainerPreviewTab: () => cy.get('.lrn_response_input'),
|
28
29
|
steps: {
|
29
30
|
checkShowAnswersToggle: () => {
|
30
31
|
lrnPage.showAnswersToggle()
|
@@ -154,7 +155,7 @@ export const extractLrnQuestionData = {
|
|
154
155
|
let innerText = $question[0].innerText;
|
155
156
|
obj.previewQuestion = innerText;
|
156
157
|
});
|
157
|
-
lrnPage.
|
158
|
+
lrnPage.clozeResponse()
|
158
159
|
.then(($responseFields) => {
|
159
160
|
obj.previewResponseCount = $responseFields.length;
|
160
161
|
});
|
@@ -180,7 +181,7 @@ export const extractLrnQuestionData = {
|
|
180
181
|
let innerText = $question[0].innerText;
|
181
182
|
obj.gradingQuestion = innerText;
|
182
183
|
});
|
183
|
-
lrnPage.
|
184
|
+
lrnPage.clozeResponse()
|
184
185
|
.then(($responseFields) => {
|
185
186
|
obj.gradingResponseCount = $responseFields.length;
|
186
187
|
});
|
@@ -216,7 +217,7 @@ export const extractLrnQuestionData = {
|
|
216
217
|
let text = $ins[0].innerText;
|
217
218
|
obj.previewQuestionInstructions = text;
|
218
219
|
});
|
219
|
-
lrnPage.
|
220
|
+
lrnPage.clozeResponse()
|
220
221
|
.then(($responseFields) => {
|
221
222
|
obj.previewResponseCount = $responseFields.length;
|
222
223
|
});
|
@@ -247,7 +248,7 @@ export const extractLrnQuestionData = {
|
|
247
248
|
let innerText = $question[0].innerText;
|
248
249
|
obj.gradingQuestion = innerText;
|
249
250
|
});
|
250
|
-
lrnPage.
|
251
|
+
lrnPage.clozeResponse()
|
251
252
|
.then(($responseFields) => {
|
252
253
|
obj.gradingResponseCount = $responseFields.length;
|
253
254
|
});
|
@@ -501,6 +502,66 @@ export const extractLrnQuestionData = {
|
|
501
502
|
lrnGradingDataArr.push(obj);
|
502
503
|
},
|
503
504
|
|
505
|
+
figText: (lrnQuestionDataArr, index) => {
|
506
|
+
let obj = {};
|
507
|
+
cy.log(`Extracting the question instructions, question and response count from question ${index}`);
|
508
|
+
obj.questionIndex = index;
|
509
|
+
obj.questionType = 'figText';
|
510
|
+
lrnPage.questionWrapper()
|
511
|
+
.eq(index)
|
512
|
+
.within(() => {
|
513
|
+
lrnPage.questionInstructions()
|
514
|
+
.then(($ins) => {
|
515
|
+
let text = $ins[0].innerText;
|
516
|
+
obj.previewQuestionInstructions = text;
|
517
|
+
});
|
518
|
+
lrnPage.questionContainerPreviewTab()
|
519
|
+
.then(($question) => {
|
520
|
+
let innerText = $question[0].innerText;
|
521
|
+
innerText = innerText.replace(/\n/g, '');
|
522
|
+
//getting rid of the and ​
|
523
|
+
innerText = innerText.replace(/\u00a0/g, ' ');
|
524
|
+
innerText = innerText.replace(/\u200b/g, '');
|
525
|
+
obj.previewQuestion = innerText;
|
526
|
+
});
|
527
|
+
lrnPage.clozeResponse()
|
528
|
+
.then(($responseFields) => {
|
529
|
+
obj.previewResponseCount = $responseFields.length;
|
530
|
+
});
|
531
|
+
});
|
532
|
+
lrnQuestionDataArr.push(obj);
|
533
|
+
},
|
534
|
+
|
535
|
+
figTextGrading: (lrnQuestionDataArr, index) => {
|
536
|
+
let obj = {};
|
537
|
+
cy.log(`Extracting the question instructions, question and response count from question ${index}`);
|
538
|
+
obj.questionIndex = index;
|
539
|
+
obj.questionType = 'figText';
|
540
|
+
lrnPage.questionWrapper()
|
541
|
+
.eq(index)
|
542
|
+
.within(() => {
|
543
|
+
lrnPage.questionInstructions()
|
544
|
+
.then(($ins) => {
|
545
|
+
let text = $ins[0].innerText;
|
546
|
+
obj.previewQuestionInstructions = text;
|
547
|
+
});
|
548
|
+
lrnPage.questionContainerPreviewTab()
|
549
|
+
.then(($question) => {
|
550
|
+
let innerText = $question[0].innerText;
|
551
|
+
innerText = innerText.replace(/\n/g, '');
|
552
|
+
innerText = innerText.replace(/Response area/g, '');
|
553
|
+
//getting rid of the and ​
|
554
|
+
innerText = innerText.replace(/\u00a0/g, ' ');
|
555
|
+
innerText = innerText.replace(/\u200b/g, '');
|
556
|
+
obj.previewQuestion = innerText;
|
557
|
+
});
|
558
|
+
lrnPage.clozeResponse()
|
559
|
+
.then(($responseFields) => {
|
560
|
+
obj.previewResponseCount = $responseFields.length;
|
561
|
+
});
|
562
|
+
});
|
563
|
+
lrnQuestionDataArr.push(obj);
|
564
|
+
},
|
504
565
|
|
505
566
|
/* singleSelection: (lrnQuestionDataArr, index) => {
|
506
567
|
let obj = {};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { essayResponsePage, multipleSelectionPage } from "../../pages";
|
1
|
+
import { essayResponsePage, fillInTheGapsTextPage, multipleSelectionPage } from "../../pages";
|
2
2
|
import { draggableOptionContainer } from "../../pages/components";
|
3
3
|
import { singleSelectionPage } from "../../pages/singleSelectionPage"
|
4
4
|
import utilities from "../helpers/utilities";
|
@@ -372,6 +372,48 @@ export const verifyIeQuestionData = {
|
|
372
372
|
});
|
373
373
|
},
|
374
374
|
|
375
|
+
figText: (expectedQuestionData, index) => {
|
376
|
+
cy.get('.ngie-cloze-with-text')
|
377
|
+
.eq(index)
|
378
|
+
.within(() => {
|
379
|
+
utilities.verifyInnerText(singleSelectionPage.questionInstructionsText(), expectedQuestionData.previewQuestionInstructions);
|
380
|
+
fillInTheGapsTextPage.questionContainerPreviewTab()
|
381
|
+
.then(($question) => {
|
382
|
+
let innerText = $question[0].innerText;
|
383
|
+
innerText = innerText.replace(/\n/g, '');
|
384
|
+
//getting rid of the and ​
|
385
|
+
innerText = innerText.replace(/\u00a0/g, ' ');
|
386
|
+
innerText = innerText.replace(/\u200b/g, '');
|
387
|
+
expect(expectedQuestionData.previewQuestion).to.be.eq(innerText);
|
388
|
+
});
|
389
|
+
cy.get('.response-input-field')
|
390
|
+
.then(($resposneWrapper) => {
|
391
|
+
expect($resposneWrapper.length).to.be.eq(expectedQuestionData.previewResponseCount);
|
392
|
+
});
|
393
|
+
});
|
394
|
+
},
|
395
|
+
|
396
|
+
figTextGrading: (expectedQuestionData, index) => {
|
397
|
+
cy.get('.ngie-cloze-with-text')
|
398
|
+
.eq(index)
|
399
|
+
.within(() => {
|
400
|
+
utilities.verifyInnerText(singleSelectionPage.questionInstructionsText(), expectedQuestionData.previewQuestionInstructions);
|
401
|
+
fillInTheGapsTextPage.questionContainerPreviewTab()
|
402
|
+
.then(($question) => {
|
403
|
+
let innerText = $question[0].innerText;
|
404
|
+
innerText = innerText.replace(/\n/g, '');
|
405
|
+
//getting rid of the and ​
|
406
|
+
innerText = innerText.replace(/\u00a0/g, ' ');
|
407
|
+
innerText = innerText.replace(/\u200b/g, '');
|
408
|
+
expect(expectedQuestionData.previewQuestion).to.be.eq(innerText);
|
409
|
+
});
|
410
|
+
cy.get('.response-input-field')
|
411
|
+
.then(($resposneWrapper) => {
|
412
|
+
expect($resposneWrapper.length).to.be.eq(expectedQuestionData.previewResponseCount);
|
413
|
+
});
|
414
|
+
});
|
415
|
+
},
|
416
|
+
|
375
417
|
/* singleSelection: (expectedQuestionData, index) => {
|
376
418
|
cy.get('.ngie-single-select')
|
377
419
|
.eq(index)
|
package/deploy/e2e/deploy.yaml
CHANGED