@centreon/js-config 23.10.18 → 23.10.20
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 +21 -3
- package/cypress/e2e/plugins.ts +0 -3
- package/package.json +1 -2
package/cypress/e2e/commands.ts
CHANGED
|
@@ -216,10 +216,28 @@ Cypress.Commands.add(
|
|
|
216
216
|
'startContainer',
|
|
217
217
|
({ name, image, portBindings }: StartContainerProps): Cypress.Chainable => {
|
|
218
218
|
return cy
|
|
219
|
-
.exec(
|
|
220
|
-
|
|
219
|
+
.exec('docker image list --format "{{.Repository}}:{{.Tag}}"')
|
|
220
|
+
.then(({ stdout }) => {
|
|
221
|
+
if (
|
|
222
|
+
stdout.match(
|
|
223
|
+
new RegExp(
|
|
224
|
+
`^${image.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')}`,
|
|
225
|
+
'm'
|
|
226
|
+
)
|
|
227
|
+
)
|
|
228
|
+
) {
|
|
229
|
+
cy.log(`Local docker image found : ${image}`);
|
|
230
|
+
|
|
231
|
+
return cy.wrap(image);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
cy.log(`Pulling remote docker image : ${image}`);
|
|
235
|
+
|
|
236
|
+
return cy.exec(`docker pull ${image}`).then(() => cy.wrap(image));
|
|
221
237
|
})
|
|
222
|
-
.
|
|
238
|
+
.then((imageName) =>
|
|
239
|
+
cy.task('startContainer', { image: imageName, name, portBindings })
|
|
240
|
+
);
|
|
223
241
|
}
|
|
224
242
|
);
|
|
225
243
|
|
package/cypress/e2e/plugins.ts
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
import Docker from 'dockerode';
|
|
7
7
|
import { addCucumberPreprocessorPlugin } from '@badeball/cypress-cucumber-preprocessor';
|
|
8
8
|
import webpackPreprocessor from '@cypress/webpack-preprocessor';
|
|
9
|
-
import cypressFailFast from 'cypress-fail-fast/plugin';
|
|
10
9
|
|
|
11
10
|
const docker = new Docker();
|
|
12
11
|
|
|
@@ -43,8 +42,6 @@ const getWebpackOptions = (config): object => {
|
|
|
43
42
|
export default async (on, config): Promise<void> => {
|
|
44
43
|
await addCucumberPreprocessorPlugin(on, config);
|
|
45
44
|
|
|
46
|
-
await cypressFailFast(on, config);
|
|
47
|
-
|
|
48
45
|
const webpackOptions = await getWebpackOptions(config);
|
|
49
46
|
const options = {
|
|
50
47
|
webpackOptions
|
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.20",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/centreon/centreon-frontend.git"
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
"@badeball/cypress-cucumber-preprocessor": "^14.0.0",
|
|
20
20
|
"@tsconfig/node16": "^1.0.4",
|
|
21
21
|
"@types/dockerode": "^3.3.16",
|
|
22
|
-
"cypress-fail-fast": "^7.0.1",
|
|
23
22
|
"dockerode": "^3.3.5",
|
|
24
23
|
"eslint": "^8.17.0",
|
|
25
24
|
"eslint-config-airbnb": "19.0.4",
|