itemengine-cypress-automation 1.0.299-minorUpdated7thFeb-2e116a9.0 → 1.0.299-minorUpdated7thFeb-2458641.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/Dockerfile
CHANGED
@@ -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.299-minorUpdated7thFeb-
|
3
|
+
"version": "1.0.299-minorUpdated7thFeb-2458641.0",
|
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
|
+
}
|