@centreon/js-config 23.10.11-timezone-test-stabilization.5 → 23.10.11
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.
- package/cypress/e2e/commands.ts +8 -30
- package/package.json +1 -1
package/cypress/e2e/commands.ts
CHANGED
|
@@ -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/${
|
|
264
|
-
|
|
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/${
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
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
|
|
@@ -361,9 +341,7 @@ Cypress.Commands.add('getTimeFromHeader', (): Cypress.Chainable => {
|
|
|
361
341
|
return cy.get('header div[data-cy="clock"]').then(($time) => {
|
|
362
342
|
const localTime = $time.children()[1].textContent;
|
|
363
343
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
return cy.wrap(localTime);
|
|
344
|
+
return localTime;
|
|
367
345
|
});
|
|
368
346
|
});
|
|
369
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
|
|
4
|
+
"version": "23.10.11",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/centreon/centreon-frontend.git"
|