@centreon/js-config 23.10.33-develop.0 → 23.10.34
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.
|
@@ -24,6 +24,14 @@ module.exports = ({
|
|
|
24
24
|
excludeSpecPattern,
|
|
25
25
|
setupNodeEvents: (on, config) => {
|
|
26
26
|
addMatchImageSnapshotPlugin(on, config);
|
|
27
|
+
|
|
28
|
+
on('before:browser:launch', (browser, launchOptions) => {
|
|
29
|
+
if (browser.name === 'chrome' && browser.isHeadless) {
|
|
30
|
+
launchOptions.args.push('--headless=new');
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return launchOptions;
|
|
34
|
+
});
|
|
27
35
|
},
|
|
28
36
|
specPattern,
|
|
29
37
|
supportFile: `${mainCypressFolder}/support/component.tsx`
|
package/cypress/e2e/commands.ts
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
import './commands/configuration';
|
|
4
4
|
import './commands/monitoring';
|
|
5
5
|
|
|
6
|
+
import installLogsCollector from 'cypress-terminal-report/src/installLogsCollector';
|
|
7
|
+
|
|
8
|
+
installLogsCollector();
|
|
9
|
+
|
|
6
10
|
const apiLoginV2 = '/centreon/authentication/providers/configurations/local';
|
|
7
11
|
|
|
8
12
|
const artifactIllegalCharactersMatcher = /[,\s/|<>*?:"]/g;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { execSync } from 'child_process';
|
|
5
5
|
|
|
6
6
|
import { defineConfig } from 'cypress';
|
|
7
|
+
import installLogsPrinter from 'cypress-terminal-report/src/installLogsPrinter';
|
|
7
8
|
|
|
8
9
|
import esbuildPreprocessor from './esbuild-preprocessor';
|
|
9
10
|
import plugins from './plugins';
|
|
@@ -35,7 +36,12 @@ export default ({
|
|
|
35
36
|
defaultCommandTimeout: 6000,
|
|
36
37
|
e2e: {
|
|
37
38
|
excludeSpecPattern: ['*.js', '*.ts', '*.md'],
|
|
39
|
+
reporter: require.resolve('cypress-multi-reporters'),
|
|
40
|
+
reporterOptions: {
|
|
41
|
+
configFile: `${__dirname}/reporter-config.js`
|
|
42
|
+
},
|
|
38
43
|
setupNodeEvents: async (on, config) => {
|
|
44
|
+
installLogsPrinter(on);
|
|
39
45
|
await esbuildPreprocessor(on, config);
|
|
40
46
|
tasks(on);
|
|
41
47
|
|
|
@@ -51,19 +57,11 @@ export default ({
|
|
|
51
57
|
dockerName: dockerName || 'centreon-dev'
|
|
52
58
|
},
|
|
53
59
|
execTimeout: 60000,
|
|
54
|
-
reporter: 'mochawesome',
|
|
55
|
-
reporterOptions: {
|
|
56
|
-
html: false,
|
|
57
|
-
json: true,
|
|
58
|
-
overwrite: true,
|
|
59
|
-
reportDir: `${resultsFolder}/reports`,
|
|
60
|
-
reportFilename: '[name]-report.json'
|
|
61
|
-
},
|
|
62
60
|
requestTimeout: 10000,
|
|
63
61
|
retries: 0,
|
|
64
62
|
screenshotsFolder: `${resultsFolder}/screenshots`,
|
|
65
63
|
video: true,
|
|
66
|
-
videoCompression:
|
|
64
|
+
videoCompression: 0,
|
|
67
65
|
videosFolder: `${resultsFolder}/videos`
|
|
68
66
|
});
|
|
69
67
|
};
|
package/cypress/e2e/plugins.ts
CHANGED
|
@@ -11,16 +11,20 @@ export default (
|
|
|
11
11
|
const width = 1920;
|
|
12
12
|
const height = 1080;
|
|
13
13
|
|
|
14
|
-
if (
|
|
14
|
+
if (browser.name === 'chrome') {
|
|
15
|
+
if (browser.isHeadless) {
|
|
16
|
+
launchOptions.args.push('--headless=new');
|
|
17
|
+
}
|
|
18
|
+
|
|
15
19
|
// flags description : https://github.com/GoogleChrome/chrome-launcher/blob/main/docs/chrome-flags-for-tools.md
|
|
16
20
|
launchOptions.args.push('--disable-gpu');
|
|
17
21
|
launchOptions.args.push('--auto-open-devtools-for-tabs');
|
|
18
22
|
launchOptions.args.push('--disable-extensions');
|
|
19
23
|
launchOptions.args.push('--hide-scrollbars');
|
|
20
24
|
launchOptions.args.push('--mute-audio');
|
|
21
|
-
launchOptions.args.push('--hide-scrollbars');
|
|
22
25
|
|
|
23
26
|
launchOptions.args.push(`--window-size=${width},${height}`);
|
|
27
|
+
|
|
24
28
|
// force screen to be non-retina and just use our given resolution
|
|
25
29
|
launchOptions.args.push('--force-device-scale-factor=1');
|
|
26
30
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
mochawesomeReporterOptions: {
|
|
3
|
+
consoleReporter: 'none',
|
|
4
|
+
html: false,
|
|
5
|
+
json: true,
|
|
6
|
+
overwrite: true,
|
|
7
|
+
reportDir: 'cypress/results/reports',
|
|
8
|
+
reportFilename: '[name]-report.json'
|
|
9
|
+
},
|
|
10
|
+
reporterEnabled: `mochawesome,${require.resolve(
|
|
11
|
+
'@badeball/cypress-cucumber-preprocessor/pretty-reporter'
|
|
12
|
+
)}`
|
|
13
|
+
};
|
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": "23.10.
|
|
4
|
+
"version": "23.10.34",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/centreon/centreon-frontend.git"
|
|
@@ -16,15 +16,7 @@
|
|
|
16
16
|
"url": "https://github.com/centreon/centreon-frontend/issues"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@
|
|
20
|
-
"@bahmutov/cypress-esbuild-preprocessor": "^2.2.0",
|
|
21
|
-
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
|
22
|
-
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
|
23
|
-
"@tsconfig/node16": "^1.0.4",
|
|
24
|
-
"@types/cypress-cucumber-preprocessor": "^4.0.2",
|
|
25
|
-
"@types/dockerode": "^3.3.19",
|
|
26
|
-
"dockerode": "^3.3.5",
|
|
27
|
-
"esbuild": "^0.19.2",
|
|
19
|
+
"@tsconfig/node16": "^16.1.1",
|
|
28
20
|
"eslint": "^8.17.0",
|
|
29
21
|
"eslint-config-airbnb": "19.0.4",
|
|
30
22
|
"eslint-config-prettier": "^8.5.0",
|
|
@@ -50,5 +42,18 @@
|
|
|
50
42
|
"tsconfig",
|
|
51
43
|
"webpack",
|
|
52
44
|
"cypress"
|
|
53
|
-
]
|
|
45
|
+
],
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@badeball/cypress-cucumber-preprocessor": "^18.0.6",
|
|
48
|
+
"@bahmutov/cypress-esbuild-preprocessor": "^2.2.0",
|
|
49
|
+
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
|
50
|
+
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
|
51
|
+
"@types/cypress-cucumber-preprocessor": "^4.0.2",
|
|
52
|
+
"@types/dockerode": "^3.3.19",
|
|
53
|
+
"cypress-multi-reporters": "^1.6.3",
|
|
54
|
+
"cypress-terminal-report": "^5.3.6",
|
|
55
|
+
"dockerode": "^3.3.5",
|
|
56
|
+
"esbuild": "^0.19.3",
|
|
57
|
+
"mochawesome": "^7.1.3"
|
|
58
|
+
}
|
|
54
59
|
}
|