@spscommerce/e2e-core 2.2.11 → 2.2.14

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/README.md CHANGED
@@ -100,7 +100,7 @@ You can observe the PW trace file in 3 ways:
100
100
  ## Dockerfile
101
101
  PW provides an official Docker image. These image includes all the dependencies needed to run browsers in a Docker container, and also include the browsers themselves. Here is an example of the Dockerfile:
102
102
  ```
103
- FROM mcr.microsoft.com/playwright:v1.22.0-alpha-1652194905000-focal
103
+ FROM mcr.microsoft.com/playwright:v1.22.0-focal
104
104
 
105
105
  ARG BROWSER
106
106
 
@@ -13,7 +13,12 @@ async function globalTeardown() {
13
13
  for (const oldSubFolder of fs_1.default.readdirSync(oldFolder)) {
14
14
  for (const oldFile of fs_1.default.readdirSync(path_1.default.join(oldFolder, oldSubFolder))) {
15
15
  const oldFilePath = `${oldFolder}/${oldSubFolder}/${oldFile}`;
16
- const newFile = "SPS_" + oldSubFolder.substring(oldSubFolder.indexOf("SPS-")).split('-').slice(1, -1).join('_').replace('_', ' ');
16
+ const newFile = "SPS_" + oldSubFolder.substring(oldSubFolder
17
+ .indexOf("SPS-"))
18
+ .split('-')
19
+ .filter(e => !e.includes(process.env.BROWSER) && !e.includes('chromium') && !e.includes('retry'))
20
+ .join('_')
21
+ .replace('_', ' ');
17
22
  const newFilePath = `${newFolder}/${newFile}.${oldFile.split('.').pop()}`;
18
23
  fs_1.default.copyFileSync(oldFilePath, newFilePath);
19
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"globalTeardown.js","sourceRoot":"","sources":["../src/globalTeardown.ts"],"names":[],"mappings":";;;;;AAAA,4CAAoB;AACpB,gDAAwB;AAET,KAAK,UAAU,cAAc;IACxC,MAAM,SAAS,GAAG,cAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,kBAAkB,CAAC,CAAC;IAC/D,MAAM,SAAS,GAAG,cAAI,CAAC,IAAI,CAAC,OAAO,CA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test framework which is based on Playwright.",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -25,7 +25,7 @@
25
25
  "license": "UNLICENSED",
26
26
  "dependencies": {
27
27
  "@alex_neo/jest-expect-message": "^1.0.5",
28
- "@playwright/test": "^1.22.0-alpha-1652194905000",
28
+ "@playwright/test": "^1.22.0",
29
29
  "@typescript-eslint/eslint-plugin": "^5.22.0",
30
30
  "@typescript-eslint/parser": "^5.22.0",
31
31
  "dotenv": "^16.0.0",
@@ -77,7 +77,7 @@ const config = {
77
77
  /* Collect screenshot after each test failure. See https://playwright.dev/docs/test-configuration#automatic-screenshots */
78
78
  screenshot: 'only-on-failure',
79
79
  /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
80
- trace: process.env.TRACER ? 'retain-on-failure' : 'off',
80
+ trace: process.env.TRACER && (process.env.TRACER.toString().toLowerCase() === 'true') ? 'retain-on-failure' : 'off',
81
81
  /* Run in headless mode by default (if process.env.HEADLESS is not specified). */
82
82
  headless: !process.env.HEADLESS || process.env.HEADLESS === 'true' ? true : false,
83
83
  /* Emulates consistent viewport for each page. */
@@ -9,7 +9,12 @@ export default async function globalTeardown(): Promise<void> {
9
9
  for (const oldSubFolder of fs.readdirSync(oldFolder)) {
10
10
  for (const oldFile of fs.readdirSync(path.join(oldFolder, oldSubFolder))) {
11
11
  const oldFilePath = `${oldFolder}/${oldSubFolder}/${oldFile}`;
12
- const newFile = "SPS_" + oldSubFolder.substring(oldSubFolder.indexOf("SPS-")).split('-').slice(1, -1).join('_').replace('_', ' ');
12
+ const newFile = "SPS_" + oldSubFolder.substring(oldSubFolder
13
+ .indexOf("SPS-"))
14
+ .split('-')
15
+ .filter(e => !e.includes(process.env.BROWSER) && !e.includes('chromium') && !e.includes('retry'))
16
+ .join('_')
17
+ .replace('_', ' ');
13
18
  const newFilePath = `${newFolder}/${newFile}.${oldFile.split('.').pop()}`;
14
19
  fs.copyFileSync(oldFilePath, newFilePath);
15
20
  }