itemengine-cypress-automation 1.0.75 → 1.0.77

Sign up to get free protection for your applications and to get access to all the features.
package/.build_wna CHANGED
@@ -1,4 +1,9 @@
1
1
  build:
2
- env:
3
- - key: CYPRESS_API_URL
4
- value: https://cypress-director.imaginelearning.engineering/
2
+ image: npm-node18
3
+ image_version_prefix: -v2
4
+ sonar_scan: true
5
+ pr:
6
+ enabled: true
7
+ deployable: true
8
+ analysis:
9
+ enabled: true
package/Dockerfile CHANGED
@@ -2,7 +2,7 @@
2
2
  # FROM cypress/base:14.19.0
3
3
  # FROM cypress/browsers:node14.19.0-chrome100-ff99-edge
4
4
 
5
- FROM cypress/included:12.17.2
5
+ FROM cypress/included:12.0.0
6
6
 
7
7
  RUN apt-get update && apt-get install curl -y
8
8
 
package/README.md CHANGED
@@ -1,3 +1 @@
1
1
  # itemengine-cypress-automation
2
-
3
- npx cypress-cloud run --spec cypress\e2e\saucedemo.js --parallel --record --key xxx --ci-build-id hello-cypress-4 --headed --env fileConfig=ilqa,theme=ilc,grepTags=-a11y
package/cypress.config.js CHANGED
@@ -2,33 +2,25 @@ const { defineConfig } = require('cypress')
2
2
  const fs = require('fs-extra');
3
3
  const path = require('path');
4
4
  const { isFileExist } = require('cy-verify-downloads');
5
- //const { cloudPlugin } = require("cypress-cloud/plugin");
6
5
 
7
6
  async function getConfigurationByFile(file, theme) {
8
7
  const pathToConfigFile = path.resolve(
9
8
  './cypress/config-files',
10
9
  `${file}.json`
11
10
  );
11
+
12
12
  const pathToThemeFile = path.resolve(
13
13
  './cypress/fixtures/theme',
14
14
  `${theme}.json`
15
15
  );
16
+
16
17
  const envVariables = await fs.readJson(pathToConfigFile);
17
18
  envVariables.env.css = await fs.readJson(pathToThemeFile);
18
19
  return envVariables;
19
20
  }
20
21
 
