itemengine-cypress-automation 1.0.134 → 1.0.135

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/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.134",
3
+ "version": "1.0.135",
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,grepTags=-css+-a11y --spec cypress/e2e/ILC/**/*.js",
10
10
  "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",
12
- "spinnaker": "node scripts/spinnaker.mjs --env theme=ilc",
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
13
  "spinnaker:untagged": "node scripts/spinnaker.mjs --env theme=ilc,grepTags=-css+-a11y",
14
- "spinnaker:smoke": "node scripts/spinnaker.mjs --env theme=ilc,grepTags=smoke+-css+-a11y",
14
+ "spinnaker:smoke": "node scripts/spinnaker.mjs --env theme=ilc,grepTags=smoke+-css+-a11y --spec cypress/e2e/ILC/**/*.smoke.js",
15
15
  "spinnaker:migration": "node scripts/migration.mjs --env theme=ilc",
16
16
  "local:migration": "node scripts/migrationLocal.mjs --env theme=ilc",
17
17
  "cy:ildev": "cypress open --env fileConfig=ildev",
@@ -6,6 +6,7 @@ import { getS3Object } from "./awsHelper.mjs";
6
6
  let ciBuildId;
7
7
  let startTime;
8
8
  const envArgs = {};
9
+ let spec;
9
10
 
10
11
  if (process.argv.includes('--env')) {
11
12
  const envArgsString = process.argv[process.argv.findIndex(elem => elem === '--env') + 1];
@@ -19,6 +20,11 @@ if (process.argv.includes('--env')) {
19
20
 
20
21
  const env = process.env.STAGE ? process.env.STAGE : envArgs.fileConfig;
21
22
 
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
+
22
28
  /**
23
29
  * @param {string} user
24
30
  * @param {string} startTime
@@ -72,7 +78,7 @@ export function runSorryCypressLocal() {
72
78
  startTime = Math.round(Date.now() / 1000000);
73
79
  ciBuildId = setCiBuildId(user, startTime);
74
80
  const envArgs = setCommandLineEnvArgs()
75
- let command = `cy2 run --parallel --browser chrome --record --key imaginelearning/itemengine-cypress-automation --ci-build-id ${ciBuildId} ${envArgs} --spec "cypress/e2e/ILC/**/*.js"`;
81
+ let command = `cy2 run --parallel --browser chrome --record --key imaginelearning/itemengine-cypress-automation --ci-build-id ${ciBuildId} ${envArgs} ${spec}`;
76
82
  execSync(command, { stdio: "inherit" });
77
83
  }
78
84
 
@@ -84,7 +90,7 @@ export function runSorryCypressSpinnaker() {
84
90
  startTime = process.env.START_TIME;
85
91
  ciBuildId = setCiBuildId("spinnaker", startTime);
86
92
  const envArgs = setCommandLineEnvArgs()
87
- let command = `cy2 run --parallel --browser chrome --record --key imaginelearning/itemengine-cypress-automation --ci-build-id ${ciBuildId} ${envArgs},grepTags=-css+-a11y --spec "cypress/e2e/ILC/**/*.smoke.js"`;
93
+ let command = `cy2 run --parallel --browser chrome --record --key imaginelearning/itemengine-cypress-automation --ci-build-id ${ciBuildId} ${envArgs} ${spec}`;
88
94
  execSync(command, { stdio: "inherit" });
89
95
  }
90
96