itemengine-cypress-automation 1.0.524-dependabot-npm-and-yarn-multi-92087b3b2d-7ea5cae.0 → 1.0.524

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
@@ -28,6 +28,7 @@ RUN chmod +x ./deploy/resourcesAndToolsQuestion/run.sh
28
28
  RUN chmod +x ./deploy/audioResponseQuestion/run.sh
29
29
  RUN chmod +x ./deploy/dataApi/run.sh
30
30
  RUN chmod +x ./deploy/feedbackScaleQuestion/run.sh
31
+ RUN chmod +x ./run.sh
31
32
 
32
33
  RUN npm ci
33
34
 
package/il.yaml CHANGED
@@ -13,22 +13,7 @@ otk:
13
13
  languageVersion: "20"
14
14
  analysis: false
15
15
  deployables:
16
- - ./deploy/audioResponseQuestion/service.yaml
17
- - ./deploy/DNDIntoCategoriesQuestion/service.yaml
18
- - ./deploy/dataApi/service.yaml
19
- - ./deploy/e2e/service.yaml
20
- - ./deploy/essayQuestion/service.yaml
21
- - ./deploy/feedbackScaleQuestion/service.yaml
22
- - ./deploy/fillInTheGapsQuestion/service.yaml
23
- - ./deploy/graphingQuestion/service.yaml
24
- - ./deploy/imageHighlightQuestion/service.yaml
25
- - ./deploy/listOrderingQuestion/service.yaml
26
- - ./deploy/migration/service.yaml
27
- - ./deploy/multipleSelectionQuestion/service.yaml
28
- - ./deploy/resourcesAndToolsQuestion/service.yaml
29
- - ./deploy/smoke/service.yaml
30
- - ./deploy/textEntryMathQuestion/service.yaml
31
- - ./deploy/thinkSphere/service.yaml
16
+ - ./service.yaml
32
17
  deployConfig:
33
18
  environments:
34
19
  - dev
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.524-dependabot-npm-and-yarn-multi-92087b3b2d-7ea5cae.0",
3
+ "version": "1.0.524",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -42,7 +42,7 @@
42
42
  "axios": "^1.12.2",
43
43
  "cy-verify-downloads": "^0.1.11",
44
44
  "cy2": "^4.0.9",
45
- "cypress": "^15.2.0",
45
+ "cypress": "^12.17.2",
46
46
  "cypress-axe": "^1.4.0",
47
47
  "cypress-file-upload": "^5.0.8",
48
48
  "cypress-real-events": "^1.7.6",
package/run.sh ADDED
@@ -0,0 +1,2 @@
1
+ #!/bin/sh
2
+ echo "Running integration test"
@@ -2,7 +2,7 @@ import axios from "axios";
2
2
 
3
3
  const sorryCypressTimeout = 1800000;
4
4
  const graphqlUrl = "https://cypress-api.imaginelearning.tech/";
5
- const projectId = "imaginelearning/itemengine-edgeex-cypress-automation";
5
+ const projectId = "imaginelearning/itemengine-cypress-automation";
6
6
 
