@centreon/js-config 24.4.35 → 24.4.36

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
+ const fs = require('fs');
10
+ const path = require('path');
11
+
9
12
  module.exports = ({
10
13
  webpackConfig,
11
14
  cypressFolder,
@@ -46,10 +49,43 @@ module.exports = ({
46
49
  launchOptions.args.push('--headless=new');
47
50
  launchOptions.args.push('--force-color-profile=srgb');
48
51
  launchOptions.args.push('--window-size=1400,1200');
52
+ launchOptions.args.push('--max-old-space-size=4096');
53
+ launchOptions.args.push('--disable-dev-shm-usage');
54
+ launchOptions.args.push('--disable-gpu');
55
+ launchOptions.args.push('--no-sandbox');
49
56
  }
50
57
 
51
58
  return launchOptions;
52
59
  });
60
+
61
+ on('after:run', (results) => {
62
+ const testRetries = {};
63
+ if ('runs' in results) {
64
+ results.runs.forEach((run) => {
65
+ run.tests.forEach((test) => {
66
+ if (test.attempts && test.attempts.length > 1 && test.state === 'passed') {
67
+ const testTitle = test.title.join(' > '); // Convert the array to a string
68
+ testRetries[testTitle] = test.attempts.length - 1;
69
+ }
70
+ });
71
+ });
72
+ }
73
+
74
+ // Save the testRetries object to a file in the e2e/results directory
75
+ const resultFilePath = path.join(
76
+ mainCypressFolder,
77
+ 'results',
78
+ 'retries.json'
79
+ );
80
+
81
+ fs.writeFileSync(resultFilePath, JSON.stringify(testRetries, null, 2));
82
+ });
83
+
84
+ on('after:spec', () => {
85
+ if (global.__coverage__) {
86
+ delete global.__coverage__;
87
+ }
88
+ });
53
89
  },
54
90
  specPattern,
55
91
  supportFile: `${mainCypressFolder}/support/component.tsx`
@@ -75,6 +111,10 @@ module.exports = ({
75
111
  reportDir: `${mainCypressFolder}/results`,
76
112
  reportFilename: '[name]-report.json'
77
113
  },
114
+ retries: {
115
+ openMode: 0,
116
+ runMode: 2
117
+ },
78
118
  video: true,
79
119
  videosFolder: `${mainCypressFolder}/results/videos`,
80
120
  viewportHeight: 590,
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": "24.4.35",
4
+ "version": "24.4.36",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/centreon/centreon-frontend.git"