21
22
  module.exports = defineConfig({
22
- reporterOptions: {
23
- reportDir: 'cypress/reports',
24
- charts: true,
25
- reportPageTitle: 'My Test Suite',
26
- embeddedScreenshots: true,
27
- inlineAssets: true,
28
- html: true,
29
- json: false,
30
- },
31
- projectId: "ImagineLearning/itemengine-cypress-automation",
23
+ projectId: "imaginelearning/itemengine-cypress-automation",
32
24
  screenshotOnRunFailure: true,
33
25
  screenshotsFolder: 'cypress/assets',
34
26
  requestTimeout: 20000,
@@ -37,17 +29,14 @@ module.exports = defineConfig({
37
29
  pageLoadTimeout: 120000,
38
30
  viewportWidth: 1400,
39
31
  viewportHeight: 1025,
40
- trashAssetsBeforeRuns: true,
32
+ trashAssetsBeforeRuns: false,
41
33
  chromeWebSecurity: true,
42
34
  video: false,
43
35
  watchForFileChanges: false,
44
36
  scrollBehavior: 'center',
45
- blockHosts: [
46
- 'www.google-analytics.com',
47
- '*google-analytics.com',
48
- 'www.hotjar.com',
49
- '*hotjar.com',
50
- ],
37
+ env: {
38
+ CYPRESS_ENV: process.env.CYPRESS_ENV,
39
+ },
51
40
  e2e: {
52
41
  setupNodeEvents(on, config) {
53
42
  const file = config.env.fileConfig || 'ilstage';
@@ -66,8 +55,7 @@ module.exports = defineConfig({
66
55
  require('@cypress/grep/src/plugin')()
67
56
  return config, getConfigurationByFile(file, theme);
68
57
  },
69
- excludeSpecPattern: ['**/__snapshots__/*', '**/__image_snapshots__/*'],
70
58
  specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
71
59
  testIsolation: false,
72
60
  },
73
- })
61
+ });
package/deploy.yaml CHANGED
@@ -9,8 +9,8 @@ variables:
9
9
  deployment:
10
10
  job:
11
11
  activeDeadlineSeconds: 7200
12
- parallelism: 5
13
- completions: 5
12
+ parallelism: 1
13
+ completions: 1
14
14
 
15
15
  image:
16
16
  cmd: /ie-e2e/run.sh
package/package.json CHANGED
@@ -1,14 +1,15 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.75",
3
+ "version": "1.0.77",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "build": "echo 'building'",
8
8
  "test": "echo 'success'",
9
- "spinnaker": "node scripts/spinnaker.mjs --env theme=ilc",
10
- "spinnaker:untagged": "node scripts/spinnaker.mjs --env theme=ilc,grepUntagged=true",
11
9
  "local": "node scripts/local.mjs --env fileConfig=ilqa,theme=ilc",
10
+ "spinnaker": "node scripts/spinnaker.mjs --env theme=ilc",
11
+ "local:untagged": "node scripts/local.mjs --env fileConfig=ilqa,theme=ilc,grepUntagged=true",
12
+ "spinnaker:untagged": "node scripts/spinnaker.mjs --env theme=ilc,grepUntagged=true",
12
13
  "cy:ildev": "cypress open --env fileConfig=ildev",
13
14
  "cy:ilprod": "cypress open --env fileConfig=ilprod",
14
15
  "cy:ilqa": "cypress open --env fileConfig=ilqa",
@@ -20,10 +21,11 @@
20
21
  },
21
22
  "dependencies": {
22
23
  "@cypress/grep": "^3.1.5",
23
- "axe-core": "^4.8.0",
24
- "cy-verify-downloads": "^0.1.13",
25
- "cypress": "^12.17.4",
26
- "cypress-axe": "^1.5.0",
24
+ "axe-core": "^4.7.1",
25
+ "cy-verify-downloads": "^0.1.11",
26
+ "cy2": "^4.0.9",
27
+ "cypress": "12.17.2",
28
+ "cypress-axe": "^1.4.0",
27
29
  "cypress-file-upload": "^5.0.8",
28
30
  "cypress-real-events": "^1.7.6",
29
31
  "react-uuid": "^2.0.0"
@@ -58,37 +58,30 @@ function setCommandLineEnvArgs() {
58
58
  tags = ''
59
59
  }
60
60
 
61
- return `--env ${fileConfig}` + (theme ? `,${theme}`: '') + (tags ? `,${tags}`: '')
61
+ return `--env ${fileConfig}` + (theme ? `,${theme}` : '') + (tags ? `,${tags}` : '')
62
62
  }
63
63
 
64
64
  /**
65
- * @method runSorryCypress
66
- * @param {string} ciBuildId
65
+ * @method runSorryCypressLocal
67
66
  */
68
- function runSorryCypress(ciBuildId, envArgs) {
69
- // let command = `cypress-cloud run --parallel --browser chrome --record --key ImagineLearning/itemengine-cypress-automation --ci-build-id ${ciBuildId} ${envArgs}`;
70
- let command = `cypress run --parallel --browser chrome --record --key ImagineLearning/itemengine-cypress-automation --ci-build-id ${ciBuildId} ${envArgs} --spec "cypress\\e2e\\ILC\\ShortTextResponse\\*.js"`;
67
+ export function runSorryCypressLocal() {
68
+ process.env.CYPRESS_API_URL = "https://cypress-director.imaginelearning.engineering/";
69
+ const user = OS.userInfo().username;
70
+ startTime = Math.round(Date.now() / 1000000);
71
+ ciBuildId = setCiBuildId(user, startTime);
72
+ const envArgs = setCommandLineEnvArgs()
73
+ let command = `cy2 run --parallel --browser chrome --record --key imaginelearning/itemengine-cypress-automation --ci-build-id ${ciBuildId} ${envArgs} --spec "cypress/e2e/ILC/ShortTextResponse/*.js"`;
71
74
  execSync(command, { stdio: "inherit" });
72
75
  }
73
76
 
74
77
  /**
75
78
  * @method runSorryCypressSpinnaker
76
79
  */
77
- export function runSorryCypressSpinnaker() {
80
+ export function runSorryCypressSpinnaker() {
81
+ process.env.CYPRESS_API_URL = "https://cypress-director.imaginelearning.engineering/";
78
82
  startTime = process.env.START_TIME;
79
83
  ciBuildId = setCiBuildId("spinnaker", startTime);
80
84
  const envArgs = setCommandLineEnvArgs()
81
- runSorryCypress(ciBuildId, envArgs);
82
- }
83
-
84
- /**
85
- * @method runSorryCypressLocal
86
- */
87
- export function runSorryCypressLocal() {
88
- process.env.CYPRESS_API_URL = "https://cypress-director.imaginelearning.engineering/";
89
- const user = OS.userInfo().username;
90
- startTime = Math.round(Date.now() / 1000000);
91
- ciBuildId = setCiBuildId(user, startTime);
92
- const envArgs = setCommandLineEnvArgs()
93
- runSorryCypress(ciBuildId, envArgs);
85
+ let command = `cy2 run --parallel --browser chrome --record --key imaginelearning/itemengine-cypress-automation --ci-build-id ${ciBuildId} ${envArgs} --spec "cypress/e2e/ILC/ShortTextResponse/*.js"`;
86
+ execSync(command, { stdio: "inherit" });
94
87
  }
@@ -1,6 +0,0 @@
1
- // currents.config.js
2
- module.exports = {
3
- projectId: "ImagineLearning/itemengine-cypress-automation",
4
- recordKey: "ImagineLearning/itemengine-cypress-automation",
5
- cloudServiceUrl: "https://cypress-director.imaginelearning.engineering/"
6
- };