@centreon/js-config 23.10.11-timezone-test-stabilization.6 → 23.10.12

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.
@@ -4,8 +4,6 @@ import './commands/configuration';
4
4
 
5
5
  const apiLoginV2 = '/centreon/authentication/providers/configurations/local';
6
6
 
7
- const artifactIllegalCharactersMatcher = /[,\s/|<>*?:"]/g;
8
-
9
7
  Cypress.Commands.add('getWebVersion', (): Cypress.Chainable => {
10
8
  return cy
11
9
  .exec(
@@ -260,13 +258,9 @@ Cypress.Commands.add(
260
258
  ({
261
259
  name = Cypress.env('dockerName')
262
260
  }: StopWebContainerProps = {}): Cypress.Chainable => {
263
- const logDirectory = `cypress/results/logs/${Cypress.spec.name.replace(
264
- artifactIllegalCharactersMatcher,
265
- '_'
266
- )}/${Cypress.currentTest.title.replace(
267
- artifactIllegalCharactersMatcher,
268
- '_'
269
- )}`;
261
+ const logDirectory = `cypress/results/logs/${
262
+ Cypress.spec.name
263
+ }/${Cypress.currentTest.title.replace(/,|\s|\//g, '_')}`;
270
264
 
271
265
  return cy
272
266
  .visitEmptyPage()
@@ -283,19 +277,6 @@ Cypress.Commands.add(
283
277
  destination: `${logDirectory}/centreon`,
284
278
  source: '/var/log/centreon'
285
279
  })
286
- .then(() => {
287
- if (Cypress.env('WEB_IMAGE_OS').includes('alma')) {
288
- return cy.copyFromContainer({
289
- destination: `${logDirectory}/php`,
290
- source: '/var/log/php-fpm'
291
- });
292
- }
293
-
294
- return cy.copyFromContainer({
295
- destination: `${logDirectory}/php/`,
296
- source: '/var/log/php8.1-fpm-centreon-error.log'
297
- });
298
- })
299
280
  .stopContainer({ name });
300
281
  }
301
282
  );
@@ -309,11 +290,10 @@ Cypress.Commands.add(
309
290
  ({ name }: StopContainerProps): Cypress.Chainable => {
310
291
  cy.exec(`docker logs ${name}`).then(({ stdout }) => {
311
292
  cy.writeFile(
312
- `cypress/results/logs/${Cypress.spec.name.replace(
313
- artifactIllegalCharactersMatcher,
314
- '_'
315
- )}/${Cypress.currentTest.title.replace(
316
- artifactIllegalCharactersMatcher,
293
+ `cypress/results/logs/${
294
+ Cypress.spec.name
295
+ }/${Cypress.currentTest.title.replace(
296
+ /,|\s|\//g,
317
297
  '_'
318
298
  )}/container-${name}.log`,
319
299
  stdout
@@ -358,15 +338,10 @@ Cypress.Commands.add(
358
338
  );
359
339
 
360
340
  Cypress.Commands.add('getTimeFromHeader', (): Cypress.Chainable => {
361
- return cy.waitUntil(() => {
362
- return cy.get('header div[data-cy="clock"]').then(($time) => {
363
- const headerTime = $time.children()[1].textContent;
364
- if (headerTime?.match(/\d+:\d+/)) {
365
- return headerTime;
366
- }
341
+ return cy.get('header div[data-cy="clock"]').then(($time) => {
342
+ const localTime = $time.children()[1].textContent;
367
343
 
368
- return false;
369
- });
344
+ return localTime;
370
345
  });
371
346
  });
372
347
 
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.11-timezone-test-stabilization.6",
4
+ "version": "23.10.12",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/centreon/centreon-frontend.git"