itemengine-cypress-automation 1.0.297-minorUpdated7thFeb-40dd06b.0 → 1.0.297
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/Dockerfile +1 -0
- package/cypress/e2e/ILC/MultipleSelection/previewContentsForAllViews.smoke.js +2 -3
- package/cypress/pages/singleSelectionPage.js +1 -1
- package/deploy/essayQuestion/deploy.yaml +30 -0
- package/deploy/essayQuestion/run.sh +7 -0
- package/package.json +3 -2
- package/scripts/questions.mjs +3 -0
- package/scripts/sorry-cypress.mjs +21 -1
package/Dockerfile
CHANGED
@@ -108,9 +108,8 @@ describe('Create item page - Multiple selection: Preview contents', () => {
|
|
108
108
|
});
|
109
109
|
} else {
|
110
110
|
it(`The correct options should have correct icons besides them`, () => {
|
111
|
-
|
112
|
-
|
113
|
-
// multipleSelectionPage.steps.verifyCorrectOptionIconGradingView(1);
|
111
|
+
multipleSelectionPage.steps.verifyCorrectOptionIconGradingView(0);
|
112
|
+
multipleSelectionPage.steps.verifyCorrectOptionIconGradingView(1);
|
114
113
|
multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleGradingView(2);
|
115
114
|
multipleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleGradingView(3);
|
116
115
|
});
|
@@ -37,7 +37,7 @@ const selectors = {
|
|
37
37
|
noneOptionNumeration: () => cy.get('.no-numeration-div'),
|
38
38
|
//correct answer section
|
39
39
|
correctAnswersLabel: () => cy.get('[class*="question-preview-wrapper"] [class*="CorrectAnswerLabel"]'),
|
40
|
-
correctAnswerSectionWrapper: () => cy.get('[class*="question-preview-wrapper"] .mcq-radio-control.mcq-answer-checked').eq(
|
40
|
+
correctAnswerSectionWrapper: () => cy.get('[class*="question-preview-wrapper"] .mcq-radio-control.mcq-answer-checked').eq(0),
|
41
41
|
optionWrapperCorrectAnswerSection: () => cy.get('.radio-option-wrapper'),
|
42
42
|
correctIncorrectAnswerLabel: () => cy.get('[class*="style"][class*="__Status"]'),
|
43
43
|
answerStatusBanner: () => cy.get('[class*="StatusContainer"]'),
|
@@ -0,0 +1,30 @@
|
|
1
|
+
global:
|
2
|
+
team: itemengine
|
3
|
+
name: item-engine-ui-essay-response
|
4
|
+
type: integration_test
|
5
|
+
|
6
|
+
variables:
|
7
|
+
START_TIME: "$(date +%s)"
|
8
|
+
|
9
|
+
deployment:
|
10
|
+
job:
|
11
|
+
backoffLimit: 25
|
12
|
+
activeDeadlineSeconds: 7200
|
13
|
+
parallelism: 7
|
14
|
+
completions: 7
|
15
|
+
|
16
|
+
image:
|
17
|
+
cmd: /ie-e2e/deploy/essayQuestion/run.sh
|
18
|
+
|
19
|
+
resources:
|
20
|
+
limits:
|
21
|
+
memory: 8446Mi
|
22
|
+
cpu: 5000m
|
23
|
+
requests:
|
24
|
+
memory: 4096Mi
|
25
|
+
cpu: 2000m
|
26
|
+
|
27
|
+
env:
|
28
|
+
instance:
|
29
|
+
- name: START_TIME
|
30
|
+
value: "${{ variables.START_TIME }}"
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "itemengine-cypress-automation",
|
3
|
-
"version": "1.0.297
|
3
|
+
"version": "1.0.297",
|
4
4
|
"description": "",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
@@ -17,7 +17,8 @@
|
|
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",
|
20
|
-
"cy:ilstage": "cypress open --env fileConfig=ilstage"
|
20
|
+
"cy:ilstage": "cypress open --env fileConfig=ilstage",
|
21
|
+
"spinnaker:essayResponse": "node scripts/questions.mjs --env theme=ilc,questionType=EssayResponse,grepTags=-css+-a11y"
|
21
22
|
},
|
22
23
|
"repository": {
|
23
24
|
"type": "git",
|
@@ -172,4 +172,24 @@ export async function runSorryCypressLocalMigration() {
|
|
172
172
|
let command = `npx cypress run --browser chrome --env fileConfig=ilqa,theme=ilc,migrationQuestionTypes=${questionTypes} --spec "cypress/e2e/migration/*.js"`;
|
173
173
|
console.log(`command: ${command}`);
|
174
174
|
execSync(command, { stdio: "inherit" });
|
175
|
-
}
|
175
|
+
}
|
176
|
+
|
177
|
+
// Functions to execute cypress tests specific to Question Types
|
178
|
+
export function runSorryCypressQuestions() {
|
179
|
+
process.env.CYPRESS_API_URL = "https://cypress-director.imaginelearning.tech/";
|
180
|
+
const user = OS.userInfo().username;
|
181
|
+
startTime = Math.round(Date.now() / 1000000);
|
182
|
+
ciBuildId = setCiBuildId(user, startTime);
|
183
|
+
const envArgs = setCommandLineEnvArgs();
|
184
|
+
console.log("🚀 ~ runSorryCypressQuestions ~ envArgs:", envArgs)
|
185
|
+
|
186
|
+
// Extracting questionType from envArgs
|
187
|
+
const match = envArgs.match(/questionType=([^,]+)/);
|
188
|
+
console.log("🚀 ~ runSorryCypressQuestions ~ match:", match)
|
189
|
+
const questionType = match ? match[1] : "**"; // Default to "**" if not found
|
190
|
+
console.log("🚀 ~ runSorryCypressQuestions ~ questionType:", questionType)
|
191
|
+
|
192
|
+
let command = `cy2 run --parallel --browser chrome --record --key imaginelearning/itemengine-cypress-automation --ci-build-id ${ciBuildId} ${envArgs} --spec "cypress/e2e/ILC/${questionType}/*.js"`;
|
193
|
+
console.log(`command: ${command}`);
|
194
|
+
execSync(command, { stdio: "inherit" });
|
195
|
+
}
|