@tramvai/test-pw 2.61.2 → 2.64.0

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/lib/index.es.js CHANGED
@@ -11,6 +11,7 @@ const PLAYWRIGHT_DEFAULT_LAUNCH_OPTIONS = {
11
11
  '--disable-dev-shm-usage',
12
12
  process.env.HTTPS_PROXY ? `--proxy-server=${process.env.HTTPS_PROXY}` : '',
13
13
  ].filter(Boolean),
14
+ executablePath: process.env.PLAYWRIGHT_EXECUTABLE_PATH,
14
15
  headless: process.env.HEADLESS !== 'false',
15
16
  timeout: 60 * 3 * 1000,
16
17
  };
@@ -55,7 +56,11 @@ const waitHydrated = (page) => {
55
56
  };
56
57
 
57
58
  const checkSsrErrors = (text) => {
58
- if (text.indexOf('Server: "%s" Client: "%s"%s') !== -1) {
59
+ if (
60
+ // react@<18
61
+ text.indexOf('Server: "%s" Client: "%s"%s') !== -1 ||
62
+ // react@18
63
+ text.indexOf('An error occurred during hydration. The server HTML was replaced with client content') !== -1) {
59
64
  throw new Error(`SSR breaking error: ${text}`);
60
65
  }
61
66
  };
package/lib/index.js CHANGED
@@ -18,6 +18,7 @@ const PLAYWRIGHT_DEFAULT_LAUNCH_OPTIONS = {
18
18
  '--disable-dev-shm-usage',
19
19
  process.env.HTTPS_PROXY ? `--proxy-server=${process.env.HTTPS_PROXY}` : '',
20
20
  ].filter(Boolean),
21
+ executablePath: process.env.PLAYWRIGHT_EXECUTABLE_PATH,
21
22
  headless: process.env.HEADLESS !== 'false',
22
23
  timeout: 60 * 3 * 1000,
23
24
  };
@@ -62,7 +63,11 @@ const waitHydrated = (page) => {
62
63
  };
63
64
 
64
65
  const checkSsrErrors = (text) => {
65
- if (text.indexOf('Server: "%s" Client: "%s"%s') !== -1) {
66
+ if (
67
+ // react@<18
68
+ text.indexOf('Server: "%s" Client: "%s"%s') !== -1 ||
69
+ // react@18
70
+ text.indexOf('An error occurred during hydration. The server HTML was replaced with client content') !== -1) {
66
71
  throw new Error(`SSR breaking error: ${text}`);
67
72
  }
68
73
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/test-pw",
3
- "version": "2.61.2",
3
+ "version": "2.64.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -19,8 +19,8 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "@tinkoff/utils": "^2.1.2",
22
- "@tramvai/test-integration": "2.61.2",
23
- "@tramvai/tokens-router": "2.61.2",
22
+ "@tramvai/test-integration": "2.64.0",
23
+ "@tramvai/tokens-router": "2.64.0",
24
24
  "console-with-style": "^1.1.0",
25
25
  "supports-color": "8.1.1",
26
26
  "tslib": "^2.4.0",