@telefonica/acceptance-testing 1.1.2-beta1 → 1.1.2-beta2

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.
@@ -23,6 +23,7 @@ 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;
26
27
 
27
28
  const rootDir = findRoot(process.cwd());
28
29
  const pkg = JSON.parse(fs.readFileSync(path.join(rootDir, 'package.json'), 'utf-8'));
@@ -40,16 +41,13 @@ const getPuppeteerConfig = async () => {
40
41
 
41
42
  let connect;
42
43
 
43
- if (isHeadless) {
44
+ if (isLocal && isHeadless) {
44
45
  const debugPort = isCi ? 9222 : 9223;
45
46
  const dockerChromiumUrl = `http://localhost:${debugPort}`;
46
47
 
47
48
  try {
48
49
  await fetch(dockerChromiumUrl);
49
50
  } catch (e) {
50
- if (isCi) {
51
- throw e;
52
- }
53
51
  const dockerComposeFile = path.join(__dirname, 'docker-compose.yaml');
54
52
  execSync(`docker-compose -f ${dockerComposeFile} up -d`, {stdio: 'inherit'});
55
53
  console.log();
@@ -78,6 +76,7 @@ const getPuppeteerConfig = async () => {
78
76
  },
79
77
  args: [
80
78
  '--no-sandbox', // probably not needed in ubuntu
79
+ '--font-render-hinting=none', // this flag avoids font rendering differences between headless/headfull'
81
80
  ],
82
81
  },
83
82
  connect,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telefonica/acceptance-testing",
3
- "version": "1.1.2-beta1",
3
+ "version": "1.1.2-beta2",
4
4
  "author": "Telefonica",
5
5
  "license": "UNLICENSED",
6
6
  "module": "dist/acceptance-testing.esm.js",