@telefonica/acceptance-testing 3.0.0-beta6 → 3.0.0-beta7

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.
@@ -1,5 +1,5 @@
1
1
  services:
2
2
  acceptance-tests-chromium:
3
- image: telefonica/web-builder:chromium124.0.6367-node20.13-1.0.4
3
+ image: telefonica/web-builder:chromium125.0.6422.60-node20.13-1.0.0
4
4
  ports:
5
5
  - '9223:9222'
@@ -17,15 +17,8 @@ const poll = async (url) => {
17
17
  throw Error(`Error fetching ${url}`);
18
18
  };
19
19
 
20
- /** @param args {Array<unknown>} */
21
- const debug = (...args) => {
22
- if (process.env.DEBUG) {
23
- console.log('[acceptance-testing]', ...args);
24
- }
25
- };
26
-
27
20
  /**
28
- * CI => everything runs inside a docker
21
+ * CI => everything runs inside a docker. Executes the chromium installed in the docker.
29
22
  * Local, headless => connects to a dockerized chromium at port 9223 (see docker-compose.yaml)
30
23
  * Local, with UI => launches a local chromium installed by puppetteer
31
24
  *
@@ -34,7 +27,8 @@ const debug = (...args) => {
34
27
  const getPuppeteerConfig = async () => {
35
28
  const isCi = process.argv.includes('--ci') || process.env.CI;
36
29
  const isLocal = !isCi;
37
- const isHeadless = !!process.env.HEADLESS;
30
+ const isHeadless =
31
+ !!process.env.HEADLESS && process.env.HEADLESS !== 'false' && process.env.HEADLESS !== '0';
38
32
 
39
33
  const rootDir = findRoot(process.cwd());
40
34
  const packageJson = JSON.parse(fs.readFileSync(path.join(rootDir, 'package.json'), 'utf-8'));
@@ -72,12 +66,9 @@ const getPuppeteerConfig = async () => {
72
66
  await poll(dockerChromiumUrl);
73
67
  }
74
68
 
75
- // const {webSocketDebuggerUrl} = await fetch(`${dockerChromiumUrl}/json/version`).then((r) => r.json());
76
-
77
69
  connect = {
78
70
  ...baseConnectOrLaunchConfig,
79
71
  browserURL: dockerChromiumUrl,
80
- // browserWSEndpoint: webSocketDebuggerUrl,
81
72
  };
82
73
  }
83
74
 
@@ -96,12 +87,6 @@ const getPuppeteerConfig = async () => {
96
87
  ...baseConnectOrLaunchConfig,
97
88
  // Launch chromium installed in docker in CI
98
89
  ...(isCi ? {executablePath: '/usr/bin/chromium'} : {}),
99
- env: {
100
- ...process.env,
101
- TZ: 'UTC',
102
- LANG: 'es_ES',
103
- LANGUAGE: 'es_ES',
104
- },
105
90
  dumpio: true,
106
91
  // args must be the same as the ones defined in web-builder Dockerfile
107
92
  args: [
@@ -126,14 +111,15 @@ const getPuppeteerConfig = async () => {
126
111
  '--enable-automation',
127
112
  '--password-store=basic',
128
113
  '--use-mock-keychain',
129
- '--headless',
114
+ '--headless=new',
130
115
  '--hide-scrollbars',
131
116
  '--no-sandbox',
117
+ '--disabled-setupid-sandbox',
132
118
  '--font-render-hinting=none',
133
119
  '--disable-font-subpixel-positioning',
134
- // '--remote-debugging-port=9222', // https://github.com/puppeteer/puppeteer/issues/8546
135
- '--remote-debugging-address=0.0.0.0',
136
120
  '--ignore-certificate-errors',
121
+ // '--remote-debugging-port=9222', // https://github.com/puppeteer/puppeteer/issues/8546
122
+ // '--remote-debugging-address=0.0.0.0',
137
123
  ],
138
124
  },
139
125
  browserContext: 'incognito',
@@ -147,7 +133,6 @@ const getPuppeteerConfig = async () => {
147
133
  : undefined,
148
134
  };
149
135
 
150
- debug('jest-puppeteer-config', config);
151
136
  return config;
152
137
  };
153
138
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telefonica/acceptance-testing",
3
- "version": "3.0.0-beta6",
3
+ "version": "3.0.0-beta7",
4
4
  "author": "Telefonica",
5
5
  "license": "UNLICENSED",
6
6
  "module": "dist/acceptance-testing.esm.js",