@centreon/js-config 23.10.55 → 23.10.57

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.
@@ -308,7 +308,7 @@ Cypress.Commands.add(
308
308
  ({
309
309
  name = Cypress.env('dockerName')
310
310
  }: StopWebContainerProps = {}): Cypress.Chainable => {
311
- const logDirectory = `cypress/results/logs/${Cypress.spec.name.replace(
311
+ const logDirectory = `results/logs/${Cypress.spec.name.replace(
312
312
  artifactIllegalCharactersMatcher,
313
313
  '_'
314
314
  )}/${Cypress.currentTest.title.replace(
@@ -416,41 +416,6 @@ Cypress.Commands.add(
416
416
  }
417
417
  );
418
418
 
419
- Cypress.Commands.add(
420
- 'insertDashboardWithWidget',
421
- (dashboardBody, patchBody) => {
422
- cy.request({
423
- body: {
424
- ...dashboardBody
425
- },
426
- method: 'POST',
427
- url: '/centreon/api/latest/configuration/dashboards'
428
- }).then((response) => {
429
- const dashboardId = response.body.id;
430
- cy.waitUntil(
431
- () => {
432
- return cy
433
- .request({
434
- method: 'GET',
435
- url: `/centreon/api/latest/configuration/dashboards/${dashboardId}`
436
- })
437
- .then((getResponse) => {
438
- return getResponse.body && getResponse.body.id === dashboardId;
439
- });
440
- },
441
- {
442
- timeout: 10000
443
- }
444
- );
445
- cy.request({
446
- body: patchBody,
447
- method: 'PATCH',
448
- url: `/centreon/api/latest/configuration/dashboards/${dashboardId}`
449
- });
450
- });
451
- }
452
- );
453
-
454
419
  interface ShareDashboardToUserProps {
455
420
  dashboardName: string;
456
421
  role: string;
@@ -465,30 +430,6 @@ interface ListingRequestResult {
465
430
  };
466
431
  }
467
432
 
468
- interface PatchDashboardBody {
469
- panels: Array<{
470
- layout: {
471
- height: number;
472
- min_height: number;
473
- min_width: number;
474
- width: number;
475
- x: number;
476
- y: number;
477
- };
478
- name: string;
479
- widget_settings: {
480
- options: {
481
- description: {
482
- content: string;
483
- enabled: boolean;
484
- };
485
- name: string;
486
- };
487
- };
488
- widget_type: string;
489
- }>;
490
- }
491
-
492
433
  Cypress.Commands.add(
493
434
  'shareDashboardToUser',
494
435
  ({ dashboardName, userName, role }: ShareDashboardToUserProps): void => {
@@ -561,11 +502,6 @@ declare global {
561
502
  hoverRootMenuItem: (rootItemNumber: number) => Cypress.Chainable;
562
503
  insertDashboard: (dashboard: Dashboard) => Cypress.Chainable;
563
504
  insertDashboardList: (fixtureFile: string) => Cypress.Chainable;
564
- insertDashboardWithWidget: (
565
- dashboard: Dashboard,
566
- patch: PatchDashboardBody
567
- ) => Cypress.Chainable;
568
-
569
505
  loginByTypeOfUser: ({
570
506
  jsonName,
571
507
  loginViaApi
@@ -5,7 +5,6 @@ import { execSync } from 'child_process';
5
5
 
6
6
  import { defineConfig } from 'cypress';
7
7
  import installLogsPrinter from 'cypress-terminal-report/src/installLogsPrinter';
8
- import { config as configDotenv } from 'dotenv';
9
8
 
10
9
  import esbuildPreprocessor from './esbuild-preprocessor';
11
10
  import plugins from './plugins';
@@ -15,7 +14,6 @@ interface ConfigurationOptions {
15
14
  cypressFolder?: string;
16
15
  dockerName?: string;
17
16
  env?: Record<string, unknown>;
18
- envFile?: string;
19
17
  isDevelopment?: boolean;
20
18
  specPattern: string;
21
19
  }
@@ -25,13 +23,8 @@ export default ({
25
23
  cypressFolder,
26
24
  isDevelopment,
27
25
  dockerName,
28
- env,
29
- envFile
26
+ env
30
27
  }: ConfigurationOptions): Cypress.ConfigOptions => {
31
- if (envFile) {
32
- configDotenv({ path: envFile });
33
- }
34
-
35
28
  const resultsFolder = `${cypressFolder || '.'}/results`;
36
29
 
37
30
  const webImageVersion = execSync('git rev-parse --abbrev-ref HEAD')
@@ -60,7 +53,7 @@ export default ({
60
53
  },
61
54
  env: {
62
55
  ...env,
63
- OPENID_IMAGE_VERSION: process.env.MAJOR || '24.04',
56
+ OPENID_IMAGE_VERSION: '23.04',
64
57
  WEB_IMAGE_OS: 'alma9',
65
58
  WEB_IMAGE_VERSION: webImageVersion,
66
59
  dockerName: dockerName || 'centreon-dev'
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.55",
4
+ "version": "23.10.57",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/centreon/centreon-frontend.git"
@@ -44,17 +44,16 @@
44
44
  "cypress"
45
45
  ],
46
46
  "dependencies": {
47
- "@badeball/cypress-cucumber-preprocessor": "^18.0.6",
47
+ "@badeball/cypress-cucumber-preprocessor": "^19.1.0",
48
48
  "@bahmutov/cypress-esbuild-preprocessor": "^2.2.0",
49
49
  "@esbuild-plugins/node-globals-polyfill": "^0.2.3",
50
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
- "dotenv": "^16.3.1",
57
- "esbuild": "^0.19.3",
51
+ "@types/cypress-cucumber-preprocessor": "^4.0.5",
52
+ "@types/dockerode": "^3.3.23",
53
+ "cypress-multi-reporters": "^1.6.4",
54
+ "cypress-terminal-report": "^5.3.9",
55
+ "dockerode": "^4.0.0",
56
+ "esbuild": "^0.19.5",
58
57
  "mochawesome": "^7.1.3"
59
58
  }
60
59
  }