@telefonica/acceptance-testing 3.0.0-beta5 → 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.3
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,11 +87,7 @@ 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
- TZ: 'UTC',
101
- LANG: 'es_ES',
102
- LANGUAGE: 'es_ES',
103
- },
90
+ dumpio: true,
104
91
  // args must be the same as the ones defined in web-builder Dockerfile
105
92
  args: [
106
93
  '--lang=es_ES',
@@ -124,15 +111,15 @@ const getPuppeteerConfig = async () => {
124
111
  '--enable-automation',
125
112
  '--password-store=basic',
126
113
  '--use-mock-keychain',
127
- '--headless',
114
+ '--headless=new',
128
115
  '--hide-scrollbars',
129
116
  '--no-sandbox',
117
+ '--disabled-setupid-sandbox',
130
118
  '--font-render-hinting=none',
131
- '--force-color-profile=sRGB',
132
119
  '--disable-font-subpixel-positioning',
133
- '--remote-debugging-port=9222',
134
- '--remote-debugging-address=0.0.0.0',
135
120
  '--ignore-certificate-errors',
121
+ // '--remote-debugging-port=9222', // https://github.com/puppeteer/puppeteer/issues/8546
122
+ // '--remote-debugging-address=0.0.0.0',
136
123
  ],
137
124
  },
138
125
  browserContext: 'incognito',
@@ -146,7 +133,6 @@ const getPuppeteerConfig = async () => {
146
133
  : undefined,
147
134
  };
148
135
 
149
- debug('jest-puppeteer-config', config);
150
136
  return config;
151
137
  };
152
138
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telefonica/acceptance-testing",
3
- "version": "3.0.0-beta5",
3
+ "version": "3.0.0-beta7",
4
4
  "author": "Telefonica",
5
5
  "license": "UNLICENSED",
6
6
  "module": "dist/acceptance-testing.esm.js",