@enact/ui-test-utils 1.0.4 → 1.0.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enact/ui-test-utils",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "UI Testing for the Enact framework",
5
5
  "repository": "https://github.com/enactjs/ui-test-utils",
6
6
  "main": "index.js",
@@ -20,38 +20,38 @@
20
20
  "access": "public"
21
21
  },
22
22
  "dependencies": {
23
- "@wdio/cli": "^7.30.0",
24
- "@wdio/dot-reporter": "^7.29.1",
25
- "@wdio/local-runner": "^7.30.0",
26
- "@wdio/mocha-framework": "^7.26.0",
27
- "@wdio/selenium-standalone-service": "^7.30.0",
28
- "@wdio/spec-reporter": "^7.29.1",
29
- "@wdio/static-server-service": "^7.29.1",
23
+ "@wdio/cli": "^7.33.0",
24
+ "@wdio/dot-reporter": "^7.33.0",
25
+ "@wdio/local-runner": "^7.33.0",
26
+ "@wdio/mocha-framework": "^7.33.0",
27
+ "@wdio/selenium-standalone-service": "^7.33.0",
28
+ "@wdio/spec-reporter": "^7.33.0",
29
+ "@wdio/static-server-service": "^7.33.0",
30
30
  "chai": "4.3.7",
31
- "chalk": "^4.1.2",
31
+ "chalk": "^5.3.0",
32
32
  "cross-spawn": "^7.0.3",
33
33
  "dirty-chai": "2.0.1",
34
- "expect-webdriverio": "^3.5.3",
34
+ "expect-webdriverio": "^3.6.0",
35
35
  "fs-extra": "^11.1.1",
36
36
  "minimist": "^1.2.8",
37
- "query-string": "^7.1.1",
38
- "ramda": "^0.29.0",
37
+ "query-string": "^7.1.3",
38
+ "ramda": "^0.29.1",
39
39
  "readdirp": "^3.6.0",
40
40
  "wdio-docker-service": "^3.2.1",
41
- "wdio-image-comparison-service": "^5.0.2",
42
- "webdriverio": "^7.30.0"
41
+ "wdio-image-comparison-service": "^5.0.3",
42
+ "webdriverio": "^7.33.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@babel/eslint-plugin": "^7.19.1",
46
- "eslint": "^8.37.0",
47
- "eslint-config-enact": "^4.1.4",
48
- "eslint-config-prettier": "^8.8.0",
49
- "eslint-plugin-enact": "^1.0.2",
50
- "eslint-plugin-import": "^2.27.5",
51
- "eslint-plugin-jest": "^27.2.1",
52
- "eslint-plugin-jsx-a11y": "^6.7.1",
53
- "eslint-plugin-prettier": "^4.2.1",
54
- "eslint-plugin-react": "^7.32.2",
45
+ "@babel/eslint-plugin": "^7.22.10",
46
+ "eslint": "^8.54.0",
47
+ "eslint-config-enact": "^4.1.8",
48
+ "eslint-config-prettier": "^9.0.0",
49
+ "eslint-plugin-enact": "^1.0.6",
50
+ "eslint-plugin-import": "^2.29.0",
51
+ "eslint-plugin-jest": "^27.6.0",
52
+ "eslint-plugin-jsx-a11y": "^6.8.0",
53
+ "eslint-plugin-prettier": "^5.0.1",
54
+ "eslint-plugin-react": "^7.33.2",
55
55
  "eslint-plugin-react-hooks": "^4.6.0"
56
56
  }
57
- }
57
+ }
@@ -1,4 +1,4 @@
1
- const crypto = require('crypto'),
1
+ const cryptoModule = require('crypto'),
2
2
  path = require('path'),
3
3
  fs = require('fs');
4
4
 
@@ -21,7 +21,7 @@ function getScreenshotName (basePath) {
21
21
  testName = testName.replace(/[/\\:?*"|<>]/g, '_');
22
22
 
23
23
  // shorten the name with a little bit of leading context to help find the file manually if necessary
24
- testName = testName.substring(0, 128) + '-' + crypto.createHash('md5').update(testName).digest('hex');
24
+ testName = testName.substring(0, 128) + '-' + cryptoModule.createHash('md5').update(testName).digest('hex');
25
25
  let screenshotFileName = path.join(basePath, ...testNameParts, `${testName}.png`);
26
26
  return screenshotFileName.replace(/ /g, '_');
27
27
  };
package/src/build-apps.js CHANGED
@@ -1,6 +1,6 @@
1
1
  const path = require('path');
2
2
 
3
- const chalk = require('chalk');
3
+ let chalk;
4
4
  const spawn = require('cross-spawn');
5
5
  const fs = require('fs-extra');
6
6
  const readdirp = require('readdirp');
@@ -20,8 +20,9 @@ function buildApps (base) {
20
20
  if (process.argv.includes('--skip-build')) return;
21
21
  console.log('Building content:\n');
22
22
 
23
- return Promise.resolve()
24
- .then(() => {
23
+ return import('chalk')
24
+ .then(({default: _chalk}) => {
25
+ chalk = _chalk;
25
26
  if (!process.argv.includes('--skip-enact')) {
26
27
  epack({
27
28
  file: {basename: 'Enact framework bundle', fullPath: 'framework'},
package/ui/wdio.conf.js CHANGED
@@ -1,6 +1,9 @@
1
1
  const buildApps = require('../src/build-apps'),
2
- fs = require('fs'),
3
- chalk = require('chalk');
2
+ fs = require('fs');
3
+ let chalk;
4
+ import('chalk').then(({default: _chalk}) => {
5
+ chalk = _chalk;
6
+ });
4
7
 
5
8
  const {configure} = require('../config/wdio.conf.js');
6
9
 
package/utils/Page.js CHANGED
@@ -32,7 +32,7 @@ class Page {
32
32
  }
33
33
 
34
34
  serializeParams (params) {
35
- const queryObject = queryString.stringify(params);
35
+ const queryObject = queryString.stringify(params);
36
36
 
37
37
  return queryObject;
38
38
  }
package/utils/runTest.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
- const crypto = require('crypto');
2
+ const cryptoModule = require('crypto');
3
3
  const parseArgs = require('minimist');
4
4
 
5
5
  const args = parseArgs(process.argv);
@@ -55,7 +55,7 @@ const runTest = ({concurrency, filter, Page, testName, ...rest}) => {
55
55
  // Replace problematic filenames. Windows is much more restrictive.
56
56
  testCaseName = testCaseName.replace(/[/\\:?*"|<>]/g, '_');
57
57
  // shorten the name with a little bit of leading context to help find the file manually if necessary
58
- testCaseName = testCaseName.substring(0, 128) + '-' + crypto.createHash('md5').update(testCaseName).digest('hex');
58
+ testCaseName = testCaseName.substring(0, 128) + '-' + cryptoModule.createHash('md5').update(testCaseName).digest('hex');
59
59
  const screenshotFileName = (component + '/' + testName + '/' + testCaseName);
60
60
 
61
61
  const context = {params, component, testName, url: Page.url, fileName: screenshotFileName};