@centreon/js-config 25.10.9 → 25.11.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.
|
@@ -6,6 +6,9 @@ const {
|
|
|
6
6
|
} = require('@simonsmith/cypress-image-snapshot/plugin');
|
|
7
7
|
const cypressCodeCoverageTask = require('@cypress/code-coverage/task');
|
|
8
8
|
|
|
9
|
+
import fs from 'fs';
|
|
10
|
+
import path from 'path';
|
|
11
|
+
|
|
9
12
|
module.exports = ({
|
|
10
13
|
rspackConfig,
|
|
11
14
|
cypressFolder,
|
|
@@ -37,10 +40,43 @@ module.exports = ({
|
|
|
37
40
|
launchOptions.args.push('--headless=new');
|
|
38
41
|
launchOptions.args.push('--force-color-profile=srgb');
|
|
39
42
|
launchOptions.args.push('--window-size=1400,1200');
|
|
43
|
+
launchOptions.args.push('--max-old-space-size=4096');
|
|
44
|
+
launchOptions.args.push('--disable-dev-shm-usage');
|
|
45
|
+
launchOptions.args.push('--disable-gpu');
|
|
46
|
+
launchOptions.args.push('--no-sandbox');
|
|
40
47
|
}
|
|
41
48
|
|
|
42
49
|
return launchOptions;
|
|
43
50
|
});
|
|
51
|
+
|
|
52
|
+
on('after:run', (results) => {
|
|
53
|
+
const testRetries = {};
|
|
54
|
+
if ('runs' in results) {
|
|
55
|
+
results.runs.forEach((run) => {
|
|
56
|
+
run.tests.forEach((test) => {
|
|
57
|
+
if (test.attempts && test.attempts.length > 1 && test.state === 'passed') {
|
|
58
|
+
const testTitle = test.title.join(' > '); // Convert the array to a string
|
|
59
|
+
testRetries[testTitle] = test.attempts.length - 1;
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Save the testRetries object to a file in the e2e/results directory
|
|
66
|
+
const resultFilePath = path.join(
|
|
67
|
+
mainCypressFolder,
|
|
68
|
+
'results',
|
|
69
|
+
'retries.json'
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
fs.writeFileSync(resultFilePath, JSON.stringify(testRetries, null, 2));
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
on('after:spec', () => {
|
|
76
|
+
if (global.__coverage__) {
|
|
77
|
+
delete global.__coverage__;
|
|
78
|
+
}
|
|
79
|
+
});
|
|
44
80
|
},
|
|
45
81
|
specPattern,
|
|
46
82
|
supportFile: `${mainCypressFolder}/support/component.tsx`
|
|
@@ -58,6 +94,7 @@ module.exports = ({
|
|
|
58
94
|
},
|
|
59
95
|
...env
|
|
60
96
|
},
|
|
97
|
+
numTestsKeptInMemory: 1,
|
|
61
98
|
reporter: 'mochawesome',
|
|
62
99
|
reporterOptions: {
|
|
63
100
|
html: false,
|
|
@@ -66,6 +103,10 @@ module.exports = ({
|
|
|
66
103
|
reportDir: `${mainCypressFolder}/results`,
|
|
67
104
|
reportFilename: '[name]-report.json'
|
|
68
105
|
},
|
|
106
|
+
retries: {
|
|
107
|
+
openMode: 0,
|
|
108
|
+
runMode: 2
|
|
109
|
+
},
|
|
69
110
|
video: true,
|
|
70
111
|
videosFolder: `${mainCypressFolder}/results/videos`,
|
|
71
112
|
viewportHeight: 590,
|
|
@@ -54,6 +54,12 @@ export default ({
|
|
|
54
54
|
commandTrimLength: 5000,
|
|
55
55
|
defaultTrimLength: 5000,
|
|
56
56
|
});
|
|
57
|
+
on("task", {
|
|
58
|
+
logVersion(message) {
|
|
59
|
+
console.log(`[LOG]: ${message}`);
|
|
60
|
+
return null;
|
|
61
|
+
},
|
|
62
|
+
});
|
|
57
63
|
await esbuildPreprocessor(on, config);
|
|
58
64
|
tasks(on);
|
|
59
65
|
|
|
@@ -65,7 +71,7 @@ export default ({
|
|
|
65
71
|
},
|
|
66
72
|
env: {
|
|
67
73
|
...env,
|
|
68
|
-
DATABASE_IMAGE: '
|
|
74
|
+
DATABASE_IMAGE: 'bitnamilegacy/mariadb:10.11',
|
|
69
75
|
OPENID_IMAGE_VERSION: process.env.MAJOR || '24.04',
|
|
70
76
|
SAML_IMAGE_VERSION: process.env.MAJOR || '24.04',
|
|
71
77
|
STABILITY: 'unstable',
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@centreon/js-config",
|
|
3
3
|
"description": "Centreon Frontend shared build configuration",
|
|
4
|
-
"version": "25.
|
|
4
|
+
"version": "25.11.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/centreon/centreon-frontend.git"
|
|
@@ -21,16 +21,16 @@
|
|
|
21
21
|
"prettier": "^3.0.0"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@badeball/cypress-cucumber-preprocessor": "^
|
|
25
|
-
"@bahmutov/cypress-esbuild-preprocessor": "^2.2.
|
|
24
|
+
"@badeball/cypress-cucumber-preprocessor": "^23.2.1",
|
|
25
|
+
"@bahmutov/cypress-esbuild-preprocessor": "^2.2.7",
|
|
26
26
|
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
|
27
27
|
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
|
28
28
|
"@tsconfig/node16": "^16.1.3",
|
|
29
29
|
"@tsconfig/node20": "^20.1.4",
|
|
30
30
|
"@types/cypress-cucumber-preprocessor": "^4.0.5",
|
|
31
|
-
"cypress": "^
|
|
32
|
-
"cypress-multi-reporters": "^
|
|
33
|
-
"cypress-terminal-report": "^
|
|
31
|
+
"cypress": "^15.5.0",
|
|
32
|
+
"cypress-multi-reporters": "^2.0.5",
|
|
33
|
+
"cypress-terminal-report": "^7.3.3",
|
|
34
34
|
"cypress-wait-until": "^3.0.2",
|
|
35
35
|
"dotenv": "^16.4.5",
|
|
36
36
|
"esbuild": "^0.21.5",
|