itemengine-cypress-automation 1.0.140-npmScriptsUpdate-efe1b9e.0 → 1.0.140
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/e2e/migration/migration.js +8 -6
- package/cypress/e2e/migration/migration10.js +6 -4
- package/cypress/e2e/migration/migration2.js +6 -4
- package/cypress/e2e/migration/migration3.js +6 -4
- package/cypress/e2e/migration/migration4.js +6 -4
- package/cypress/e2e/migration/migration5.js +6 -4
- package/cypress/e2e/migration/migration6.js +6 -4
- package/cypress/e2e/migration/migration7.js +6 -4
- package/cypress/e2e/migration/migration8.js +6 -4
- package/cypress/e2e/migration/migration9.js +6 -4
- package/cypress/support/migrationHelpers/extractLrnQuestionData.js +72 -4
- package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +1 -0
- package/cypress/support/migrationHelpers/verifyIeQuestionData.js +49 -1
- package/package.json +2 -2
- package/scripts/sorry-cypress.mjs +0 -4
@@ -4,7 +4,7 @@ import { extractLrnQuestionData, lrnPage } from "../../support/migrationHelpers/
|
|
4
4
|
import lrnQuestionTypesENUM from "../../support/migrationHelpers/lrnQestionTypesENUM";
|
5
5
|
import { verifyIeQuestionData } from "../../support/migrationHelpers/verifyIeQuestionData";
|
6
6
|
|
7
|
-
const migrationQuestionTypes = Cypress.env('migrationQuestionTypes');//["
|
7
|
+
const migrationQuestionTypes = Cypress.env('migrationQuestionTypes');//["dndIntoCategories"]
|
8
8
|
const migrationQuestionTypesLrn = migrationQuestionTypes.map((questionType) => lrnQuestionTypesENUM[questionType]);
|
9
9
|
let lrnMcqTypesRegex = /Multiple choice – standard|Multiple choice – multiple response|True or false|Multiple choice – block layout/;
|
10
10
|
let lrnEssayResponseRegex = /Math essay with rich text|Essay with rich text/
|
@@ -13,7 +13,7 @@ let lrnEssayResponseRegex = /Math essay with rich text|Essay with rich text/
|
|
13
13
|
let lrnQuestionDataArr = [];
|
14
14
|
let lrnGradingDataArr = [];
|
15
15
|
|
16
|
-
let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(0, 100);//["
|
16
|
+
let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(0, 100);//["c68472be-55b8-4367-a985-406789d948a1"/* , "49d213c7-2bea-42b8-a635-fc56b7f6e759", "42be7ec5-2023-434e-a114-3a019afe0e64", "47f298b2-58a0-49a1-b730-00e886520d91", "79186be1-3722-4786-9290-957f242f9473", "8a91a61c-7988-4422-a39b-b7f6ecd7fd8f" */]
|
17
17
|
|
18
18
|
if (referenceIds.length > 0) {
|
19
19
|
describe('Migration item check for MCQ questions', () => {
|
@@ -41,7 +41,7 @@ if (referenceIds.length > 0) {
|
|
41
41
|
lrnGradingDataArr = [];
|
42
42
|
});
|
43
43
|
|
44
|
-
it(`Extracting learnosity preview data for item "${referenceId}"`, () => {
|
44
|
+
it(`Extracting learnosity preview data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
45
45
|
lrnPage.questionTypeDiv()
|
46
46
|
.each(($el, index) => {
|
47
47
|
let currQuestionType = $el[0].innerText
|
@@ -60,13 +60,14 @@ if (referenceIds.length > 0) {
|
|
60
60
|
case lrnQuestionTypesENUM.essayResponse: return extractLrnQuestionData.essayResponse(lrnQuestionDataArr, index);
|
61
61
|
case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
|
62
62
|
case lrnQuestionTypesENUM.drawingResponse: return extractLrnQuestionData.drawingResponse(lrnQuestionDataArr, index);
|
63
|
+
case lrnQuestionTypesENUM.dndIntoCategories: return extractLrnQuestionData.dndIntoCategories(lrnQuestionDataArr, index);
|
63
64
|
default: throw new Error('Invalid lrn question type');
|
64
65
|
}
|
65
66
|
}
|
66
67
|
});
|
67
68
|
});
|
68
69
|
|
69
|
-
it(`Verifying itemengine preview data for item "${referenceId}"`, () => {
|
70
|
+
it(`Verifying itemengine preview data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
70
71
|
migrationQuestionTypes.forEach((questionType) => {
|
71
72
|
cy.log(`Verifying data for all ${questionType} question type`);
|
72
73
|
let currQuestionTypeArr = lrnQuestionDataArr.filter((question) => question.questionType === questionType);
|
@@ -79,13 +80,14 @@ if (referenceIds.length > 0) {
|
|
79
80
|
case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
|
80
81
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
81
82
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
83
|
+
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
82
84
|
default: throw new Error('Invalid ngie question type');
|
83
85
|
}
|
84
86
|
});
|
85
87
|
});
|
86
88
|
});
|
87
89
|
|
88
|
-
it(`Extracting learnosity grading data for item "${referenceId}"`, () => {
|
90
|
+
it(`Extracting learnosity grading data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
89
91
|
lrnPage.authorItemToolbarControlsWrapper()
|
90
92
|
.then(($element) => {
|
91
93
|
if ($element[0].innerHTML.includes('lrn-author-validate-questions-toggle')) {
|
@@ -106,7 +108,7 @@ if (referenceIds.length > 0) {
|
|
106
108
|
});
|
107
109
|
});
|
108
110
|
|
109
|
-
it(`Verifying itemengine grading data for item "${referenceId}"`, () => {
|
111
|
+
it(`Verifying itemengine grading data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
110
112
|
autoScoredScoringPreviewTab.steps.switchToGradingView();
|
111
113
|
cy.wait(500);
|
112
114
|
migrationQuestionTypes.forEach((questionType) => {
|
@@ -41,7 +41,7 @@ if (referenceIds.length > 0) {
|
|
41
41
|
lrnGradingDataArr = [];
|
42
42
|
});
|
43
43
|
|
44
|
-
it(`Extracting learnosity preview data for item "${referenceId}"`, () => {
|
44
|
+
it(`Extracting learnosity preview data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
45
45
|
lrnPage.questionTypeDiv()
|
46
46
|
.each(($el, index) => {
|
47
47
|
let currQuestionType = $el[0].innerText
|
@@ -60,13 +60,14 @@ if (referenceIds.length > 0) {
|
|
60
60
|
case lrnQuestionTypesENUM.essayResponse: return extractLrnQuestionData.essayResponse(lrnQuestionDataArr, index);
|
61
61
|
case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
|
62
62
|
case lrnQuestionTypesENUM.drawingResponse: return extractLrnQuestionData.drawingResponse(lrnQuestionDataArr, index);
|
63
|
+
case lrnQuestionTypesENUM.dndIntoCategories: return extractLrnQuestionData.dndIntoCategories(lrnQuestionDataArr, index);
|
63
64
|
default: throw new Error('Invalid lrn question type');
|
64
65
|
}
|
65
66
|
}
|
66
67
|
});
|
67
68
|
});
|
68
69
|
|
69
|
-
it(`Verifying itemengine preview data for item "${referenceId}"`, () => {
|
70
|
+
it(`Verifying itemengine preview data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
70
71
|
migrationQuestionTypes.forEach((questionType) => {
|
71
72
|
cy.log(`Verifying data for all ${questionType} question type`);
|
72
73
|
let currQuestionTypeArr = lrnQuestionDataArr.filter((question) => question.questionType === questionType);
|
@@ -79,13 +80,14 @@ if (referenceIds.length > 0) {
|
|
79
80
|
case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
|
80
81
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
81
82
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
83
|
+
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
82
84
|
default: throw new Error('Invalid ngie question type');
|
83
85
|
}
|
84
86
|
});
|
85
87
|
});
|
86
88
|
});
|
87
89
|
|
88
|
-
it(`Extracting learnosity grading data for item "${referenceId}"`, () => {
|
90
|
+
it(`Extracting learnosity grading data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
89
91
|
lrnPage.authorItemToolbarControlsWrapper()
|
90
92
|
.then(($element) => {
|
91
93
|
if ($element[0].innerHTML.includes('lrn-author-validate-questions-toggle')) {
|
@@ -106,7 +108,7 @@ if (referenceIds.length > 0) {
|
|
106
108
|
});
|
107
109
|
});
|
108
110
|
|
109
|
-
it(`Verifying itemengine grading data for item "${referenceId}"`, () => {
|
111
|
+
it(`Verifying itemengine grading data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
110
112
|
autoScoredScoringPreviewTab.steps.switchToGradingView();
|
111
113
|
cy.wait(500);
|
112
114
|
migrationQuestionTypes.forEach((questionType) => {
|
@@ -41,7 +41,7 @@ if (referenceIds.length > 0) {
|
|
41
41
|
lrnGradingDataArr = [];
|
42
42
|
});
|
43
43
|
|
44
|
-
it(`Extracting learnosity preview data for item "${referenceId}"`, () => {
|
44
|
+
it(`Extracting learnosity preview data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
45
45
|
lrnPage.questionTypeDiv()
|
46
46
|
.each(($el, index) => {
|
47
47
|
let currQuestionType = $el[0].innerText
|
@@ -60,13 +60,14 @@ if (referenceIds.length > 0) {
|
|
60
60
|
case lrnQuestionTypesENUM.essayResponse: return extractLrnQuestionData.essayResponse(lrnQuestionDataArr, index);
|
61
61
|
case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
|
62
62
|
case lrnQuestionTypesENUM.drawingResponse: return extractLrnQuestionData.drawingResponse(lrnQuestionDataArr, index);
|
63
|
+
case lrnQuestionTypesENUM.dndIntoCategories: return extractLrnQuestionData.dndIntoCategories(lrnQuestionDataArr, index);
|
63
64
|
default: throw new Error('Invalid lrn question type');
|
64
65
|
}
|
65
66
|
}
|
66
67
|
});
|
67
68
|
});
|
68
69
|
|
69
|
-
it(`Verifying itemengine preview data for item "${referenceId}"`, () => {
|
70
|
+
it(`Verifying itemengine preview data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
70
71
|
migrationQuestionTypes.forEach((questionType) => {
|
71
72
|
cy.log(`Verifying data for all ${questionType} question type`);
|
72
73
|
let currQuestionTypeArr = lrnQuestionDataArr.filter((question) => question.questionType === questionType);
|
@@ -79,13 +80,14 @@ if (referenceIds.length > 0) {
|
|
79
80
|
case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
|
80
81
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
81
82
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
83
|
+
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
82
84
|
default: throw new Error('Invalid ngie question type');
|
83
85
|
}
|
84
86
|
});
|
85
87
|
});
|
86
88
|
});
|
87
89
|
|
88
|
-
it(`Extracting learnosity grading data for item "${referenceId}"`, () => {
|
90
|
+
it(`Extracting learnosity grading data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
89
91
|
lrnPage.authorItemToolbarControlsWrapper()
|
90
92
|
.then(($element) => {
|
91
93
|
if ($element[0].innerHTML.includes('lrn-author-validate-questions-toggle')) {
|
@@ -106,7 +108,7 @@ if (referenceIds.length > 0) {
|
|
106
108
|
});
|
107
109
|
});
|
108
110
|
|
109
|
-
it(`Verifying itemengine grading data for item "${referenceId}"`, () => {
|
111
|
+
it(`Verifying itemengine grading data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
110
112
|
autoScoredScoringPreviewTab.steps.switchToGradingView();
|
111
113
|
cy.wait(500);
|
112
114
|
migrationQuestionTypes.forEach((questionType) => {
|
@@ -41,7 +41,7 @@ if (referenceIds.length > 0) {
|
|
41
41
|
lrnGradingDataArr = [];
|
42
42
|
});
|
43
43
|
|
44
|
-
it(`Extracting learnosity preview data for item "${referenceId}"`, () => {
|
44
|
+
it(`Extracting learnosity preview data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
45
45
|
lrnPage.questionTypeDiv()
|
46
46
|
.each(($el, index) => {
|
47
47
|
let currQuestionType = $el[0].innerText
|
@@ -60,13 +60,14 @@ if (referenceIds.length > 0) {
|
|
60
60
|
case lrnQuestionTypesENUM.essayResponse: return extractLrnQuestionData.essayResponse(lrnQuestionDataArr, index);
|
61
61
|
case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
|
62
62
|
case lrnQuestionTypesENUM.drawingResponse: return extractLrnQuestionData.drawingResponse(lrnQuestionDataArr, index);
|
63
|
+
case lrnQuestionTypesENUM.dndIntoCategories: return extractLrnQuestionData.dndIntoCategories(lrnQuestionDataArr, index);
|
63
64
|
default: throw new Error('Invalid lrn question type');
|
64
65
|
}
|
65
66
|
}
|
66
67
|
});
|
67
68
|
});
|
68
69
|
|
69
|
-
it(`Verifying itemengine preview data for item "${referenceId}"`, () => {
|
70
|
+
it(`Verifying itemengine preview data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
70
71
|
migrationQuestionTypes.forEach((questionType) => {
|
71
72
|
cy.log(`Verifying data for all ${questionType} question type`);
|
72
73
|
let currQuestionTypeArr = lrnQuestionDataArr.filter((question) => question.questionType === questionType);
|
@@ -79,13 +80,14 @@ if (referenceIds.length > 0) {
|
|
79
80
|
case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
|
80
81
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
81
82
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
83
|
+
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
82
84
|
default: throw new Error('Invalid ngie question type');
|
83
85
|
}
|
84
86
|
});
|
85
87
|
});
|
86
88
|
});
|
87
89
|
|
88
|
-
it(`Extracting learnosity grading data for item "${referenceId}"`, () => {
|
90
|
+
it(`Extracting learnosity grading data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
89
91
|
lrnPage.authorItemToolbarControlsWrapper()
|
90
92
|
.then(($element) => {
|
91
93
|
if ($element[0].innerHTML.includes('lrn-author-validate-questions-toggle')) {
|
@@ -106,7 +108,7 @@ if (referenceIds.length > 0) {
|
|
106
108
|
});
|
107
109
|
});
|
108
110
|
|
109
|
-
it(`Verifying itemengine grading data for item "${referenceId}"`, () => {
|
111
|
+
it(`Verifying itemengine grading data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
110
112
|
autoScoredScoringPreviewTab.steps.switchToGradingView();
|
111
113
|
cy.wait(500);
|
112
114
|
migrationQuestionTypes.forEach((questionType) => {
|
@@ -41,7 +41,7 @@ if (referenceIds.length > 0) {
|
|
41
41
|
lrnGradingDataArr = [];
|
42
42
|
});
|
43
43
|
|
44
|
-
it(`Extracting learnosity preview data for item "${referenceId}"`, () => {
|
44
|
+
it(`Extracting learnosity preview data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
45
45
|
lrnPage.questionTypeDiv()
|
46
46
|
.each(($el, index) => {
|
47
47
|
let currQuestionType = $el[0].innerText
|
@@ -60,13 +60,14 @@ if (referenceIds.length > 0) {
|
|
60
60
|
case lrnQuestionTypesENUM.essayResponse: return extractLrnQuestionData.essayResponse(lrnQuestionDataArr, index);
|
61
61
|
case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
|
62
62
|
case lrnQuestionTypesENUM.drawingResponse: return extractLrnQuestionData.drawingResponse(lrnQuestionDataArr, index);
|
63
|
+
case lrnQuestionTypesENUM.dndIntoCategories: return extractLrnQuestionData.dndIntoCategories(lrnQuestionDataArr, index);
|
63
64
|
default: throw new Error('Invalid lrn question type');
|
64
65
|
}
|
65
66
|
}
|
66
67
|
});
|
67
68
|
});
|
68
69
|
|
69
|
-
it(`Verifying itemengine preview data for item "${referenceId}"`, () => {
|
70
|
+
it(`Verifying itemengine preview data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
70
71
|
migrationQuestionTypes.forEach((questionType) => {
|
71
72
|
cy.log(`Verifying data for all ${questionType} question type`);
|
72
73
|
let currQuestionTypeArr = lrnQuestionDataArr.filter((question) => question.questionType === questionType);
|
@@ -79,13 +80,14 @@ if (referenceIds.length > 0) {
|
|
79
80
|
case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
|
80
81
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
81
82
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
83
|
+
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
82
84
|
default: throw new Error('Invalid ngie question type');
|
83
85
|
}
|
84
86
|
});
|
85
87
|
});
|
86
88
|
});
|
87
89
|
|
88
|
-
it(`Extracting learnosity grading data for item "${referenceId}"`, () => {
|
90
|
+
it(`Extracting learnosity grading data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
89
91
|
lrnPage.authorItemToolbarControlsWrapper()
|
90
92
|
.then(($element) => {
|
91
93
|
if ($element[0].innerHTML.includes('lrn-author-validate-questions-toggle')) {
|
@@ -106,7 +108,7 @@ if (referenceIds.length > 0) {
|
|
106
108
|
});
|
107
109
|
});
|
108
110
|
|
109
|
-
it(`Verifying itemengine grading data for item "${referenceId}"`, () => {
|
111
|
+
it(`Verifying itemengine grading data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
110
112
|
autoScoredScoringPreviewTab.steps.switchToGradingView();
|
111
113
|
cy.wait(500);
|
112
114
|
migrationQuestionTypes.forEach((questionType) => {
|
@@ -41,7 +41,7 @@ if (referenceIds.length > 0) {
|
|
41
41
|
lrnGradingDataArr = [];
|
42
42
|
});
|
43
43
|
|
44
|
-
it(`Extracting learnosity preview data for item "${referenceId}"`, () => {
|
44
|
+
it(`Extracting learnosity preview data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
45
45
|
lrnPage.questionTypeDiv()
|
46
46
|
.each(($el, index) => {
|
47
47
|
let currQuestionType = $el[0].innerText
|
@@ -60,13 +60,14 @@ if (referenceIds.length > 0) {
|
|
60
60
|
case lrnQuestionTypesENUM.essayResponse: return extractLrnQuestionData.essayResponse(lrnQuestionDataArr, index);
|
61
61
|
case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
|
62
62
|
case lrnQuestionTypesENUM.drawingResponse: return extractLrnQuestionData.drawingResponse(lrnQuestionDataArr, index);
|
63
|
+
case lrnQuestionTypesENUM.dndIntoCategories: return extractLrnQuestionData.dndIntoCategories(lrnQuestionDataArr, index);
|
63
64
|
default: throw new Error('Invalid lrn question type');
|
64
65
|
}
|
65
66
|
}
|
66
67
|
});
|
67
68
|
});
|
68
69
|
|
69
|
-
it(`Verifying itemengine preview data for item "${referenceId}"`, () => {
|
70
|
+
it(`Verifying itemengine preview data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
70
71
|
migrationQuestionTypes.forEach((questionType) => {
|
71
72
|
cy.log(`Verifying data for all ${questionType} question type`);
|
72
73
|
let currQuestionTypeArr = lrnQuestionDataArr.filter((question) => question.questionType === questionType);
|
@@ -79,13 +80,14 @@ if (referenceIds.length > 0) {
|
|
79
80
|
case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
|
80
81
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
81
82
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
83
|
+
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
82
84
|
default: throw new Error('Invalid ngie question type');
|
83
85
|
}
|
84
86
|
});
|
85
87
|
});
|
86
88
|
});
|
87
89
|
|
88
|
-
it(`Extracting learnosity grading data for item "${referenceId}"`, () => {
|
90
|
+
it(`Extracting learnosity grading data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
89
91
|
lrnPage.authorItemToolbarControlsWrapper()
|
90
92
|
.then(($element) => {
|
91
93
|
if ($element[0].innerHTML.includes('lrn-author-validate-questions-toggle')) {
|
@@ -106,7 +108,7 @@ if (referenceIds.length > 0) {
|
|
106
108
|
});
|
107
109
|
});
|
108
110
|
|
109
|
-
it(`Verifying itemengine grading data for item "${referenceId}"`, () => {
|
111
|
+
it(`Verifying itemengine grading data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
110
112
|
autoScoredScoringPreviewTab.steps.switchToGradingView();
|
111
113
|
cy.wait(500);
|
112
114
|
migrationQuestionTypes.forEach((questionType) => {
|
@@ -41,7 +41,7 @@ if (referenceIds.length > 0) {
|
|
41
41
|
lrnGradingDataArr = [];
|
42
42
|
});
|
43
43
|
|
44
|
-
it(`Extracting learnosity preview data for item "${referenceId}"`, () => {
|
44
|
+
it(`Extracting learnosity preview data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
45
45
|
lrnPage.questionTypeDiv()
|
46
46
|
.each(($el, index) => {
|
47
47
|
let currQuestionType = $el[0].innerText
|
@@ -60,13 +60,14 @@ if (referenceIds.length > 0) {
|
|
60
60
|
case lrnQuestionTypesENUM.essayResponse: return extractLrnQuestionData.essayResponse(lrnQuestionDataArr, index);
|
61
61
|
case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
|
62
62
|
case lrnQuestionTypesENUM.drawingResponse: return extractLrnQuestionData.drawingResponse(lrnQuestionDataArr, index);
|
63
|
+
case lrnQuestionTypesENUM.dndIntoCategories: return extractLrnQuestionData.dndIntoCategories(lrnQuestionDataArr, index);
|
63
64
|
default: throw new Error('Invalid lrn question type');
|
64
65
|
}
|
65
66
|
}
|
66
67
|
});
|
67
68
|
});
|
68
69
|
|
69
|
-
it(`Verifying itemengine preview data for item "${referenceId}"`, () => {
|
70
|
+
it(`Verifying itemengine preview data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
70
71
|
migrationQuestionTypes.forEach((questionType) => {
|
71
72
|
cy.log(`Verifying data for all ${questionType} question type`);
|
72
73
|
let currQuestionTypeArr = lrnQuestionDataArr.filter((question) => question.questionType === questionType);
|
@@ -79,13 +80,14 @@ if (referenceIds.length > 0) {
|
|
79
80
|
case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
|
80
81
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
81
82
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
83
|
+
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
82
84
|
default: throw new Error('Invalid ngie question type');
|
83
85
|
}
|
84
86
|
});
|
85
87
|
});
|
86
88
|
});
|
87
89
|
|
88
|
-
it(`Extracting learnosity grading data for item "${referenceId}"`, () => {
|
90
|
+
it(`Extracting learnosity grading data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
89
91
|
lrnPage.authorItemToolbarControlsWrapper()
|
90
92
|
.then(($element) => {
|
91
93
|
if ($element[0].innerHTML.includes('lrn-author-validate-questions-toggle')) {
|
@@ -106,7 +108,7 @@ if (referenceIds.length > 0) {
|
|
106
108
|
});
|
107
109
|
});
|
108
110
|
|
109
|
-
it(`Verifying itemengine grading data for item "${referenceId}"`, () => {
|
111
|
+
it(`Verifying itemengine grading data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
110
112
|
autoScoredScoringPreviewTab.steps.switchToGradingView();
|
111
113
|
cy.wait(500);
|
112
114
|
migrationQuestionTypes.forEach((questionType) => {
|
@@ -41,7 +41,7 @@ if (referenceIds.length > 0) {
|
|
41
41
|
lrnGradingDataArr = [];
|
42
42
|
});
|
43
43
|
|
44
|
-
it(`Extracting learnosity preview data for item "${referenceId}"`, () => {
|
44
|
+
it(`Extracting learnosity preview data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
45
45
|
lrnPage.questionTypeDiv()
|
46
46
|
.each(($el, index) => {
|
47
47
|
let currQuestionType = $el[0].innerText
|
@@ -60,13 +60,14 @@ if (referenceIds.length > 0) {
|
|
60
60
|
case lrnQuestionTypesENUM.essayResponse: return extractLrnQuestionData.essayResponse(lrnQuestionDataArr, index);
|
61
61
|
case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
|
62
62
|
case lrnQuestionTypesENUM.drawingResponse: return extractLrnQuestionData.drawingResponse(lrnQuestionDataArr, index);
|
63
|
+
case lrnQuestionTypesENUM.dndIntoCategories: return extractLrnQuestionData.dndIntoCategories(lrnQuestionDataArr, index);
|
63
64
|
default: throw new Error('Invalid lrn question type');
|
64
65
|
}
|
65
66
|
}
|
66
67
|
});
|
67
68
|
});
|
68
69
|
|
69
|
-
it(`Verifying itemengine preview data for item "${referenceId}"`, () => {
|
70
|
+
it(`Verifying itemengine preview data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
70
71
|
migrationQuestionTypes.forEach((questionType) => {
|
71
72
|
cy.log(`Verifying data for all ${questionType} question type`);
|
72
73
|
let currQuestionTypeArr = lrnQuestionDataArr.filter((question) => question.questionType === questionType);
|
@@ -79,13 +80,14 @@ if (referenceIds.length > 0) {
|
|
79
80
|
case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
|
80
81
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
81
82
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
83
|
+
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
82
84
|
default: throw new Error('Invalid ngie question type');
|
83
85
|
}
|
84
86
|
});
|
85
87
|
});
|
86
88
|
});
|
87
89
|
|
88
|
-
it(`Extracting learnosity grading data for item "${referenceId}"`, () => {
|
90
|
+
it(`Extracting learnosity grading data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
89
91
|
lrnPage.authorItemToolbarControlsWrapper()
|
90
92
|
.then(($element) => {
|
91
93
|
if ($element[0].innerHTML.includes('lrn-author-validate-questions-toggle')) {
|
@@ -106,7 +108,7 @@ if (referenceIds.length > 0) {
|
|
106
108
|
});
|
107
109
|
});
|
108
110
|
|
109
|
-
it(`Verifying itemengine grading data for item "${referenceId}"`, () => {
|
111
|
+
it(`Verifying itemengine grading data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
110
112
|
autoScoredScoringPreviewTab.steps.switchToGradingView();
|
111
113
|
cy.wait(500);
|
112
114
|
migrationQuestionTypes.forEach((questionType) => {
|
@@ -41,7 +41,7 @@ if (referenceIds.length > 0) {
|
|
41
41
|
lrnGradingDataArr = [];
|
42
42
|
});
|
43
43
|
|
44
|
-
it(`Extracting learnosity preview data for item "${referenceId}"`, () => {
|
44
|
+
it(`Extracting learnosity preview data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
45
45
|
lrnPage.questionTypeDiv()
|
46
46
|
.each(($el, index) => {
|
47
47
|
let currQuestionType = $el[0].innerText
|
@@ -60,13 +60,14 @@ if (referenceIds.length > 0) {
|
|
60
60
|
case lrnQuestionTypesENUM.essayResponse: return extractLrnQuestionData.essayResponse(lrnQuestionDataArr, index);
|
61
61
|
case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
|
62
62
|
case lrnQuestionTypesENUM.drawingResponse: return extractLrnQuestionData.drawingResponse(lrnQuestionDataArr, index);
|
63
|
+
case lrnQuestionTypesENUM.dndIntoCategories: return extractLrnQuestionData.dndIntoCategories(lrnQuestionDataArr, index);
|
63
64
|
default: throw new Error('Invalid lrn question type');
|
64
65
|
}
|
65
66
|
}
|
66
67
|
});
|
67
68
|
});
|
68
69
|
|
69
|
-
it(`Verifying itemengine preview data for item "${referenceId}"`, () => {
|
70
|
+
it(`Verifying itemengine preview data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
70
71
|
migrationQuestionTypes.forEach((questionType) => {
|
71
72
|
cy.log(`Verifying data for all ${questionType} question type`);
|
72
73
|
let currQuestionTypeArr = lrnQuestionDataArr.filter((question) => question.questionType === questionType);
|
@@ -79,13 +80,14 @@ if (referenceIds.length > 0) {
|
|
79
80
|
case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
|
80
81
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
81
82
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
83
|
+
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
82
84
|
default: throw new Error('Invalid ngie question type');
|
83
85
|
}
|
84
86
|
});
|
85
87
|
});
|
86
88
|
});
|
87
89
|
|
88
|
-
it(`Extracting learnosity grading data for item "${referenceId}"`, () => {
|
90
|
+
it(`Extracting learnosity grading data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
89
91
|
lrnPage.authorItemToolbarControlsWrapper()
|
90
92
|
.then(($element) => {
|
91
93
|
if ($element[0].innerHTML.includes('lrn-author-validate-questions-toggle')) {
|
@@ -106,7 +108,7 @@ if (referenceIds.length > 0) {
|
|
106
108
|
});
|
107
109
|
});
|
108
110
|
|
109
|
-
it(`Verifying itemengine grading data for item "${referenceId}"`, () => {
|
111
|
+
it(`Verifying itemengine grading data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
110
112
|
autoScoredScoringPreviewTab.steps.switchToGradingView();
|
111
113
|
cy.wait(500);
|
112
114
|
migrationQuestionTypes.forEach((questionType) => {
|
@@ -41,7 +41,7 @@ if (referenceIds.length > 0) {
|
|
41
41
|
lrnGradingDataArr = [];
|
42
42
|
});
|
43
43
|
|
44
|
-
it(`Extracting learnosity preview data for item "${referenceId}"`, () => {
|
44
|
+
it(`Extracting learnosity preview data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
45
45
|
lrnPage.questionTypeDiv()
|
46
46
|
.each(($el, index) => {
|
47
47
|
let currQuestionType = $el[0].innerText
|
@@ -60,13 +60,14 @@ if (referenceIds.length > 0) {
|
|
60
60
|
case lrnQuestionTypesENUM.essayResponse: return extractLrnQuestionData.essayResponse(lrnQuestionDataArr, index);
|
61
61
|
case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
|
62
62
|
case lrnQuestionTypesENUM.drawingResponse: return extractLrnQuestionData.drawingResponse(lrnQuestionDataArr, index);
|
63
|
+
case lrnQuestionTypesENUM.dndIntoCategories: return extractLrnQuestionData.dndIntoCategories(lrnQuestionDataArr, index);
|
63
64
|
default: throw new Error('Invalid lrn question type');
|
64
65
|
}
|
65
66
|
}
|
66
67
|
});
|
67
68
|
});
|
68
69
|
|
69
|
-
it(`Verifying itemengine preview data for item "${referenceId}"`, () => {
|
70
|
+
it(`Verifying itemengine preview data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
70
71
|
migrationQuestionTypes.forEach((questionType) => {
|
71
72
|
cy.log(`Verifying data for all ${questionType} question type`);
|
72
73
|
let currQuestionTypeArr = lrnQuestionDataArr.filter((question) => question.questionType === questionType);
|
@@ -79,13 +80,14 @@ if (referenceIds.length > 0) {
|
|
79
80
|
case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
|
80
81
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
81
82
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
83
|
+
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
82
84
|
default: throw new Error('Invalid ngie question type');
|
83
85
|
}
|
84
86
|
});
|
85
87
|
});
|
86
88
|
});
|
87
89
|
|
88
|
-
it(`Extracting learnosity grading data for item "${referenceId}"`, () => {
|
90
|
+
it(`Extracting learnosity grading data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
89
91
|
lrnPage.authorItemToolbarControlsWrapper()
|
90
92
|
.then(($element) => {
|
91
93
|
if ($element[0].innerHTML.includes('lrn-author-validate-questions-toggle')) {
|
@@ -106,7 +108,7 @@ if (referenceIds.length > 0) {
|
|
106
108
|
});
|
107
109
|
});
|
108
110
|
|
109
|
-
it(`Verifying itemengine grading data for item "${referenceId}"`, () => {
|
111
|
+
it(`Verifying itemengine grading data for item "${Cypress.config().baseUrl}/items-list/item/${utilities.base64Encoding(referenceId)}"`, () => {
|
110
112
|
autoScoredScoringPreviewTab.steps.switchToGradingView();
|
111
113
|
cy.wait(500);
|
112
114
|
migrationQuestionTypes.forEach((questionType) => {
|
@@ -20,6 +20,11 @@ export const lrnPage = {
|
|
20
20
|
drawingToolbar: () => cy.get('.lrn_toolbar'),
|
21
21
|
drawingToolbarButton: () => cy.get('.lrn_btn'),
|
22
22
|
drawingCanvasImage: () => cy.get('.lrn-canvas-container .lrn-image-source'),
|
23
|
+
dndCategoriesTable: () => cy.get('.lrn_classification_table'),
|
24
|
+
dndCategoriesTableRow: () => cy.get('.lrn_classification_table tr'),
|
25
|
+
draggableResponse: () => cy.get('[aria-label="Possible responses"] .lrn_btn_drag'),
|
26
|
+
draggableResponseImage: () => cy.get('[aria-label="Possible responses"] .lrn_btn_drag img'),
|
27
|
+
draggableResponseMathMl: () => cy.get('[aria-label="Possible responses"] .lrn_btn_drag math'),
|
23
28
|
steps: {
|
24
29
|
checkShowAnswersToggle: () => {
|
25
30
|
lrnPage.showAnswersToggle()
|
@@ -350,10 +355,10 @@ export const extractLrnQuestionData = {
|
|
350
355
|
.eq(0)
|
351
356
|
.within(() => {
|
352
357
|
lrnPage.drawingToolbarButton()
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
358
|
+
.each(($button) => {
|
359
|
+
let ariaLabel = $button[0].attributes["aria-label"].nodeValue;
|
360
|
+
toolbarButtons.push(ariaLabel);
|
361
|
+
});
|
357
362
|
});
|
358
363
|
obj.toolbarButtons = toolbarButtons;
|
359
364
|
lrnPage.drawingCanvasImage()
|
@@ -366,6 +371,69 @@ export const extractLrnQuestionData = {
|
|
366
371
|
});
|
367
372
|
lrnQuestionDataArr.push(obj);
|
368
373
|
},
|
374
|
+
|
375
|
+
dndIntoCategories: (lrnQuestionDataArr, index) => {
|
376
|
+
let obj = {};
|
377
|
+
cy.log(`Extracting the question instructions and options from question ${index}`);
|
378
|
+
obj.questionIndex = index;
|
379
|
+
obj.questionType = 'dndIntoCategories'
|
380
|
+
lrnPage.questionWrapper()
|
381
|
+
.eq(index)
|
382
|
+
.within(() => {
|
383
|
+
lrnPage.questionInstructions()
|
384
|
+
.then(($ins) => {
|
385
|
+
let text = $ins[0].innerText;
|
386
|
+
obj.previewQuestionInstructions = text;
|
387
|
+
});
|
388
|
+
//TODO: for now treating all the cells as same and just storing the inner text, lateron type of the cell can also be stored
|
389
|
+
let tableMatrix = [];
|
390
|
+
lrnPage.dndCategoriesTableRow()
|
391
|
+
.each(($tr) => {
|
392
|
+
let rowContents = [];
|
393
|
+
$tr[0].children.forEach(($th) => {
|
394
|
+
rowContents.push($th.innerText);
|
395
|
+
});
|
396
|
+
tableMatrix.push(rowContents);
|
397
|
+
});
|
398
|
+
obj.tableMatrix = tableMatrix;
|
399
|
+
let options = [];
|
400
|
+
let optionImages = [];
|
401
|
+
let optionEquations = [];
|
402
|
+
lrnPage.draggableResponse()
|
403
|
+
.each(($option, index) => {
|
404
|
+
let innerText = $option[0].innerText;
|
405
|
+
options.push(innerText);
|
406
|
+
let innerHTML = $option[0].innerHTML;
|
407
|
+
if (innerHTML.includes('<img')) {
|
408
|
+
lrnPage.draggableResponse()
|
409
|
+
.eq(index)
|
410
|
+
.find('img')
|
411
|
+
.then(($img) => {
|
412
|
+
let altText = $img[0].alt;
|
413
|
+
optionImages.push(altText);
|
414
|
+
});
|
415
|
+
}
|
416
|
+
if (innerHTML.includes('<math')) {
|
417
|
+
lrnPage.draggableResponse()
|
418
|
+
.eq(index)
|
419
|
+
.find('math')
|
420
|
+
.then(($element) => {
|
421
|
+
let outerHtml = $element[0].outerHTML;
|
422
|
+
optionEquations.push(outerHtml);
|
423
|
+
});
|
424
|
+
}
|
425
|
+
});
|
426
|
+
obj.options = options;
|
427
|
+
obj.optionImages = optionImages;
|
428
|
+
obj.optionEquations = optionEquations;
|
429
|
+
//droppable options innerText, if image then image alt text, dragHandle if lrn_icon...
|
430
|
+
//show drag handles
|
431
|
+
|
432
|
+
//grouped or standard
|
433
|
+
//correct answers options
|
434
|
+
});
|
435
|
+
lrnQuestionDataArr.push(obj);
|
436
|
+
},
|
369
437
|
/* singleSelection: (lrnQuestionDataArr, index) => {
|
370
438
|
let obj = {};
|
371
439
|
cy.log(`Extracting the question instructions and options from question ${index}`);
|
@@ -5,6 +5,7 @@ const lrnQuestionTypesENUM = {
|
|
5
5
|
essayResponse: 'essayResponse',
|
6
6
|
essayResponseBasic: 'Essay with plain text',
|
7
7
|
drawingResponse: 'Drawing',
|
8
|
+
dndIntoCategories: 'Classification',
|
8
9
|
singleSelection: 'Multiple choice – standard',
|
9
10
|
multipleSelection: 'Multiple choice – multiple response',
|
10
11
|
trueOrFalse: 'True or false',
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { essayResponsePage, multipleSelectionPage } from "../../pages";
|
2
|
+
import { draggableOptionContainer } from "../../pages/components";
|
2
3
|
import { singleSelectionPage } from "../../pages/singleSelectionPage"
|
3
4
|
import utilities from "../helpers/utilities";
|
4
5
|
import drawingToolbarOptionsENUM from "./drawingToolbarOptionsENUM";
|
@@ -255,11 +256,58 @@ export const verifyIeQuestionData = {
|
|
255
256
|
} else {
|
256
257
|
expect(ariaLabel).to.be.eq('Image');
|
257
258
|
}
|
258
|
-
//need to verify backgroundImageWidth currently it is varying in all drawing response migrated items
|
259
|
+
//TODO: need to verify backgroundImageWidth currently it is varying in all drawing response migrated items
|
259
260
|
});
|
260
261
|
});
|
261
262
|
},
|
262
263
|
|
264
|
+
dndIntoCategories: (expectedQuestionData, index) => {
|
265
|
+
cy.get('.ngie-drag-and-drop-into-categories')
|
266
|
+
.eq(index)
|
267
|
+
.within(() => {
|
268
|
+
utilities.verifyInnerText(singleSelectionPage.questionInstructionsText(), expectedQuestionData.previewQuestionInstructions);
|
269
|
+
cy.get('.row')
|
270
|
+
.then(($rows) => {
|
271
|
+
expect($rows.length).to.be.eq(expectedQuestionData.tableMatrix.length);
|
272
|
+
expect($rows[0].children.length).to.be.eq(expectedQuestionData.tableMatrix[0].length);
|
273
|
+
});
|
274
|
+
cy.get('.row')
|
275
|
+
.each(($row, rowIndex) => {
|
276
|
+
$row[0].children.forEach(($cell, colIndex) => {
|
277
|
+
expect($cell.innerText).to.deep.eq(expectedQuestionData.tableMatrix[rowIndex][colIndex]);
|
278
|
+
});
|
279
|
+
});
|
280
|
+
let options = [];
|
281
|
+
draggableOptionContainer.draggableOption()
|
282
|
+
.each(($option) => {
|
283
|
+
let innerText = $option[0].innerText;
|
284
|
+
options.push(innerText);
|
285
|
+
}).then(() => {
|
286
|
+
expect(options).to.have.deep.members(expectedQuestionData.options);
|
287
|
+
});
|
288
|
+
if (expectedQuestionData.optionEquations) {
|
289
|
+
let optionEquations = [];
|
290
|
+
draggableOptionContainer.draggableOption()
|
291
|
+
.find('math')
|
292
|
+
.each(($math) => {
|
293
|
+
optionEquations.push($math.get(0).outerHTML);
|
294
|
+
}).then(() => {
|
295
|
+
expect(optionEquations).to.have.deep.members(expectedQuestionData.optionEquations);
|
296
|
+
});
|
297
|
+
}
|
298
|
+
if (expectedQuestionData.optionImages) {
|
299
|
+
let optionImages = [];
|
300
|
+
draggableOptionContainer.draggableOption()
|
301
|
+
.find('img')
|
302
|
+
.each(($img) => {
|
303
|
+
optionImages.push($img.get(0).alt);
|
304
|
+
}).then(() => {
|
305
|
+
expect(optionImages).to.have.deep.members(expectedQuestionData.optionImages);
|
306
|
+
});
|
307
|
+
}
|
308
|
+
});
|
309
|
+
},
|
310
|
+
|
263
311
|
/* singleSelection: (expectedQuestionData, index) => {
|
264
312
|
cy.get('.ngie-single-select')
|
265
313
|
.eq(index)
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "itemengine-cypress-automation",
|
3
|
-
"version": "1.0.140
|
3
|
+
"version": "1.0.140",
|
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
|
+
}
|
@@ -79,7 +79,6 @@ export function runSorryCypressLocal() {
|
|
79
79
|
ciBuildId = setCiBuildId(user, startTime);
|
80
80
|
const envArgs = setCommandLineEnvArgs()
|
81
81
|
let command = `cy2 run --parallel --browser chrome --record --key imaginelearning/itemengine-cypress-automation --ci-build-id ${ciBuildId} ${envArgs} --spec cypress/e2e/ILC/**/*.js`;
|
82
|
-
console.log(`command: ${command}`);
|
83
82
|
execSync(command, { stdio: "inherit" });
|
84
83
|
}
|
85
84
|
|
@@ -92,7 +91,6 @@ export function runSorryCypressSpinnaker() {
|
|
92
91
|
ciBuildId = setCiBuildId("spinnaker", startTime);
|
93
92
|
const envArgs = setCommandLineEnvArgs()
|
94
93
|
let command = `cy2 run --parallel --browser chrome --record --key imaginelearning/itemengine-cypress-automation --ci-build-id ${ciBuildId} ${envArgs} --spec cypress/e2e/ILC/**/*.js`;
|
95
|
-
console.log(`command: ${command}`);
|
96
94
|
execSync(command, { stdio: "inherit" });
|
97
95
|
}
|
98
96
|
|
@@ -106,7 +104,6 @@ export function runSorryCypressSpinnaker() {
|
|
106
104
|
ciBuildId = setCiBuildId(user, startTime);
|
107
105
|
const envArgs = setCommandLineEnvArgs()
|
108
106
|
let command = `cy2 run --parallel --browser chrome --record --key imaginelearning/itemengine-cypress-automation --ci-build-id ${ciBuildId} ${envArgs} --spec cypress/e2e/ILC/**/*.smoke.js`;
|
109
|
-
console.log(`command: ${command}`);
|
110
107
|
execSync(command, { stdio: "inherit" });
|
111
108
|
}
|
112
109
|
|
@@ -119,7 +116,6 @@ export function runSorryCypressSpinnakerSmoke() {
|
|
119
116
|
ciBuildId = setCiBuildId("spinnaker", startTime);
|
120
117
|
const envArgs = setCommandLineEnvArgs()
|
121
118
|
let command = `cy2 run --parallel --browser chrome --record --key imaginelearning/itemengine-cypress-automation --ci-build-id ${ciBuildId} ${envArgs} --spec cypress/e2e/ILC/**/*.smoke.js`;
|
122
|
-
console.log(`command: ${command}`);
|
123
119
|
execSync(command, { stdio: "inherit" });
|
124
120
|
}
|
125
121
|
|