itemengine-cypress-automation 1.0.101 → 1.0.103
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/migration/migration.js +74 -157
- package/cypress/e2e/migration/migration2.js +74 -83
- package/cypress/e2e/migration/migration3.js +73 -85
- package/cypress/e2e/migration/migration4.js +74 -86
- package/cypress/e2e/migration/migration5.js +2 -16
- package/cypress.config.js +5 -0
- package/package.json +2 -1
- package/scripts/migrationLocal.mjs +3 -0
- package/scripts/sorry-cypress.mjs +19 -0
@@ -35,182 +35,99 @@ Cypress.Commands.add('lazyLoadPreviewQuestions', (count, retries = 5) => {
|
|
35
35
|
cy.learnosityLoaderWait();
|
36
36
|
})
|
37
37
|
|
38
|
-
const migrationQuestionTypes = /* ['singleSelection', 'essayResponseMath']; */
|
38
|
+
const migrationQuestionTypes = Cypress.env('migrationQuestionTypes'); /* ['singleSelection', 'essayResponseMath']; */
|
39
39
|
const migrationQuestionTypesLrn = migrationQuestionTypes.map((questionType) => lrnQuestionTypesENUM[questionType]);
|
40
40
|
|
41
|
-
console.log('migrationQuestionTypes', Cypress.env('migrationQuestionTypes'))
|
42
|
-
console.log('referenceIds', Cypress.env('referenceIds'))
|
43
|
-
|
44
41
|
let lrnQuestionDataArr = [];
|
45
42
|
let lrnGradingDataArr = [];
|
46
43
|
|
47
|
-
|
48
|
-
// '929f0262-f490-4c4d-af7c-365ff8ee514e',
|
49
|
-
// '7fcf5cf2-139d-4146-ad5e-b2a475c944ab',
|
50
|
-
// // '8ceccf29-1a55-47c1-9321-6fb0db787d70',
|
51
|
-
// // '5e62bdab-7f2d-4a3d-ab66-868e62c22626',
|
52
|
-
// // '514d8c3a-495b-4dcd-87d0-aa289a9f415d',
|
53
|
-
// // 'e582071d-e4c9-403b-beea-8ccff93b06ea',
|
54
|
-
// 'a98ad5c4-f70a-44ac-89bc-da72248fdba5',
|
55
|
-
// ]
|
56
|
-
|
57
|
-
let referenceIds = ["#1 1.NBT.B.2a Number Operations in Base Ten Number Operations in Base Ten Math 01","#2 2.OA.A.1 Operations Algebraic Thinking Operations Algebraic Thinking Math 02","#3 2.NBT.B.8 Number Operations in Base Ten Number Operations in Base Ten Math 02","#4 3.OA.A.2 Operations Algebraic Thinking Operations Algebraic Thinking Math 03","#5 3.NBT.A.2 Number Operations in Base Ten Number Operations in Base Ten Math 03","#6 2.NBT.A.3 Number Operations in Base Ten Number Operations in Base Ten Math 02","#7 2.OA.A.1 Operations Algebraic Thinking Operations Algebraic Thinking Math 02","#8 2.OA.A.1 Operations Algebraic Thinking Operations Algebraic Thinking Math 02","#9 2.MD.C.8 Measurement Data Measurement Data Math 02","#10 2.MD.C.7 Measurement Data Measurement Data Math 02","#11 1.OA.D.7 Operations Algebraic Thinking Operations Algebraic Thinking Math 01","#12 2.MD.D.10 Measurement Data Measurement Data Math 02","#13 2.NBT.A.1 Number Operations in Base Ten Number Operations in Base Ten Math 02","#14 4.MD.A.2 Measurement Data Measurement Data Math 04","#15 3.NF.A.3a Number Operations Fractions Number Operations Fractions Math 03","#16 3.NBT.A.2 Number Operations in Base Ten Number Operations in Base Ten Math 03","#17 4.MD.A.2 Measurement Data Measurement Data Math 04","#18 3.G.A.1 Geometry Geometry Math 03","#19 4.MD.A.3 Measurement Data Measurement Data Math 04","#20 4.MD.A.2 Measurement Data Measurement Data Math 04","#21 3.OA.A.4 Operations Algebraic Thinking Operations Algebraic Thinking Math 03","#22 4.NBT.A.2 Number Operations in Base Ten Number Operations in Base Ten Math 04","#23 3.NF.A.3 Number Operations Fractions Number Operations Fractions Math 03","#24 3.OA.D.8 Operations Algebraic Thinking Operations Algebraic Thinking Math 03","#25 3.NBT.A.2 Number Operations in Base Ten Number Operations in Base Ten Math 03","#26 3.OA.A.3 Operations Algebraic Thinking Operations Algebraic Thinking Math 03","#27 4.MD.A.2 Measurement Data Measurement Data Math 04","#28 4.OA.A.3 Operations Algebraic Thinking Operations Algebraic Thinking Math 04","#29 4.MD.A.2 Measurement Data Measurement Data Math 04","#30 4.OA.C.5 Operations Algebraic Thinking Operations Algebraic Thinking Math 04","#31 4.NBT.A.2 Number Operations in Base Ten Number Operations in Base Ten Math 04","#32 3.NF.A.3a Number Operations Fractions Number Operations Fractions Math 03","#33 4.MD.A.2 Measurement Data Measurement Data Math 04","#34 4.MD.A.2 Measurement Data Measurement Data Math 04","#35 4.OA.C.5 Operations Algebraic Thinking Operations Algebraic Thinking Math 04","#36 4.OA.C.5 Operations Algebraic Thinking Operations Algebraic Thinking Math 04","#37 2.NBT.B.7 Number Operations in Base Ten Number Operations in Base Ten Math 02","#38 2.MD.D.10 Measurement Data Measurement Data Math 02","#39 4.NBT.A.2 Number Operations in Base Ten Number Operations in Base Ten Math 04","#40 3.OA.A.2 Operations Algebraic Thinking Operations Algebraic Thinking Math 03","#41 4.NF.B.3 Number Operations Fractions Number Operations Fractions Math 04","#42 5.NBT.B.7 Number Operations in Base Ten Number Operations in Base Ten Math 05","#43 4.MD.A.3 Measurement Data Measurement Data Math 04","#44 4.OA.A.3 Operations Algebraic Thinking Operations Algebraic Thinking Math 04","#45 3.OA.A.3 Operations Algebraic Thinking Operations Algebraic Thinking Math 03","#46 4.OA.A.3 Operations Algebraic Thinking Operations Algebraic Thinking Math 04","#47 4.NF.A.1 Number Operations Fractions Number Operations Fractions Math 04","#48 4.NBT.B.4 Number Operations in Base Ten Number Operations in Base Ten Math 04","#49 3.NF.A.2b Number Operations Fractions Number Operations Fractions Math 03","#50 3.NF.A.3 3.NF.A.3d 4.NF.A.2 Number Operations Fractions Number Operations Fractions Math 03 04","#51 5.OA.A.2 Operations Algebraic Thinking Operations Algebraic Thinking Math 05","#52 4.MD.A.2 Measurement Data Measurement Data Math 04","#53 4.G.A.1 Geometry Geometry Math 04","#54 2.MD.D.10 Measurement Data Measurement Data Math 02","#55 3.OA.A.3 Operations Algebraic Thinking Operations Algebraic Thinking Math 03","#56 3.NF.A.1 Number Operations Fractions Number Operations Fractions Math 03","#57 4.MD.A.2 Measurement Data Measurement Data Math 04","#58 2.G.A.1 Geometry Geometry Math 02","#59 4.MD.A.2 Measurement Data Measurement Data Math 04","#60 5.OA.A.1 Operations Algebraic Thinking Operations Algebraic Thinking Math 05","#61 2.MD.D.10 Measurement Data Measurement Data Math 02","#62 6.SP.B.5c Statistics Probability Statistics Probability Math 06","#63 4.NBT.A.2 Number Operations in Base Ten Number Operations in Base Ten Math 04","#64 4.MD.B.4 Measurement Data Measurement Data Math 04","#65 4.OA.A.3 Operations Algebraic Thinking Operations Algebraic Thinking Math 04","#66 4.OA.B.4 Operations Algebraic Thinking Operations Algebraic Thinking Math 04","#67 5.G.B.3 Geometry Geometry Math 05","#68 3.G.A.1 Geometry Geometry Math 03","#69 6.G.A.1 Geometry Geometry Math 06","#70 6.SP.B.5 Statistics Probability Statistics Probability Math 06","#71 6.RP.A.3b Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#72 6.SP.B.5 Statistics Probability Statistics Probability Math 06","#73 4.NF.B.3d Number Operations Fractions Number Operations Fractions Math 04","#74 4.NF.C.7 Number Operations Fractions Number Operations Fractions Math 04","#75 4.OA.A.3 Operations Algebraic Thinking Operations Algebraic Thinking Math 04","#76 5.NF.A.2 Number Operations Fractions Number Operations Fractions Math 05","#77 4.MD.A.2 Measurement Data Measurement Data Math 04","#78 4.MD.A.3 Measurement Data Measurement Data Math 04","#79 4.MD.A.3 Measurement Data Measurement Data Math 04","#80 5.MD.A.1 Measurement Data Measurement Data Math 05","#81 6.EE.B.5 Expressions Equations Expressions Equations Math 06","#82 6.EE.B.5 Expressions Equations Expressions Equations Math 06","#83 6.RP.A.3c Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#84 6.RP.A.3b Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#85 4.OA.A.3 Operations Algebraic Thinking Operations Algebraic Thinking Math 04","#86 5.NF.A.1 Number Operations Fractions Number Operations Fractions Math 05","#87 6.RP.A.3b Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#88 3.G.A.1 Geometry Geometry Math 03","#89 6.RP.A.3a Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#90 6.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#91 6.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#92 6.RP.A.3c Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#93 5.NBT.A.3 Number Operations in Base Ten Number Operations in Base Ten Math 05","#94 3.MD.D.8 Measurement Data Measurement Data Math 03","#95 7.EE.B.3 Expressions Equations Expressions Equations Math 07","#96 6.EE.B.6 Expressions Equations Expressions Equations Math 06","#97 6.RP.A.3 6.RP.A.3a Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#98 6.RP.A.2 Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#99 6.EE.A.2 6.EE.A.2c Expressions Equations Expressions Equations Math 06","#100 5.OA.A.1 Operations Algebraic Thinking Operations Algebraic Thinking Math 05"];
|
44
|
+
let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(0, 100);
|
58
45
|
|
46
|
+
if (referenceIds.length > 0) {
|
47
|
+
describe('Migration item check for MCQ questions', () => {
|
48
|
+
before(() => {
|
49
|
+
cy.loginAs('technicalTester');
|
50
|
+
});
|
59
51
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
cy.pageLoadWait('getItemPreview');
|
72
|
-
cy.get('@getItemPreview').then((req) => {
|
73
|
-
let questionCount = req.response.body.data.getItemPreview.item.questionParts.length;
|
74
|
-
cy.lazyLoadPreviewQuestions(questionCount);
|
52
|
+
referenceIds.forEach((referenceId) => {
|
53
|
+
describe(`Migration item check for item "${referenceId}"`, () => {
|
54
|
+
before(() => {
|
55
|
+
cy.interceptGraphql('getItemPreview');
|
56
|
+
cy.setGraphqlWait();
|
57
|
+
cy.visit(`/items-list/item/${utilities.base64Encoding(referenceId)}`);
|
58
|
+
cy.pageLoadWait('getItemPreview');
|
59
|
+
cy.get('@getItemPreview').then((req) => {
|
60
|
+
let questionCount = req.response.body.data.getItemPreview.item.questionParts.length;
|
61
|
+
cy.lazyLoadPreviewQuestions(questionCount);
|
62
|
+
});
|
75
63
|
});
|
76
|
-
});
|
77
64
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
65
|
+
after(() => {
|
66
|
+
console.log(lrnQuestionDataArr)
|
67
|
+
lrnQuestionDataArr = [];
|
68
|
+
lrnGradingDataArr = [];
|
69
|
+
});
|
83
70
|
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
71
|
+
it(`Extracting learnosity preview data for item "${referenceId}"`, () => {
|
72
|
+
lrnPage.questionTypeDiv()
|
73
|
+
.each(($el, index) => {
|
74
|
+
let currQuestionType = $el[0].innerText
|
75
|
+
if (migrationQuestionTypesLrn.includes(currQuestionType)) {
|
76
|
+
switch (currQuestionType) {
|
77
|
+
case lrnQuestionTypesENUM.singleSelection: return extractLrnQuestionData.singleSelection(lrnQuestionDataArr, index);
|
78
|
+
case lrnQuestionTypesENUM.essayResponseMath: return extractLrnQuestionData.essayResponseMath(lrnQuestionDataArr, index);
|
79
|
+
default: throw new Error('Invalid lrn question type');
|
80
|
+
}
|
93
81
|
}
|
94
|
-
}
|
95
|
-
|
96
|
-
});
|
82
|
+
});
|
83
|
+
});
|
97
84
|
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
85
|
+
it(`Verifying itemengine preview data for item "${referenceId}"`, () => {
|
86
|
+
migrationQuestionTypes.forEach((questionType) => {
|
87
|
+
cy.log(`Verifying data for all ${questionType} question type`);
|
88
|
+
let currQuestionTypeArr = lrnQuestionDataArr.filter((question) => question.questionType === questionType);
|
89
|
+
currQuestionTypeArr.forEach((questionData, index) => {
|
90
|
+
cy.log(`Verifying data for ${questionType} ${index}`);
|
91
|
+
switch (questionType) {
|
92
|
+
case 'singleSelection': return verifyIeQuestionData.singleSelection(questionData, index);
|
93
|
+
case 'essayResponseMath': return verifyIeQuestionData.essayResponseMath(questionData, index);
|
94
|
+
default: throw new Error('Invalid ngie question type');
|
95
|
+
}
|
96
|
+
});
|
109
97
|
});
|
110
98
|
});
|
111
|
-
});
|
112
99
|
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
100
|
+
it(`Extracting learnosity grading data for item "${referenceId}"`, () => {
|
101
|
+
lrnPage.steps.checkShowAnswersToggle();
|
102
|
+
lrnPage.questionTypeDiv()
|
103
|
+
.each(($el, index) => {
|
104
|
+
let currQuestionType = $el[0].innerText
|
105
|
+
if (migrationQuestionTypesLrn.includes(currQuestionType)) {
|
106
|
+
switch (currQuestionType) {
|
107
|
+
case lrnQuestionTypesENUM.singleSelection: return extractLrnQuestionData.singleSelectionGrading(lrnGradingDataArr, index);
|
108
|
+
// case lrnQuestionTypesENUM.essayResponseMath: return extractLrnQuestionData.essayResponseMath(lrnQuestionDataArr, index);
|
109
|
+
default: throw new Error('Invalid lrn question type');
|
110
|
+
}
|
123
111
|
}
|
124
|
-
}
|
125
|
-
|
126
|
-
});
|
112
|
+
});
|
113
|
+
});
|
127
114
|
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
115
|
+
it(`Verifying itemengine grading data for item "${referenceId}"`, () => {
|
116
|
+
autoScoredScoringPreviewTab.steps.switchToGradingView();
|
117
|
+
migrationQuestionTypes.forEach((questionType) => {
|
118
|
+
cy.log(`Verifying grading data for all ${questionType} question type`);
|
119
|
+
let currQuestionTypeArr = lrnGradingDataArr.filter((question) => question.questionType === questionType);
|
120
|
+
currQuestionTypeArr.forEach((questionData, index) => {
|
121
|
+
cy.log(`Verifying grading data for ${questionType} ${index}`);
|
122
|
+
switch (questionType) {
|
123
|
+
case 'singleSelection': return verifyIeQuestionData.singleSelectionGrading(questionData, index);
|
124
|
+
// case 'essayResponseMath': return verifyIeQuestionData.essayResponseMath(questionData, index);
|
125
|
+
default: throw new Error('Invalid ngie question type');
|
126
|
+
}
|
127
|
+
});
|
140
128
|
});
|
141
129
|
});
|
142
130
|
});
|
143
131
|
});
|
144
132
|
});
|
145
|
-
}
|
146
|
-
|
147
|
-
|
148
|
-
//command:
|
149
|
-
//npx cypress open --env fileConfig=ilqa,migrationQuestionTypes='["singleSelection","essayResponseMath"]',referenceIds='["929f0262-f490-4c4d-af7c-365ff8ee514e","7fcf5cf2-139d-4146-ad5e-b2a475c944ab","a98ad5c4-f70a-44ac-89bc-da72248fdba5"]'
|
150
|
-
|
151
|
-
// Pending items:
|
152
|
-
// Lazy loading handling
|
153
|
-
// Testing it with large number of items and handle edge cases if any
|
154
|
-
// Discuss with Ankit/Ashish sir, the approach of getting the item ids
|
155
|
-
// Grading view approach: either collect in the same array or loop over second time to store in a different array this would prevent switching back and forth and save time
|
156
|
-
|
157
|
-
// const getMigratedItemListData = [];
|
158
|
-
// const extractReferenceId = getMigratedItemListData.map((question) => question.referenceId);
|
159
|
-
// console.log();
|
160
|
-
|
161
|
-
|
162
|
-
// npx cypress run --env fileConfig=ilqa,migrationQuestionTypes='["singleSelection"]',referenceIds='["eab77261-45f8-43e8-84a8-6633474c363c","cb6c9d86-b9a5-4e75-b243-81b3fcb99856","3a9a22ff-b56d-4f6f-8108-f371d133e4c9","b9dbe59f-825d-4798-beee-b3be07d874cd","87ff6039-0f65-4c9d-9317-1f4f59eaf624","644f52a2-06b6-47af-9590-f691ee67549e","484608db-8873-4172-a238-08eb7e665344","0bc19082-864e-4196-9b2b-3a62a43c17f3","ef643fa9-c0e0-470b-8144-00811c36f6ac","a9867ddf-2593-4ff4-8c4c-52729773fd29","0306ab22-ffdd-44bc-91bd-d62e81b542f6","c6522655-ed75-48ff-99a6-f0c48dd870d7","8e45365a-8d19-4688-9f31-b31035dbb9d4","ba416913-de16-4270-b779-e4aab0de36e7","c392ea6a-902f-42b1-911b-751e72c7d587","95b6c8fb-6766-4110-86d1-5f6bba6d9b59","a9e3aa75-47bb-42ab-9d9e-480384a6df56","7e42adcb-44a1-4747-8cef-6ddc375b9f03","c15481c8-442e-4ae9-a992-b5e4e41ba323","7432e4a4-32d6-4765-a39c-fa23ffaa2e1f","b972e944-e239-4a54-a34f-6bd414a250bc","0178e819-a746-4d85-8e98-356dc5ce8d27","71fe86b6-e4ff-4be5-b98a-91e169a599c7","7aa7e77e-c590-428f-b84b-34d28614dfb4","109d861a-f750-4c44-a7f4-294cde46f226","52dfb585-ea5b-4b78-9e92-ea2548e619e3","b1a9a551-0c75-49f9-a68d-1f7e40785d0b","bd8128ee-cd80-4c51-986c-09305b2d4980","231f883a-c82a-4ff7-87dc-acdff0043394","efe4c62f-e153-4304-86de-911c9eac422a","91f71b1d-6534-4690-997e-ddaa61ef18c7","d2fb979f-28f6-4280-902f-49e48b280d49","65febe0f-45d2-4979-a988-d6b7926bd393","7ef436de-9e98-4425-b057-c97ac861afff","d5cbe675-21f1-4db5-9f80-7fc8f330dc22","56eef654-01a3-4ce3-8e07-73e1dd65299a","8c21e186-511c-4e05-b383-a39bfa3da273","a804631e-34f7-4139-bc75-4b821d5dec04","ee650c83-b290-4233-8528-30ee43b180f7","14445082-344c-4d5d-a43b-48fc1fd2d3eb","ffa04e4a-e90f-41d2-80d8-7b5216619d42","eb8e3a31-4e16-42f2-a9df-12e2eda0b7f6","23eb3595-937f-42a0-9b86-197c25105903","ca003a60-7fb2-47e0-9ff4-09494541c05b","4a82815d-92b8-4d5a-be30-554743796f3a","23e05cec-2c0b-4c22-9568-449c970cd489","0daff0fa-8c0e-485b-83d1-f32391ab5083","1fa712c7-bfa8-468c-a4bb-a8a3c25302eb","2fd27b37-876f-44ef-9362-8c5057a79a13","7b2384ed-590b-4498-bde6-de3b6003bd61"]'
|
163
|
-
|
164
|
-
|
165
|
-
// let referenceIds = [
|
166
|
-
// '929f0262-f490-4c4d-af7c-365ff8ee514e',
|
167
|
-
// '7.6.16 Practice 2',
|
168
|
-
// 'a98ad5c4-f70a-44ac-89bc-da72248fdba5',
|
169
|
-
// 'cc57b793-bf86-4470-8072-4ed07feb7070',
|
170
|
-
// '165df947-062b-406f-8e6d-08c53022a550',
|
171
|
-
// '89c235d6-a88d-4cd4-b59c-4e1fc7511ab3',
|
172
|
-
// '8ceccf29-1a55-47c1-9321-6fb0db787d70',
|
173
|
-
// '4ec862d2-8a95-4312-afe8-6bf1e5540d7e',
|
174
|
-
// 'cb51935f-56a2-4ccd-824d-1c0c8a87536a',
|
175
|
-
// '98983ac9-0173-4c77-991a-17cdf26f453d',
|
176
|
-
// '02db5163-fd79-4168-8bbb-b9a0d3a44e57',
|
177
|
-
// 'a938e889-de77-441a-8154-5ebe516a70e2',
|
178
|
-
// '7052e792-d7ed-4638-82d4-29f7eb469f3d',
|
179
|
-
// 'e9669a50-4f11-4eb1-84c1-c9ee033de99b',
|
180
|
-
// 'eff66b69-8f25-4eb1-9af0-be4ef7b46038',
|
181
|
-
// 'c5cc91af-939d-4563-87da-28b01b64a765',
|
182
|
-
// '5a3209c7-f0eb-4ea3-aa99-fd6c62bd4e50',
|
183
|
-
// '62b8e8d8-6233-410b-9d42-4ff17c329a5d',
|
184
|
-
// '8621b80b-9822-4358-a0ae-cee36f23531f',
|
185
|
-
// '78a50137-c68d-47a9-856c-6cb2be0c89b6',
|
186
|
-
// '9487d671-d5b4-4282-bdc9-19844a386e6a',
|
187
|
-
// '58308047-4de2-4435-a2ca-3d2f02072a7b',
|
188
|
-
// '2b3030b2-2b3e-4871-8339-c36cb0efdc61',
|
189
|
-
// '5e62bdab-7f2d-4a3d-ab66-868e62c22626',
|
190
|
-
// '514d8c3a-495b-4dcd-87d0-aa289a9f415d',
|
191
|
-
// 'e582071d-e4c9-403b-beea-8ccff93b06ea',
|
192
|
-
// 'b2acb94b-70fb-4e4e-984d-cabc4e4b4f3a',
|
193
|
-
// 'f25f7cf4-8aab-43fb-a096-50e2e04fe7a0',
|
194
|
-
// '20e3f0fa-fb4c-4137-ae7f-25098dcf5345',
|
195
|
-
// 'b0aa7e34-827e-4a9c-868e-2ce43468cd41',
|
196
|
-
// '070eedce-66c9-46a3-abe9-9630acccc003',
|
197
|
-
// 'ffd83f44-1974-4c5d-a0c6-f09f7a571850',
|
198
|
-
// '1cee05d7-fd06-4bac-873e-7711f3a527f2',
|
199
|
-
// '8dd4a1e0-e857-4df0-9ce8-147e6ba2a792',
|
200
|
-
// '1acde35c-485f-4bfb-8f91-fd9c972e0b83',
|
201
|
-
// '7fcf5cf2-139d-4146-ad5e-b2a475c944ab',
|
202
|
-
// 'c62b526a-dba5-461b-b155-8c98187958bc',
|
203
|
-
// '7a60fbf5-4f48-4b0f-9e92-c5c1070ae485',
|
204
|
-
// 'GBQ_G4_AREV_S2/3_Q1',
|
205
|
-
// '721cd878-be7b-40f2-a67f-135bb54401e0',
|
206
|
-
// '00953073-19fd-4c46-91d7-5135f1423267',
|
207
|
-
// '66590794-e794-4fd7-b6d5-e949cc24f962',
|
208
|
-
// '6f9b2342-bbd5-4422-bf61-97c847f3f185',
|
209
|
-
// 'c6901952-a27d-4272-9fe8-75bbfb9cf79a',
|
210
|
-
// '490ab6b1-5150-458a-b8cb-4a8c4121b7b2',
|
211
|
-
// 'f7e1af87-c11b-4c15-81d8-0181cebc14d8',
|
212
|
-
// 'bc697246-4854-47d1-a285-4752b1472b3a',
|
213
|
-
// '2f3bf5b1-40be-4840-8bdd-e04cfcf3362e',
|
214
|
-
// '5c674576-edcf-474f-9885-0b68cce8aaf2',
|
215
|
-
// 'a4f3609e-9c98-43fa-a9b1-1f55e7d10423'
|
216
|
-
// ]
|
133
|
+
}
|
@@ -35,7 +35,7 @@ Cypress.Commands.add('lazyLoadPreviewQuestions', (count, retries = 5) => {
|
|
35
35
|
cy.learnosityLoaderWait();
|
36
36
|
})
|
37
37
|
|
38
|
-
const migrationQuestionTypes = /* ['singleSelection', 'essayResponseMath']; */
|
38
|
+
const migrationQuestionTypes = Cypress.env('migrationQuestionTypes'); /* ['singleSelection', 'essayResponseMath']; */
|
39
39
|
const migrationQuestionTypesLrn = migrationQuestionTypes.map((questionType) => lrnQuestionTypesENUM[questionType]);
|
40
40
|
|
41
41
|
console.log('migrationQuestionTypes', Cypress.env('migrationQuestionTypes'))
|
@@ -44,102 +44,93 @@ console.log('referenceIds', Cypress.env('referenceIds'))
|
|
44
44
|
let lrnQuestionDataArr = [];
|
45
45
|
let lrnGradingDataArr = [];
|
46
46
|
|
47
|
-
|
48
|
-
// '929f0262-f490-4c4d-af7c-365ff8ee514e',
|
49
|
-
// '7fcf5cf2-139d-4146-ad5e-b2a475c944ab',
|
50
|
-
// // '8ceccf29-1a55-47c1-9321-6fb0db787d70',
|
51
|
-
// // '5e62bdab-7f2d-4a3d-ab66-868e62c22626',
|
52
|
-
// // '514d8c3a-495b-4dcd-87d0-aa289a9f415d',
|
53
|
-
// // 'e582071d-e4c9-403b-beea-8ccff93b06ea',
|
54
|
-
// 'a98ad5c4-f70a-44ac-89bc-da72248fdba5',
|
55
|
-
// ]
|
47
|
+
let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(100, 200);
|
56
48
|
|
57
|
-
let referenceIds = ["#101 6.SP.B.5c Statistics Probability Statistics Probability Math 06","#102 8.EE.A.1 Expressions Equations Expressions Equations Math 08","#103 5.G.B.3 Geometry Geometry Math 05","#104 7.G.B.5 Geometry Geometry Math 07","#105 7.RP.A.2b 7.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 07","#106 5.NF.B.4 6.EE.A.2 Expressions Equations Number Operations Fractions Expressions Equations Number Operations Fractions Math 05 06","#107 6.EE.A.3 7.EE.B.4 Expressions Equations Expressions Equations Math 06 07","#108 7.SP.C.8 Statistics Probability Statistics Probability Math 07","#109 6.RP.A.1 Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#110 6.EE.A.1 6.EE.A.2 Expressions Equations Expressions Equations Math 06","#111 7.G.B.4 Geometry Geometry Math 07","#112 4.OA.A.3 Operations Algebraic Thinking Operations Algebraic Thinking Math 04","#113 4.OA.C.5 Operations Algebraic Thinking Operations Algebraic Thinking Math 04","#114 7.EE.B.4 Expressions Equations Expressions Equations Math 07","#115 8.EE.A.4 Expressions Equations Expressions Equations Math 08","#116 7.RP.A.2 7.RP.A.2c Ratios Proportional Relationships Ratios Proportional Relationships Math 07","#117 7.RP.A.2 Ratios Proportional Relationships Ratios Proportional Relationships Math 07","#118 6.EE.C.9 6.RP.A.3b Expressions Equations Ratios Proportional Relationships Expressions Equations Ratios Proportional Relationships Math 06","#119 7.G.B.4 Geometry Geometry Math 07","#120 HSS-ID.B.6a Interpreting Categorical Quantitative Data Interpreting Categorical Quantitative Data Math 09 10 11 12","#121 8.F.B.4 HSS-ID.C.7 Functions Interpreting Categorical Quantitative Data Functions Interpreting Categorical Quantitative Data Math 08 09 10 11 12","#122 8.F.B.4 HSF-IF.B.6 Interpreting Functions Functions Functions Interpreting Functions Math 08 09 10 11 12","#123 6.EE.C.9 Expressions Equations Expressions Equations Math 06","#124 6.EE.A.3 6.EE.A.4 Expressions Equations Expressions Equations Math 06","#125 6.SP.B.5c Statistics Probability Statistics Probability Math 06","#126 7.SP.C.7a Statistics Probability Statistics Probability Math 07","#127 7.EE.B.3 7.RP.A.3 Expressions Equations Ratios Proportional Relationships Expressions Equations Ratios Proportional Relationships Math 07","#128 7.G.B.5 Geometry Geometry Math 07","#129 7.G.B.4 Geometry Geometry Math 07","#130 7.RP.A.2 7.RP.A.2b Ratios Proportional Relationships Ratios Proportional Relationships Math 07","#131 8.F.B.4 Functions Functions Math 08","#132 7.RP.A.2 Ratios Proportional Relationships Ratios Proportional Relationships Math 07","#133 RI.3.1 Reading Informational Text Key Ideas and Details ELA-Literacy 03","#134 RI.3.1 RI.3.4 RI.3.7 RI.3.8 RL.3.1 Reading Literature Reading Informational Text Craft and Structure Integration of Knowledge and Ideas Key Ideas","#135 RL.3.1 RL.3.3 RL.3.4 RL.3.5 Reading Literature Craft and Structure Key Ideas and Details ELA-Literacy 03","#136 RL.4.3 Reading Literature Key Ideas and Details ELA-Literacy 04","#137 RL.4.3 Reading Literature Key Ideas and Details ELA-Literacy 04","#138 RL.4.2 Reading Literature Key Ideas and Details ELA-Literacy 04","#139 RL.4.3 Reading Literature Key Ideas and Details ELA-Literacy 04","#140 RL.4.3 Reading Literature Key Ideas and Details ELA-Literacy 04","#141 RL.6.1 Reading Literature Key Ideas and Details ELA-Literacy 06","#142 RL.7.1 Reading Literature Key Ideas and Details ELA-Literacy 07","#143 7.G.B.6 7.RP.A.1 Geometry Ratios Proportional Relationships Geometry Ratios Proportional Relationships Math 07","#144 7.G.B.4 Geometry Geometry Math 07","#145 6.RP.A.3d Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#146 HSG-CO.A.1 HSG-GPE.B.5 Congruence Expressing Geometric Properties with Equations Congruence Expressing Geometric Properties with Equations Math 0","#147 7.EE.B.4a Expressions Equations Expressions Equations Math 07","#148 HSF-IF.B.6 Interpreting Functions Interpreting Functions Math 09 10 11 12","#149 8.EE.C.8c Expressions Equations Expressions Equations Math 08","#150 HSA-CED.A.2 Creating Equations* Creating Equations* Math 09 10 11 12","#151 8.SP.A.1 HSS-ID.B.6 Interpreting Categorical Quantitative Data Statistics Probability Interpreting Categorical Quantitative Data Statistics Proba","#152 5.MD.B.2 Measurement Data Measurement Data Math 05","#153 7.SP.C.5 Statistics Probability Statistics Probability Math 07","#154 6.RP.A.3 6.RP.A.3c Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#155 8.G.A.3 Geometry Geometry Math 08","#156 8.G.C.9 HSG-GMD.A.3 Geometric Measurement Dimension Geometry Geometric Measurement Dimension Geometry Math 08 09 10 11 12","#157 HSG-GPE.B.4 Expressing Geometric Properties with Equations Expressing Geometric Properties with Equations Math 09 10 11 12","#158 HSS-ID.B.6a Interpreting Categorical Quantitative Data Interpreting Categorical Quantitative Data Math 09 10 11 12","#159 HSA-CED.A.1 HSS-ID.B.6a Creating Equations* Interpreting Categorical Quantitative Data Creating Equations* Interpreting Categorical Quantitative ","#160 8.F.B.4 Functions Functions Math 08","#161 HSA-SSE.A.2 Seeing Structure in Expressions Seeing Structure in Expressions Math 09 10 11 12","#162 6.EE.B.6 Expressions Equations Expressions Equations Math 06","#163 7.EE.B.4 Expressions Equations Expressions Equations Math 07","#164 HSF-IF.B.4 Interpreting Functions Interpreting Functions Math 09 10 11 12","#165 HSS-CP.B.9 Conditional Probability the Rules of Probability Conditional Probability the Rules of Probability Math 09 10 11 12","#166 6.NS.A.1 The Number System The Number System Math 06","#167 8.G.A.3 Geometry Geometry Math 08","#168 5.MD.A.1 Measurement Data Measurement Data Math 05","#169 HSG-GPE.B.5 Expressing Geometric Properties with Equations Expressing Geometric Properties with Equations Math 09 10 11 12","#170 HSG-GPE.B.4 HSN-CN.B.6 Expressing Geometric Properties with Equations The Complex Number System Expressing Geometric Properties with Equations Th","#171 8.F.A.1 HSF-IF.A.1 Interpreting Functions Functions Functions Interpreting Functions Math 08 09 10 11 12","#172 HSF-IF.B.5 Interpreting Functions Interpreting Functions Math 09 10 11 12","#173 6.EE.A.3 Expressions Equations Expressions Equations Math 06","#174 HSA-APR.D.6 Arithmetic with Polynomials Rational Expressions Arithmetic with Polynomials Rational Expressions Math 09 10 11 12","#175 HSA-REI.C.7 Reasoning with Equations Inequalities Reasoning with Equations Inequalities Math 09 10 11 12","#176 8.EE.C.8 8.EE.C.8a 8.EE.C.8b HSA-REI.C.6 Expressions Equations Reasoning with Equations Inequalities Expressions Equations Reasoning with Equatio","#177 7.SP.C.7a Statistics Probability Statistics Probability Math 07","#178 3.W.9 RL.3.1 RL.3.3 W.3.2 W.3.4 Reading Literature Writing Key Ideas and Details Production and Distribution of Writing Research to Build and Pre","#179 RI.4.1 RI.4.10 RI.4.2 RI.4.3 RI.4.5 RI.4.8 Reading Informational Text Craft and Structure Integration of Knowledge and Ideas Key Ideas and Detail","#180 L.5.4 RL.5.3 RL.5.4 RL.5.5 RL.5.6 Reading Literature Language Craft and Structure Key Ideas and Details Vocabulary Acquisition and Use ELA-Litera","#181 RI.5.2 RI.5.3 Reading Informational Text Key Ideas and Details ELA-Literacy 05","#182 RL.6.1 RL.6.3 RL.6.4 RL.6.6 Reading Literature Craft and Structure Key Ideas and Details ELA-Literacy 06","#183 8.F.B.4 Functions Functions Math 08","#184 8.EE.A.1 Expressions Equations Expressions Equations Math 08","#185 8.EE.B.6 Expressions Equations Expressions Equations Math 08","#186 8.EE.C.7b Expressions Equations Expressions Equations Math 08","#187 8.EE.B.6 Expressions Equations Expressions Equations Math 08","#188 8.F.A.2 Functions Functions Math 08","#189 7.EE.B.3 7.RP.A.3 Expressions Equations Ratios Proportional Relationships Expressions Equations Ratios Proportional Relationships Math 07","#190 7.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 07","#191 7.EE.B.4b Expressions Equations Expressions Equations Math 07","#192 7.G.A.1 Geometry Geometry Math 07","#193 7.SP.C.8b Statistics Probability Statistics Probability Math 07","#194 7.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 07","#195 8.G.A.3 Geometry Geometry Math 08","#196 6.G.A.4 7.G.B.6 Geometry Geometry Math 06 07","#197 6.EE.C.9 Expressions Equations Expressions Equations Math 06","#198 6.EE.A.2 Expressions Equations Expressions Equations Math 06","#199 HSF-BF.A.1a Building Functions Building Functions Math 09 10 11 12","#200 8.NS.A.2 The Number System The Number System Math 08","#1 8.EE.C.7b Expressions Equations Expressions Equations Math 08","#261 6.SP.B.4 8.SP.A.1 HSS-ID.A.1 HSS-ID.B.6 Interpreting Categorical Quantitative Data Statistics Probability Interpreting Categorical Quantitative D","#262 6.EE.B.6 8.EE.C.8 Expressions Equations Expressions Equations Math 06 08","#263 7.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 07","#264 8.G.A.3 Geometry Geometry Math 08","#265 8.F.B.4 HSF-IF.B.6 Interpreting Functions Functions Functions Interpreting Functions Math 08 09 10 11 12","#266 8.SP.A.1 HSF-IF.A.3 Interpreting Functions Statistics Probability Interpreting Functions Statistics Probability Math 08 09 10 11 12","#267 6.SP.B.5 Statistics Probability Statistics Probability Math 06","#268 8.G.A.3 Geometry Geometry Math 08","#269 7.SP.A.1 Statistics Probability Statistics Probability Math 07","#270 6.RP.A.3c Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#271 7.G.B.4 7.G.B.6 Geometry Geometry Math 07","#272 7.NS.A.3 The Number System The Number System Math 07","#273 6.SP.B.5 6.SP.B.5c Statistics Probability Statistics Probability Math 06","#274 4.NF.C.7 Number Operations Fractions Number Operations Fractions Math 04","#275 6.RP.A.3 7.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 06 07","#276 7.G.B.5 Geometry Geometry Math 07","#277 4.OA.B.4 Operations Algebraic Thinking Operations Algebraic Thinking Math 04","#278 4.OA.C.5 Operations Algebraic Thinking Operations Algebraic Thinking Math 04","#279 4.NBT.A.2 Number Operations in Base Ten Number Operations in Base Ten Math 04","#280 5.MD.C.3b Measurement Data Measurement Data Math 05","#281 6.SP.A.2 Statistics Probability Statistics Probability Math 06","#282 4.G.A.1 Geometry Geometry Math 04","#283 4.MD.A.3 Measurement Data Measurement Data Math 04","#284 6.SP.A.2 Statistics Probability Statistics Probability Math 06","#285 5.NBT.B.7 Number Operations in Base Ten Number Operations in Base Ten Math 05","#286 3.G.A.1 Geometry Geometry Math 03","#287 4.NBT.A.2 Number Operations in Base Ten Number Operations in Base Ten Math 04","#288 4.OA.C.5 Operations Algebraic Thinking Operations Algebraic Thinking Math 04","#289 6.EE.A.2 6.EE.A.2c Expressions Equations Expressions Equations Math 06","#290 6.SP.A.2 Statistics Probability Statistics Probability Math 06","#291 2.NBT.A.1 Number Operations in Base Ten Number Operations in Base Ten Math 02","#292 2.MD.A.1 Measurement Data Measurement Data Math 02","#293 2.OA.A.1 Operations Algebraic Thinking Operations Algebraic Thinking Math 02","#294 4.NBT.B.5 Number Operations in Base Ten Number Operations in Base Ten Math 04","#295 6.SP.B.5c Statistics Probability Statistics Probability Math 06","#296 3.OA.A.1 Operations Algebraic Thinking Operations Algebraic Thinking Math 03","#297 4.MD.A.3 Measurement Data Measurement Data Math 04","#298 2.OA.A.1 Operations Algebraic Thinking Operations Algebraic Thinking Math 02","#299 3.G.A.2 Geometry Geometry Math 03","#300 2.OA.A.1 Operations Algebraic Thinking Operations Algebraic Thinking Math 02","#301 3.MD.A.1 Measurement Data Measurement Data Math 03","#302 4.OA.A.2 Operations Algebraic Thinking Operations Algebraic Thinking Math 04","#303 2.OA.A.1 Operations Algebraic Thinking Operations Algebraic Thinking Math 02","#304 4.OA.C.5 Operations Algebraic Thinking Operations Algebraic Thinking Math 04","#305 2.NBT.B.5 Number Operations in Base Ten Number Operations in Base Ten Math 02","#306 2.MD.C.8 Measurement Data Measurement Data Math 02","#307 RL.4.1 Reading Literature Key Ideas and Details ELA-Literacy 04","#308 RI.4.3 Reading Informational Text Key Ideas and Details ELA-Literacy 04","#309 RI.4.9 RL.4.9 W.4.2 W.4.4 Reading Literature Reading Informational Text Writing Integration of Knowledge and Ideas Production and Distribution of","#310 RL.5.1 RL.5.2 Reading Literature Key Ideas and Details ELA-Literacy 05","#311 RL.5.3 Reading Literature Key Ideas and Details ELA-Literacy 05","#312 RL.5.6 W.5.2 Reading Literature Writing Craft and Structure Text Types and Purposes ELA-Literacy 05","#313 L.6.4a RI.6.2 RI.6.4 RI.6.5 Reading Informational Text Language Craft and Structure Key Ideas and Details Vocabulary Acquisition and Use ELA-Lite","#314 RL.6.1 RL.6.3 Reading Literature Key Ideas and Details ELA-Literacy 06","#315 RL.6.5 Reading Literature Craft and Structure ELA-Literacy 06","#316 RL.6.9 W.6.1 W.6.4 W.6.8 W.6.9a W.6.9b Reading Literature Writing Integration of Knowledge and Ideas Production and Distribution of Writing Resea","#317 RL.7.1 RL.7.2 RL.7.3 RL.7.6 Reading Literature Craft and Structure Key Ideas and Details ELA-Literacy 07","#318 RI.7.1 RI.7.2 RI.7.4 RI.7.5 Reading Informational Text Craft and Structure Key Ideas and Details ELA-Literacy 07","#319 RL.7.1 RL.7.3 Reading Literature Key Ideas and Details ELA-Literacy 07","#320 RL.7.3 Reading Literature Key Ideas and Details ELA-Literacy 07","#321 RL.7.1 W.7.2 W.7.9 Reading Literature Writing Key Ideas and Details Research to Build and Present Knowledge Text Types and Purposes ELA-Literacy ","#322 RI.8.1 RI.8.2 Reading Informational Text Key Ideas and Details ELA-Literacy 08","#323 RI.8.2 W.8.2 W.8.9 Reading Informational Text Writing Key Ideas and Details Research to Build and Present Knowledge Text Types and Purposes ELA-L","#324 RL.8.2 RL.8.3 RL.8.4 RL.8.6 Reading Literature Craft and Structure Key Ideas and Details ELA-Literacy 08","#325 RI.8.1 RI.8.2 RI.8.4 RI.8.5 RI.8.6 Reading Informational Text Craft and Structure Key Ideas and Details ELA-Literacy 08","#326 6.NS.B.2 The Number System The Number System Math 06","#327 An apartment building owner wants to use a cluster sampling method to select the apartments in which she will install carpeting. Describe a proce","#328 6.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#329 6.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#330 6.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#331 6.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#332 6.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#333 6.RP.A.3b Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#334 6.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#335 6.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#336 6.NS.B.2 The Number System The Number System Math 06","#337 4.MD.A.2 Measurement Data Measurement Data Math 04","#338 6.RP.A.3c Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#339 6.RP.A.3c Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#340 6.RP.A.1 Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#341 6.RP.A.3 6.RP.A.3b Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#342 6.RP.A.3 Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#343 6.RP.A.3c Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#344 6.EE.C.9 Expressions Equations Expressions Equations Math 06","#345 6.EE.A.3 Expressions Equations Expressions Equations Math 06","#346 6.NS.A.1 The Number System The Number System Math 06","#347 6.RP.A.3d Ratios Proportional Relationships Ratios Proportional Relationships Math 06","#348 6.NS.A.1 The Number System The Number System Math 06","#349 6.NS.A.1 The Number System The Number System Math 06","#350 6.NS.A.1 The Number System The Number System Math 06","#351 6.NS.A.1 The Number System The Number System Math 06","#352 6.NS.B.3 The Number System The Number System Math 06","#353 6.NS.B.3 The Number System The Number System Math 06","#354 6.NS.B.2 The Number System The Number System Math 06","#355 6.NS.B.3 The Number System The Number System Math 06","#356 6.NS.B.4 The Number System The Number System Math 06","#357 6.NS.B.4 The Number System The Number System Math 06","#358 6.NS.B.4 The Number System The Number System Math 06","#359 6.NS.C.5 The Number System The Number System Math 06"];
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
cy.loginAs('technicalTester');
|
63
|
-
});
|
49
|
+
if (referenceIds.length > 0) {
|
50
|
+
describe('Migration item check for MCQ questions', () => {
|
51
|
+
before(() => {
|
52
|
+
cy.loginAs('technicalTester');
|
53
|
+
});
|
64
54
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
55
|
+
referenceIds.forEach((referenceId) => {
|
56
|
+
describe(`Migration item check for item "${referenceId}"`, () => {
|
57
|
+
before(() => {
|
58
|
+
cy.interceptGraphql('getItemPreview');
|
59
|
+
cy.setGraphqlWait();
|
60
|
+
cy.visit(`/items-list/item/${utilities.base64Encoding(referenceId)}`);
|
61
|
+
cy.pageLoadWait('getItemPreview');
|
62
|
+
cy.get('@getItemPreview').then((req) => {
|
63
|
+
let questionCount = req.response.body.data.getItemPreview.item.questionParts.length;
|
64
|
+
cy.lazyLoadPreviewQuestions(questionCount);
|
65
|
+
});
|
75
66
|
});
|
76
|
-
});
|
77
67
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
68
|
+
after(() => {
|
69
|
+
console.log(lrnQuestionDataArr)
|
70
|
+
lrnQuestionDataArr = [];
|
71
|
+
lrnGradingDataArr = [];
|
72
|
+
});
|
83
73
|
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
74
|
+
it(`Extracting learnosity preview data for item "${referenceId}"`, () => {
|
75
|
+
lrnPage.questionTypeDiv()
|
76
|
+
.each(($el, index) => {
|
77
|
+
let currQuestionType = $el[0].innerText
|
78
|
+
if (migrationQuestionTypesLrn.includes(currQuestionType)) {
|
79
|
+
switch (currQuestionType) {
|
80
|
+
case lrnQuestionTypesENUM.singleSelection: return extractLrnQuestionData.singleSelection(lrnQuestionDataArr, index);
|
81
|
+
case lrnQuestionTypesENUM.essayResponseMath: return extractLrnQuestionData.essayResponseMath(lrnQuestionDataArr, index);
|
82
|
+
default: throw new Error('Invalid lrn question type');
|
83
|
+
}
|
93
84
|
}
|
94
|
-
}
|
95
|
-
|
96
|
-
});
|
85
|
+
});
|
86
|
+
});
|
97
87
|
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
88
|
+
it(`Verifying itemengine preview data for item "${referenceId}"`, () => {
|
89
|
+
migrationQuestionTypes.forEach((questionType) => {
|
90
|
+
cy.log(`Verifying data for all ${questionType} question type`);
|
91
|
+
let currQuestionTypeArr = lrnQuestionDataArr.filter((question) => question.questionType === questionType);
|
92
|
+
currQuestionTypeArr.forEach((questionData, index) => {
|
93
|
+
cy.log(`Verifying data for ${questionType} ${index}`);
|
94
|
+
switch (questionType) {
|
95
|
+
case 'singleSelection': return verifyIeQuestionData.singleSelection(questionData, index);
|
96
|
+
case 'essayResponseMath': return verifyIeQuestionData.essayResponseMath(questionData, index);
|
97
|
+
default: throw new Error('Invalid ngie question type');
|
98
|
+
}
|
99
|
+
});
|
109
100
|
});
|
110
101
|
});
|
111
|
-
});
|
112
102
|
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
103
|
+
it(`Extracting learnosity grading data for item "${referenceId}"`, () => {
|
104
|
+
lrnPage.steps.checkShowAnswersToggle();
|
105
|
+
lrnPage.questionTypeDiv()
|
106
|
+
.each(($el, index) => {
|
107
|
+
let currQuestionType = $el[0].innerText
|
108
|
+
if (migrationQuestionTypesLrn.includes(currQuestionType)) {
|
109
|
+
switch (currQuestionType) {
|
110
|
+
case lrnQuestionTypesENUM.singleSelection: return extractLrnQuestionData.singleSelectionGrading(lrnGradingDataArr, index);
|
111
|
+
// case lrnQuestionTypesENUM.essayResponseMath: return extractLrnQuestionData.essayResponseMath(lrnQuestionDataArr, index);
|
112
|
+
default: throw new Error('Invalid lrn question type');
|
113
|
+
}
|
123
114
|
}
|
124
|
-
}
|
125
|
-
|
126
|
-
});
|
115
|
+
});
|
116
|
+
});
|
127
117
|
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
118
|
+
it(`Verifying itemengine grading data for item "${referenceId}"`, () => {
|
119
|
+
autoScoredScoringPreviewTab.steps.switchToGradingView();
|
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 'singleSelection': return verifyIeQuestionData.singleSelectionGrading(questionData, index);
|
127
|
+
// case 'essayResponseMath': return verifyIeQuestionData.essayResponseMath(questionData, index);
|
128
|
+
default: throw new Error('Invalid ngie question type');
|
129
|
+
}
|
130
|
+
});
|
140
131
|
});
|
141
132
|
});
|
142
133
|
});
|
143
134
|
});
|
144
135
|
});
|
145
|
-
}
|
136
|
+
}
|