@spscommerce/e2e-core 2.2.8 → 2.2.9

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/.eslintrc.js CHANGED
@@ -19,5 +19,7 @@ module.exports = {
19
19
  "rules": {
20
20
  "@typescript-eslint/no-explicit-any": "off",
21
21
  "@typescript-eslint/no-var-requires": "off",
22
+ // https://github.com/microsoft/playwright/issues/8798
23
+ "no-empty-pattern": "off"
22
24
  }
23
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spscommerce/e2e-core",
3
- "version": "2.2.8",
3
+ "version": "2.2.9",
4
4
  "description": "An automation test framework which is based on Playwright.",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -26,8 +26,8 @@
26
26
  "dependencies": {
27
27
  "@alex_neo/jest-expect-message": "^1.0.5",
28
28
  "@playwright/test": "^1.21.1",
29
- "@typescript-eslint/eslint-plugin": "^4.33.0",
30
- "@typescript-eslint/parser": "^4.33.0",
29
+ "@typescript-eslint/eslint-plugin": "^5.22.0",
30
+ "@typescript-eslint/parser": "^5.22.0",
31
31
  "dotenv": "^16.0.0",
32
32
  "eslint": "^7.32.0",
33
33
  "jest-extended": "^1.2.0",
@@ -5,7 +5,7 @@ import { chromium } from '@playwright/test';
5
5
  const domain = 'commerce.spscommerce.com';
6
6
  const baseUrl = process.env.ENV && process.env.ENV.includes('prod') ? 'https://' + domain : 'https://test.' + domain;
7
7
 
8
- async function globalSetup() {
8
+ export default async function globalSetup(): Promise<void> {
9
9
  // Remove custom sub-folders for test artifacts
10
10
  const resultsFolder = path.join(process.cwd(), 'results-e2e/');
11
11
  if (fs.existsSync(resultsFolder)) {
@@ -50,5 +50,3 @@ async function globalSetup() {
50
50
  }
51
51
  return;
52
52
  }
53
-
54
- export default globalSetup;
@@ -1,7 +1,7 @@
1
1
  import fs from 'fs';
2
2
  import path from 'path';
3
3
 
4
- async function globalTeardown() {
4
+ export default async function globalTeardown(): Promise<void> {
5
5
  const oldFolder = path.join(process.cwd(), 'results-e2e-raw/');
6
6
  const newFolder = path.join(process.cwd(), 'results-e2e/screenshots/');
7
7
  fs.mkdirSync(newFolder, { recursive: true });
@@ -17,5 +17,3 @@ async function globalTeardown() {
17
17
  }
18
18
  return;
19
19
  }
20
-
21
- export default globalTeardown;
@@ -2,7 +2,7 @@ import fs from 'fs';
2
2
  import path from 'path';
3
3
  import { Page } from '@playwright/test';
4
4
 
5
- let access: any;
5
+ let access: fs.WriteStream;
6
6
 
7
7
  export async function enableLogger(file: string[], page: Page): Promise<void> {
8
8
  // file:
@@ -57,3 +57,5 @@ export async function disableLogger(): Promise<void> {
57
57
  access && access.end();
58
58
  return;
59
59
  }
60
+
61
+ export const log = console.log.bind(console);