7
7
  function getProjectId() {
8
8
  return process.env.CYPRESS_PROJECT_ID || projectId;
@@ -158,7 +158,7 @@ export function runSorryCypressLocal() {
158
158
  /**
159
159
  * @method runSorryCypressSpinnaker
160
160
  */
161
- export function runSorryCypressSpinnaker() {
161
+ export async function runSorryCypressSpinnaker() {
162
162
  console.log('Inside runSorryCypressSpinnaker');
163
163
  process.env.CYPRESS_API_URL = "https://cypress-director.imaginelearning.tech/";
164
164
  console.log('CYPRESS_API_URL:', process.env.CYPRESS_API_URL);
@@ -168,9 +168,28 @@ export function runSorryCypressSpinnaker() {
168
168
  console.log('ciBuildId:', ciBuildId);
169
169
  const envArgs = setCommandLineEnvArgs()
170
170
  console.log('envArgs:', envArgs);
171
+ const isOtkv2 = process.env.OTK_VERSION === '2';
171
172
  let command = `cy2 run --parallel --browser chrome --record --key imaginelearning/itemengine-cypress-automation --ci-build-id ${ciBuildId} ${envArgs} --spec "cypress/e2e/ILC/**/*.js"`;
172
173
  console.log(`command: ${command}`);
173
- execSync(command, { stdio: "inherit" });
174
+ try {
175
+ execSync(command, { stdio: "inherit" });
176
+ if (isOtkv2) {
177
+ const status = await checkRunStatus(ciBuildId);
178
+ process.exit(status);
179
+ }
180
+ } catch (error) {
181
+ console.error("One or more tests failed to pass, OR an error occurred during run");
182
+ console.error("Cypress run error details:", {
183
+ status: error.status,
184
+ message: error.message,
185
+ stack: error.stack
186
+ });
187
+
188
+ console.log("Exiting process with code: 1");
189
+ process.exit(1);
190
+ }
191
+ console.log("Cypress tests all passed successfully. Exiting process with code: 0");
192
+ process.exit(0);
174
193
  }
175
194
 
176
195
  /**
package/service.yaml ADDED
@@ -0,0 +1,80 @@
1
+ global:
2
+ name: ie-cypress
3
+ type: test
4
+ autoDeploy:
5
+ enabled: true
6
+ highestEnvironment: staging
7
+
8
+ deployment:
9
+ activeDeadlineSeconds: 28800
10
+ architecture: amd64
11
+ restartPolicy: Never
12
+ backoffLimit: 0
13
+ parallelism: 7
14
+ completions: 7
15
+ image:
16
+ cmd: /ie-e2e/run.sh
17
+ resources:
18
+ limits:
19
+ memory: 8446Mi
20
+ cpu: 5000m
21
+ requests:
22
+ memory: 4096Mi
23
+ cpu: 2000m
24
+ egress:
25
+ FQDNs:
26
+ - "*.content-nonprod.imaginelearning.com"
27
+ - "*.cloudflare.com"
28
+ - "*.googleapis.com"
29
+ - "www.desmos.com"
30
+ - "*.google.com"
31
+ - "*.*.google.com"
32
+ - "google-ohttp-relay-safebrowsing.fastly-edge.com"
33
+ - "*.gstatic.com"
34
+ - "*.codecogs.com"
35
+ - "cypress-director.imaginelearning.tech"
36
+ - "cypress-api.imaginelearning.tech"
37
+ - "*.cypress.io"
38
+ - "*.*.mozilla.com"
39
+ - "*.*.*.mozilla.com"
40
+ env:
41
+ - name: OTK_VERSION
42
+ value: "2"
43
+ - name: CYPRESS_API_URL
44
+ value: "https://cypress-director.imaginelearning.tech/"
45
+ - name: THEME
46
+ value: "ilc"
47
+ - name: GREP_TAGS
48
+ value: ""
49
+ - name: GREP_UNTAGGED
50
+ value: ""
51
+ - name: SPEC_PATTERN
52
+ value: ""
53
+ - name: QUESTION_TYPE
54
+ value: "AudioResponseNew_VideoResponseNew_UploadResponse_ToolAudioPlayerNew"
55
+
56
+ namespaces:
57
+ dev:
58
+ env:
59
+ - name: STAGE
60
+ value: "dev"
61
+ - name: FILE_CONFIG
62
+ value: "dev"
63
+ qa:
64
+ env:
65
+ - name: STAGE
66
+ value: "qa"
67
+ - name: FILE_CONFIG
68
+ value: "qa"
69
+ staging:
70
+ env:
71
+ - name: STAGE
72
+ value: "stage"
73
+ - name: FILE_CONFIG
74
+ value: "stage"
75
+ prod:
76
+ env:
77
+ - name: STAGE
78
+ value: "prod"
79
+ - name: FILE_CONFIG
80
+ value: "prod"