itemengine-cypress-automation 1.0.76 → 1.0.77
Sign up to get free protection for your applications and to get access to all the features.
- package/.build_wna +8 -3
- package/Dockerfile +1 -1
- package/README.md +0 -2
- package/cypress.config.js +8 -20
- package/deploy.yaml +2 -2
- package/package.json +9 -7
- package/scripts/sorry-cypress.mjs +13 -20
- package/currents.config.js +0 -6
package/.build_wna
CHANGED
package/Dockerfile
CHANGED
package/README.md
CHANGED
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
|
-
|
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:
|
32
|
+
trashAssetsBeforeRuns: false,
|
41
33
|
chromeWebSecurity: true,
|
42
34
|
video: false,
|
43
35
|
watchForFileChanges: false,
|
44
36
|
scrollBehavior: 'center',
|
45
|
-
|
46
|
-
|
47
|
-
|
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
package/package.json
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
{
|
2
2
|
"name": "itemengine-cypress-automation",
|
3
|
-
"version": "1.0.
|
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.
|
24
|
-
"cy-verify-downloads": "^0.1.
|
25
|
-
"
|
26
|
-
"cypress
|
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}
|
61
|
+
return `--env ${fileConfig}` + (theme ? `,${theme}` : '') + (tags ? `,${tags}` : '')
|
62
62
|
}
|
63
63
|
|
64
64
|
/**
|
65
|
-
* @method
|
66
|
-
* @param {string} ciBuildId
|
65
|
+
* @method runSorryCypressLocal
|
67
66
|
*/
|
68
|
-
function
|
69
|
-
|
70
|
-
|
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
|
-
|
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
|
}
|
package/currents.config.js
DELETED