@telefonica/acceptance-testing 1.1.1 → 1.1.2-beta1
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/jest-puppeteer-config.js +4 -2
- package/package.json +2 -2
package/jest-puppeteer-config.js
CHANGED
|
@@ -23,7 +23,6 @@ const poll = async (url) => {
|
|
|
23
23
|
*/
|
|
24
24
|
const getPuppeteerConfig = async () => {
|
|
25
25
|
const isCi = process.argv.includes('--ci') || process.env.CI;
|
|
26
|
-
const isLocal = !isCi;
|
|
27
26
|
|
|
28
27
|
const rootDir = findRoot(process.cwd());
|
|
29
28
|
const pkg = JSON.parse(fs.readFileSync(path.join(rootDir, 'package.json'), 'utf-8'));
|
|
@@ -41,13 +40,16 @@ const getPuppeteerConfig = async () => {
|
|
|
41
40
|
|
|
42
41
|
let connect;
|
|
43
42
|
|
|
44
|
-
if (
|
|
43
|
+
if (isHeadless) {
|
|
45
44
|
const debugPort = isCi ? 9222 : 9223;
|
|
46
45
|
const dockerChromiumUrl = `http://localhost:${debugPort}`;
|
|
47
46
|
|
|
48
47
|
try {
|
|
49
48
|
await fetch(dockerChromiumUrl);
|
|
50
49
|
} catch (e) {
|
|
50
|
+
if (isCi) {
|
|
51
|
+
throw e;
|
|
52
|
+
}
|
|
51
53
|
const dockerComposeFile = path.join(__dirname, 'docker-compose.yaml');
|
|
52
54
|
execSync(`docker-compose -f ${dockerComposeFile} up -d`, {stdio: 'inherit'});
|
|
53
55
|
console.log();
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telefonica/acceptance-testing",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2-beta1",
|
|
4
4
|
"author": "Telefonica",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"module": "dist/acceptance-testing.esm.js",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"typings": "dist/index.d.ts",
|
|
9
9
|
"bin": {
|
|
10
|
-
"test-acceptance": "bin/test-acceptance"
|
|
10
|
+
"test-acceptance": "./bin/test-acceptance.js"
|
|
11
11
|
},
|
|
12
12
|
"files": [
|
|
13
13
|
"dist",
|