@centreon/js-config 23.10.11-timezone-test-stabilization.2 → 23.10.11-timezone-test-stabilization.4

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,6 +4,8 @@ import './commands/configuration';
4
4
 
5
5
  const apiLoginV2 = '/centreon/authentication/providers/configurations/local';
6
6
 
7
+ const artifactIllegalCharactersMatcher = /[,\s/|<>*?:"]/g;
8
+
7
9
  Cypress.Commands.add('getWebVersion', (): Cypress.Chainable => {
8
10
  return cy
9
11
  .exec(
@@ -258,9 +260,13 @@ Cypress.Commands.add(
258
260
  ({
259
261
  name = Cypress.env('dockerName')
260
262
  }: StopWebContainerProps = {}): Cypress.Chainable => {
261
- const logDirectory = `cypress/results/logs/${
262
- Cypress.spec.name
263
- }/${Cypress.currentTest.title.replace(/[,\s/|<>*?:"]/g, '_')}`;
263
+ const logDirectory = `cypress/results/logs/${Cypress.spec.name.replace(
264
+ artifactIllegalCharactersMatcher,
265
+ '_'
266
+ )}/${Cypress.currentTest.title.replace(
267
+ artifactIllegalCharactersMatcher,
268
+ '_'
269
+ )}`;
264
270
 
265
271
  return cy
266
272
  .visitEmptyPage()
@@ -303,10 +309,11 @@ Cypress.Commands.add(
303
309
  ({ name }: StopContainerProps): Cypress.Chainable => {
304
310
  cy.exec(`docker logs ${name}`).then(({ stdout }) => {
305
311
  cy.writeFile(
306
- `cypress/results/logs/${
307
- Cypress.spec.name
308
- }/${Cypress.currentTest.title.replace(
309
- /,|\s|\//g,
312
+ `cypress/results/logs/${Cypress.spec.name.replace(
313
+ artifactIllegalCharactersMatcher,
314
+ '_'
315
+ )}/${Cypress.currentTest.title.replace(
316
+ artifactIllegalCharactersMatcher,
310
317
  '_'
311
318
  )}/container-${name}.log`,
312
319
  stdout
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.2",
4
+ "version": "23.10.11-timezone-test-stabilization.4",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/centreon/centreon-frontend.git"