itemengine-cypress-automation 1.0.138-migrationScripts-9f62b96.0 → 1.0.140-npmScriptsUpdate-efe1b9e.0
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 +6 -8
- package/cypress/e2e/migration/migration10.js +4 -6
- package/cypress/e2e/migration/migration2.js +4 -6
- package/cypress/e2e/migration/migration3.js +4 -6
- package/cypress/e2e/migration/migration4.js +4 -6
- package/cypress/e2e/migration/migration5.js +4 -6
- package/cypress/e2e/migration/migration6.js +4 -6
- package/cypress/e2e/migration/migration7.js +4 -6
- package/cypress/e2e/migration/migration8.js +4 -6
- package/cypress/e2e/migration/migration9.js +4 -6
- package/cypress/support/migrationHelpers/extractLrnQuestionData.js +4 -72
- package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +0 -1
- package/cypress/support/migrationHelpers/verifyIeQuestionData.js +1 -49
- package/package.json +6 -6
- package/scripts/smoke.mjs +3 -0
- package/scripts/smokeLocal.mjs +3 -0
- package/scripts/sorry-cypress.mjs +36 -7
@@ -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');//["drawingResponse"]
|
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);//["85f864fd-8ce9-4d9d-a326-afb13963d6bd", "6ff35364-0fb6-4cc4-b09c-426f6199e3d6", "d5644e39-1f23-4c4d-a6ad-f80fee66cb62"]
|
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 "${
|
44
|
+
it(`Extracting learnosity preview data for item "${referenceId}"`, () => {
|
45
45
|
lrnPage.questionTypeDiv()
|
46
46
|
.each(($el, index) => {
|
47
47
|
let currQuestionType = $el[0].innerText
|
@@ -60,14 +60,13 @@ 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);
|
64
63
|
default: throw new Error('Invalid lrn question type');
|
65
64
|
}
|
66
65
|
}
|
67
66
|
});
|
68
67
|
});
|
69
68
|
|
70
|
-
it(`Verifying itemengine preview data for item "${
|
69
|
+
it(`Verifying itemengine preview data for item "${referenceId}"`, () => {
|
71
70
|
migrationQuestionTypes.forEach((questionType) => {
|
72
71
|
cy.log(`Verifying data for all ${questionType} question type`);
|
73
72
|
let currQuestionTypeArr = lrnQuestionDataArr.filter((question) => question.questionType === questionType);
|
@@ -80,14 +79,13 @@ if (referenceIds.length > 0) {
|
|
80
79
|
case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
|
81
80
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
82
81
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
83
|
-
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
84
82
|
default: throw new Error('Invalid ngie question type');
|
85
83
|
}
|
86
84
|
});
|
87
85
|
});
|
88
86
|
});
|
89
87
|
|
90
|
-
it(`Extracting learnosity grading data for item "${
|
88
|
+
it(`Extracting learnosity grading data for item "${referenceId}"`, () => {
|
91
89
|
lrnPage.authorItemToolbarControlsWrapper()
|
92
90
|
.then(($element) => {
|
93
91
|
if ($element[0].innerHTML.includes('lrn-author-validate-questions-toggle')) {
|
@@ -108,7 +106,7 @@ if (referenceIds.length > 0) {
|
|
108
106
|
});
|
109
107
|
});
|
110
108
|
|
111
|
-
it(`Verifying itemengine grading data for item "${
|
109
|
+
it(`Verifying itemengine grading data for item "${referenceId}"`, () => {
|
112
110
|
autoScoredScoringPreviewTab.steps.switchToGradingView();
|
113
111
|
cy.wait(500);
|
114
112
|
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 "${
|
44
|
+
it(`Extracting learnosity preview data for item "${referenceId}"`, () => {
|
45
45
|
lrnPage.questionTypeDiv()
|
46
46
|
.each(($el, index) => {
|
47
47
|
let currQuestionType = $el[0].innerText
|
@@ -60,14 +60,13 @@ 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);
|
64
63
|
default: throw new Error('Invalid lrn question type');
|
65
64
|
}
|
66
65
|
}
|
67
66
|
});
|
68
67
|
});
|
69
68
|
|
70
|
-
it(`Verifying itemengine preview data for item "${
|
69
|
+
it(`Verifying itemengine preview data for item "${referenceId}"`, () => {
|
71
70
|
migrationQuestionTypes.forEach((questionType) => {
|
72
71
|
cy.log(`Verifying data for all ${questionType} question type`);
|
73
72
|
let currQuestionTypeArr = lrnQuestionDataArr.filter((question) => question.questionType === questionType);
|
@@ -80,14 +79,13 @@ if (referenceIds.length > 0) {
|
|
80
79
|
case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
|
81
80
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
82
81
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
83
|
-
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
84
82
|
default: throw new Error('Invalid ngie question type');
|
85
83
|
}
|
86
84
|
});
|
87
85
|
});
|
88
86
|
});
|
89
87
|
|
90
|
-
it(`Extracting learnosity grading data for item "${
|
88
|
+
it(`Extracting learnosity grading data for item "${referenceId}"`, () => {
|
91
89
|
lrnPage.authorItemToolbarControlsWrapper()
|
92
90
|
.then(($element) => {
|
93
91
|
if ($element[0].innerHTML.includes('lrn-author-validate-questions-toggle')) {
|
@@ -108,7 +106,7 @@ if (referenceIds.length > 0) {
|
|
108
106
|
});
|
109
107
|
});
|
110
108
|
|
111
|
-
it(`Verifying itemengine grading data for item "${
|
109
|
+
it(`Verifying itemengine grading data for item "${referenceId}"`, () => {
|
112
110
|
autoScoredScoringPreviewTab.steps.switchToGradingView();
|
113
111
|
cy.wait(500);
|
114
112
|
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 "${
|
44
|
+
it(`Extracting learnosity preview data for item "${referenceId}"`, () => {
|
45
45
|
lrnPage.questionTypeDiv()
|
46
46
|
.each(($el, index) => {
|
47
47
|
let currQuestionType = $el[0].innerText
|
@@ -60,14 +60,13 @@ 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);
|
64
63
|
default: throw new Error('Invalid lrn question type');
|
65
64
|
}
|
66
65
|
}
|
67
66
|
});
|
68
67
|
});
|
69
68
|
|
70
|
-
it(`Verifying itemengine preview data for item "${
|
69
|
+
it(`Verifying itemengine preview data for item "${referenceId}"`, () => {
|
71
70
|
migrationQuestionTypes.forEach((questionType) => {
|
72
71
|
cy.log(`Verifying data for all ${questionType} question type`);
|
73
72
|
let currQuestionTypeArr = lrnQuestionDataArr.filter((question) => question.questionType === questionType);
|
@@ -80,14 +79,13 @@ if (referenceIds.length > 0) {
|
|
80
79
|
case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
|
81
80
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
82
81
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
83
|
-
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
84
82
|
default: throw new Error('Invalid ngie question type');
|
85
83
|
}
|
86
84
|
});
|
87
85
|
});
|
88
86
|
});
|
89
87
|
|
90
|
-
it(`Extracting learnosity grading data for item "${
|
88
|
+
it(`Extracting learnosity grading data for item "${referenceId}"`, () => {
|
91
89
|
lrnPage.authorItemToolbarControlsWrapper()
|
92
90
|
.then(($element) => {
|
93
91
|
if ($element[0].innerHTML.includes('lrn-author-validate-questions-toggle')) {
|
@@ -108,7 +106,7 @@ if (referenceIds.length > 0) {
|
|
108
106
|
});
|
109
107
|
});
|
110
108
|
|
111
|
-
it(`Verifying itemengine grading data for item "${
|
109
|
+
it(`Verifying itemengine grading data for item "${referenceId}"`, () => {
|
112
110
|
autoScoredScoringPreviewTab.steps.switchToGradingView();
|
113
111
|
cy.wait(500);
|
114
112
|
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 "${
|
44
|
+
it(`Extracting learnosity preview data for item "${referenceId}"`, () => {
|
45
45
|
lrnPage.questionTypeDiv()
|
46
46
|
.each(($el, index) => {
|
47
47
|
let currQuestionType = $el[0].innerText
|
@@ -60,14 +60,13 @@ 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);
|
64
63
|
default: throw new Error('Invalid lrn question type');
|
65
64
|
}
|
66
65
|
}
|
67
66
|
});
|
68
67
|
});
|
69
68
|
|
70
|
-
it(`Verifying itemengine preview data for item "${
|
69
|
+
it(`Verifying itemengine preview data for item "${referenceId}"`, () => {
|
71
70
|
migrationQuestionTypes.forEach((questionType) => {
|
72
71
|
cy.log(`Verifying data for all ${questionType} question type`);
|
73
72
|
let currQuestionTypeArr = lrnQuestionDataArr.filter((question) => question.questionType === questionType);
|
@@ -80,14 +79,13 @@ if (referenceIds.length > 0) {
|
|
80
79
|
case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
|
81
80
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
82
81
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
83
|
-
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
84
82
|
default: throw new Error('Invalid ngie question type');
|
85
83
|
}
|
86
84
|
});
|
87
85
|
});
|
88
86
|
});
|
89
87
|
|
90
|
-
it(`Extracting learnosity grading data for item "${
|
88
|
+
it(`Extracting learnosity grading data for item "${referenceId}"`, () => {
|
91
89
|
lrnPage.authorItemToolbarControlsWrapper()
|
92
90
|
.then(($element) => {
|
93
91
|
if ($element[0].innerHTML.includes('lrn-author-validate-questions-toggle')) {
|
@@ -108,7 +106,7 @@ if (referenceIds.length > 0) {
|
|
108
106
|
});
|
109
107
|
});
|
110
108
|
|
111
|
-
it(`Verifying itemengine grading data for item "${
|
109
|
+
it(`Verifying itemengine grading data for item "${referenceId}"`, () => {
|
112
110
|
autoScoredScoringPreviewTab.steps.switchToGradingView();
|
113
111
|
cy.wait(500);
|
114
112
|
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 "${
|
44
|
+
it(`Extracting learnosity preview data for item "${referenceId}"`, () => {
|
45
45
|
lrnPage.questionTypeDiv()
|
46
46
|
.each(($el, index) => {
|
47
47
|
let currQuestionType = $el[0].innerText
|
@@ -60,14 +60,13 @@ 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);
|
64
63
|
default: throw new Error('Invalid lrn question type');
|
65
64
|
}
|
66
65
|
}
|
67
66
|
});
|
68
67
|
});
|
69
68
|
|
70
|
-
it(`Verifying itemengine preview data for item "${
|
69
|
+
it(`Verifying itemengine preview data for item "${referenceId}"`, () => {
|
71
70
|
migrationQuestionTypes.forEach((questionType) => {
|
72
71
|
cy.log(`Verifying data for all ${questionType} question type`);
|
73
72
|
let currQuestionTypeArr = lrnQuestionDataArr.filter((question) => question.questionType === questionType);
|
@@ -80,14 +79,13 @@ if (referenceIds.length > 0) {
|
|
80
79
|
case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
|
81
80
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
82
81
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
83
|
-
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
84
82
|
default: throw new Error('Invalid ngie question type');
|
85
83
|
}
|
86
84
|
});
|
87
85
|
});
|
88
86
|
});
|
89
87
|
|
90
|
-
it(`Extracting learnosity grading data for item "${
|
88
|
+
it(`Extracting learnosity grading data for item "${referenceId}"`, () => {
|
91
89
|
lrnPage.authorItemToolbarControlsWrapper()
|
92
90
|
.then(($element) => {
|
93
91
|
if ($element[0].innerHTML.includes('lrn-author-validate-questions-toggle')) {
|
@@ -108,7 +106,7 @@ if (referenceIds.length > 0) {
|
|
108
106
|
});
|
109
107
|
});
|
110
108
|
|
111
|
-
it(`Verifying itemengine grading data for item "${
|
109
|
+
it(`Verifying itemengine grading data for item "${referenceId}"`, () => {
|
112
110
|
autoScoredScoringPreviewTab.steps.switchToGradingView();
|
113
111
|
cy.wait(500);
|
114
112
|
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 "${
|
44
|
+
it(`Extracting learnosity preview data for item "${referenceId}"`, () => {
|
45
45
|
lrnPage.questionTypeDiv()
|
46
46
|
.each(($el, index) => {
|
47
47
|
let currQuestionType = $el[0].innerText
|
@@ -60,14 +60,13 @@ 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);
|
64
63
|
default: throw new Error('Invalid lrn question type');
|
65
64
|
}
|
66
65
|
}
|
67
66
|
});
|
68
67
|
});
|
69
68
|
|
70
|
-
it(`Verifying itemengine preview data for item "${
|
69
|
+
it(`Verifying itemengine preview data for item "${referenceId}"`, () => {
|
71
70
|
migrationQuestionTypes.forEach((questionType) => {
|
72
71
|
cy.log(`Verifying data for all ${questionType} question type`);
|
73
72
|
let currQuestionTypeArr = lrnQuestionDataArr.filter((question) => question.questionType === questionType);
|
@@ -80,14 +79,13 @@ if (referenceIds.length > 0) {
|
|
80
79
|
case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
|
81
80
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
82
81
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
83
|
-
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
84
82
|
default: throw new Error('Invalid ngie question type');
|
85
83
|
}
|
86
84
|
});
|
87
85
|
});
|
88
86
|
});
|
89
87
|
|
90
|
-
it(`Extracting learnosity grading data for item "${
|
88
|
+
it(`Extracting learnosity grading data for item "${referenceId}"`, () => {
|
91
89
|
lrnPage.authorItemToolbarControlsWrapper()
|
92
90
|
.then(($element) => {
|
93
91
|
if ($element[0].innerHTML.includes('lrn-author-validate-questions-toggle')) {
|
@@ -108,7 +106,7 @@ if (referenceIds.length > 0) {
|
|
108
106
|
});
|
109
107
|
});
|
110
108
|
|
111
|
-
it(`Verifying itemengine grading data for item "${
|
109
|
+
it(`Verifying itemengine grading data for item "${referenceId}"`, () => {
|
112
110
|
autoScoredScoringPreviewTab.steps.switchToGradingView();
|
113
111
|
cy.wait(500);
|
114
112
|
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 "${
|
44
|
+
it(`Extracting learnosity preview data for item "${referenceId}"`, () => {
|
45
45
|
lrnPage.questionTypeDiv()
|
46
46
|
.each(($el, index) => {
|
47
47
|
let currQuestionType = $el[0].innerText
|
@@ -60,14 +60,13 @@ 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);
|
64
63
|
default: throw new Error('Invalid lrn question type');
|
65
64
|
}
|
66
65
|
}
|
67
66
|
});
|
68
67
|
});
|
69
68
|
|
70
|
-
it(`Verifying itemengine preview data for item "${
|
69
|
+
it(`Verifying itemengine preview data for item "${referenceId}"`, () => {
|
71
70
|
migrationQuestionTypes.forEach((questionType) => {
|
72
71
|
cy.log(`Verifying data for all ${questionType} question type`);
|
73
72
|
let currQuestionTypeArr = lrnQuestionDataArr.filter((question) => question.questionType === questionType);
|
@@ -80,14 +79,13 @@ if (referenceIds.length > 0) {
|
|
80
79
|
case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
|
81
80
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
82
81
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
83
|
-
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
84
82
|
default: throw new Error('Invalid ngie question type');
|
85
83
|
}
|
86
84
|
});
|
87
85
|
});
|
88
86
|
});
|
89
87
|
|
90
|
-
it(`Extracting learnosity grading data for item "${
|
88
|
+
it(`Extracting learnosity grading data for item "${referenceId}"`, () => {
|
91
89
|
lrnPage.authorItemToolbarControlsWrapper()
|
92
90
|
.then(($element) => {
|
93
91
|
if ($element[0].innerHTML.includes('lrn-author-validate-questions-toggle')) {
|
@@ -108,7 +106,7 @@ if (referenceIds.length > 0) {
|
|
108
106
|
});
|
109
107
|
});
|
110
108
|
|
111
|
-
it(`Verifying itemengine grading data for item "${
|
109
|
+
it(`Verifying itemengine grading data for item "${referenceId}"`, () => {
|
112
110
|
autoScoredScoringPreviewTab.steps.switchToGradingView();
|
113
111
|
cy.wait(500);
|
114
112
|
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 "${
|
44
|
+
it(`Extracting learnosity preview data for item "${referenceId}"`, () => {
|
45
45
|
lrnPage.questionTypeDiv()
|
46
46
|
.each(($el, index) => {
|
47
47
|
let currQuestionType = $el[0].innerText
|
@@ -60,14 +60,13 @@ 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);
|
64
63
|
default: throw new Error('Invalid lrn question type');
|
65
64
|
}
|
66
65
|
}
|
67
66
|
});
|
68
67
|
});
|
69
68
|
|
70
|
-
it(`Verifying itemengine preview data for item "${
|
69
|
+
it(`Verifying itemengine preview data for item "${referenceId}"`, () => {
|
71
70
|
migrationQuestionTypes.forEach((questionType) => {
|
72
71
|
cy.log(`Verifying data for all ${questionType} question type`);
|
73
72
|
let currQuestionTypeArr = lrnQuestionDataArr.filter((question) => question.questionType === questionType);
|
@@ -80,14 +79,13 @@ if (referenceIds.length > 0) {
|
|
80
79
|
case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
|
81
80
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
82
81
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
83
|
-
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
84
82
|
default: throw new Error('Invalid ngie question type');
|
85
83
|
}
|
86
84
|
});
|
87
85
|
});
|
88
86
|
});
|
89
87
|
|
90
|
-
it(`Extracting learnosity grading data for item "${
|
88
|
+
it(`Extracting learnosity grading data for item "${referenceId}"`, () => {
|
91
89
|
lrnPage.authorItemToolbarControlsWrapper()
|
92
90
|
.then(($element) => {
|
93
91
|
if ($element[0].innerHTML.includes('lrn-author-validate-questions-toggle')) {
|
@@ -108,7 +106,7 @@ if (referenceIds.length > 0) {
|
|
108
106
|
});
|
109
107
|
});
|
110
108
|
|
111
|
-
it(`Verifying itemengine grading data for item "${
|
109
|
+
it(`Verifying itemengine grading data for item "${referenceId}"`, () => {
|
112
110
|
autoScoredScoringPreviewTab.steps.switchToGradingView();
|
113
111
|
cy.wait(500);
|
114
112
|
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 "${
|
44
|
+
it(`Extracting learnosity preview data for item "${referenceId}"`, () => {
|
45
45
|
lrnPage.questionTypeDiv()
|
46
46
|
.each(($el, index) => {
|
47
47
|
let currQuestionType = $el[0].innerText
|
@@ -60,14 +60,13 @@ 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);
|
64
63
|
default: throw new Error('Invalid lrn question type');
|
65
64
|
}
|
66
65
|
}
|
67
66
|
});
|
68
67
|
});
|
69
68
|
|
70
|
-
it(`Verifying itemengine preview data for item "${
|
69
|
+
it(`Verifying itemengine preview data for item "${referenceId}"`, () => {
|
71
70
|
migrationQuestionTypes.forEach((questionType) => {
|
72
71
|
cy.log(`Verifying data for all ${questionType} question type`);
|
73
72
|
let currQuestionTypeArr = lrnQuestionDataArr.filter((question) => question.questionType === questionType);
|
@@ -80,14 +79,13 @@ if (referenceIds.length > 0) {
|
|
80
79
|
case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
|
81
80
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
82
81
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
83
|
-
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
84
82
|
default: throw new Error('Invalid ngie question type');
|
85
83
|
}
|
86
84
|
});
|
87
85
|
});
|
88
86
|
});
|
89
87
|
|
90
|
-
it(`Extracting learnosity grading data for item "${
|
88
|
+
it(`Extracting learnosity grading data for item "${referenceId}"`, () => {
|
91
89
|
lrnPage.authorItemToolbarControlsWrapper()
|
92
90
|
.then(($element) => {
|
93
91
|
if ($element[0].innerHTML.includes('lrn-author-validate-questions-toggle')) {
|
@@ -108,7 +106,7 @@ if (referenceIds.length > 0) {
|
|
108
106
|
});
|
109
107
|
});
|
110
108
|
|
111
|
-
it(`Verifying itemengine grading data for item "${
|
109
|
+
it(`Verifying itemengine grading data for item "${referenceId}"`, () => {
|
112
110
|
autoScoredScoringPreviewTab.steps.switchToGradingView();
|
113
111
|
cy.wait(500);
|
114
112
|
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 "${
|
44
|
+
it(`Extracting learnosity preview data for item "${referenceId}"`, () => {
|
45
45
|
lrnPage.questionTypeDiv()
|
46
46
|
.each(($el, index) => {
|
47
47
|
let currQuestionType = $el[0].innerText
|
@@ -60,14 +60,13 @@ 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);
|
64
63
|
default: throw new Error('Invalid lrn question type');
|
65
64
|
}
|
66
65
|
}
|
67
66
|
});
|
68
67
|
});
|
69
68
|
|
70
|
-
it(`Verifying itemengine preview data for item "${
|
69
|
+
it(`Verifying itemengine preview data for item "${referenceId}"`, () => {
|
71
70
|
migrationQuestionTypes.forEach((questionType) => {
|
72
71
|
cy.log(`Verifying data for all ${questionType} question type`);
|
73
72
|
let currQuestionTypeArr = lrnQuestionDataArr.filter((question) => question.questionType === questionType);
|
@@ -80,14 +79,13 @@ if (referenceIds.length > 0) {
|
|
80
79
|
case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
|
81
80
|
case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
|
82
81
|
case 'drawingResponse': return verifyIeQuestionData.drawingResponse(questionData, index);
|
83
|
-
case 'dndIntoCategories': return verifyIeQuestionData.dndIntoCategories(questionData, index);
|
84
82
|
default: throw new Error('Invalid ngie question type');
|
85
83
|
}
|
86
84
|
});
|
87
85
|
});
|
88
86
|
});
|
89
87
|
|
90
|
-
it(`Extracting learnosity grading data for item "${
|
88
|
+
it(`Extracting learnosity grading data for item "${referenceId}"`, () => {
|
91
89
|
lrnPage.authorItemToolbarControlsWrapper()
|
92
90
|
.then(($element) => {
|
93
91
|
if ($element[0].innerHTML.includes('lrn-author-validate-questions-toggle')) {
|
@@ -108,7 +106,7 @@ if (referenceIds.length > 0) {
|
|
108
106
|
});
|
109
107
|
});
|
110
108
|
|
111
|
-
it(`Verifying itemengine grading data for item "${
|
109
|
+
it(`Verifying itemengine grading data for item "${referenceId}"`, () => {
|
112
110
|
autoScoredScoringPreviewTab.steps.switchToGradingView();
|
113
111
|
cy.wait(500);
|
114
112
|
migrationQuestionTypes.forEach((questionType) => {
|
@@ -20,11 +20,6 @@ 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'),
|
28
23
|
steps: {
|
29
24
|
checkShowAnswersToggle: () => {
|
30
25
|
lrnPage.showAnswersToggle()
|
@@ -355,10 +350,10 @@ export const extractLrnQuestionData = {
|
|
355
350
|
.eq(0)
|
356
351
|
.within(() => {
|
357
352
|
lrnPage.drawingToolbarButton()
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
353
|
+
.each(($button) => {
|
354
|
+
let ariaLabel = $button[0].attributes["aria-label"].nodeValue;
|
355
|
+
toolbarButtons.push(ariaLabel);
|
356
|
+
});
|
362
357
|
});
|
363
358
|
obj.toolbarButtons = toolbarButtons;
|
364
359
|
lrnPage.drawingCanvasImage()
|
@@ -371,69 +366,6 @@ export const extractLrnQuestionData = {
|
|
371
366
|
});
|
372
367
|
lrnQuestionDataArr.push(obj);
|
373
368
|
},
|
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
|
-
},
|
437
369
|
/* singleSelection: (lrnQuestionDataArr, index) => {
|
438
370
|
let obj = {};
|
439
371
|
cy.log(`Extracting the question instructions and options from question ${index}`);
|
@@ -5,7 +5,6 @@ const lrnQuestionTypesENUM = {
|
|
5
5
|
essayResponse: 'essayResponse',
|
6
6
|
essayResponseBasic: 'Essay with plain text',
|
7
7
|
drawingResponse: 'Drawing',
|
8
|
-
dndIntoCategories: 'Classification',
|
9
8
|
singleSelection: 'Multiple choice – standard',
|
10
9
|
multipleSelection: 'Multiple choice – multiple response',
|
11
10
|
trueOrFalse: 'True or false',
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { essayResponsePage, multipleSelectionPage } from "../../pages";
|
2
|
-
import { draggableOptionContainer } from "../../pages/components";
|
3
2
|
import { singleSelectionPage } from "../../pages/singleSelectionPage"
|
4
3
|
import utilities from "../helpers/utilities";
|
5
4
|
import drawingToolbarOptionsENUM from "./drawingToolbarOptionsENUM";
|
@@ -256,58 +255,11 @@ export const verifyIeQuestionData = {
|
|
256
255
|
} else {
|
257
256
|
expect(ariaLabel).to.be.eq('Image');
|
258
257
|
}
|
259
|
-
//
|
258
|
+
//need to verify backgroundImageWidth currently it is varying in all drawing response migrated items
|
260
259
|
});
|
261
260
|
});
|
262
261
|
},
|
263
262
|
|
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
|
-
|
311
263
|
/* singleSelection: (expectedQuestionData, index) => {
|
312
264
|
cy.get('.ngie-single-select')
|
313
265
|
.eq(index)
|
package/package.json
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
{
|
2
2
|
"name": "itemengine-cypress-automation",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.140-npmScriptsUpdate-efe1b9e.0",
|
4
4
|
"description": "",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
7
7
|
"build": "echo 'building'",
|
8
8
|
"test": "echo 'success'",
|
9
|
-
"local": "node scripts/local.mjs --env fileConfig=ilqa,theme=ilc
|
9
|
+
"local": "node scripts/local.mjs --env fileConfig=ilqa,theme=ilc",
|
10
|
+
"spinnaker": "node scripts/spinnaker.mjs --env theme=ilc",
|
10
11
|
"local:untagged": "node scripts/local.mjs --env fileConfig=ilqa,theme=ilc,grepTags=-css+-a11y",
|
11
|
-
"local:smoke": "node scripts/local.mjs --env fileConfig=ilqa,theme=ilc,grepTags=smoke+-css+-a11y --spec cypress/e2e/ILC/**/*.smoke.js",
|
12
|
-
"spinnaker": "node scripts/spinnaker.mjs --env theme=ilc,grepTags=-css+-a11y --spec cypress/e2e/ILC/**/*.js",
|
13
12
|
"spinnaker:untagged": "node scripts/spinnaker.mjs --env theme=ilc,grepTags=-css+-a11y",
|
14
|
-
"
|
15
|
-
"spinnaker:
|
13
|
+
"local:smoke": "node scripts/smokeLocal.mjs --env fileConfig=ilqa,theme=ilc,grepTags=smoke+-css+-a11y",
|
14
|
+
"spinnaker:smoke": "node scripts/smoke.mjs --env theme=ilc,grepTags=smoke+-css+-a11y",
|
16
15
|
"local:migration": "node scripts/migrationLocal.mjs --env theme=ilc",
|
16
|
+
"spinnaker:migration": "node scripts/migration.mjs --env theme=ilc",
|
17
17
|
"cy:ildev": "cypress open --env fileConfig=ildev",
|
18
18
|
"cy:ilprod": "cypress open --env fileConfig=ilprod",
|
19
19
|
"cy:ilqa": "cypress open --env fileConfig=ilqa",
|
@@ -6,7 +6,7 @@ import { getS3Object } from "./awsHelper.mjs";
|
|
6
6
|
let ciBuildId;
|
7
7
|
let startTime;
|
8
8
|
const envArgs = {};
|
9
|
-
let spec;
|
9
|
+
// let spec;
|
10
10
|
|
11
11
|
if (process.argv.includes('--env')) {
|
12
12
|
const envArgsString = process.argv[process.argv.findIndex(elem => elem === '--env') + 1];
|
@@ -20,10 +20,10 @@ if (process.argv.includes('--env')) {
|
|
20
20
|
|
21
21
|
const env = process.env.STAGE ? process.env.STAGE : envArgs.fileConfig;
|
22
22
|
|
23
|
-
if (process.argv.includes('--spec')) {
|
24
|
-
|
25
|
-
|
26
|
-
}
|
23
|
+
// if (process.argv.includes('--spec')) {
|
24
|
+
// const specValue = process.argv[process.argv.findIndex(elem => elem === '--spec') + 1];
|
25
|
+
// spec = specValue ? `--spec ${specValue}` : '';
|
26
|
+
// }
|
27
27
|
|
28
28
|
/**
|
29
29
|
* @param {string} user
|
@@ -78,7 +78,8 @@ export function runSorryCypressLocal() {
|
|
78
78
|
startTime = Math.round(Date.now() / 1000000);
|
79
79
|
ciBuildId = setCiBuildId(user, startTime);
|
80
80
|
const envArgs = setCommandLineEnvArgs()
|
81
|
-
let command = `cy2 run --parallel --browser chrome --record --key imaginelearning/itemengine-cypress-automation --ci-build-id ${ciBuildId} ${envArgs}
|
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}`);
|
82
83
|
execSync(command, { stdio: "inherit" });
|
83
84
|
}
|
84
85
|
|
@@ -90,7 +91,35 @@ export function runSorryCypressSpinnaker() {
|
|
90
91
|
startTime = process.env.START_TIME;
|
91
92
|
ciBuildId = setCiBuildId("spinnaker", startTime);
|
92
93
|
const envArgs = setCommandLineEnvArgs()
|
93
|
-
let command = `cy2 run --parallel --browser chrome --record --key imaginelearning/itemengine-cypress-automation --ci-build-id ${ciBuildId} ${envArgs}
|
94
|
+
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
|
+
execSync(command, { stdio: "inherit" });
|
97
|
+
}
|
98
|
+
|
99
|
+
/**
|
100
|
+
* @method runSorryCypressLocalSmoke
|
101
|
+
*/
|
102
|
+
export function runSorryCypressLocalSmoke() {
|
103
|
+
process.env.CYPRESS_API_URL = "https://cypress-director.imaginelearning.engineering/";
|
104
|
+
const user = OS.userInfo().username;
|
105
|
+
startTime = Math.round(Date.now() / 1000000);
|
106
|
+
ciBuildId = setCiBuildId(user, startTime);
|
107
|
+
const envArgs = setCommandLineEnvArgs()
|
108
|
+
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
|
+
execSync(command, { stdio: "inherit" });
|
111
|
+
}
|
112
|
+
|
113
|
+
/**
|
114
|
+
* @method runSorryCypressSpinnakerSmoke
|
115
|
+
*/
|
116
|
+
export function runSorryCypressSpinnakerSmoke() {
|
117
|
+
process.env.CYPRESS_API_URL = "https://cypress-director.imaginelearning.engineering/";
|
118
|
+
startTime = process.env.START_TIME;
|
119
|
+
ciBuildId = setCiBuildId("spinnaker", startTime);
|
120
|
+
const envArgs = setCommandLineEnvArgs()
|
121
|
+
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}`);
|
94
123
|
execSync(command, { stdio: "inherit" });
|
95
124
|
}
|
96
125
|
|