@enact/ui-test-utils 1.0.5 → 1.0.7
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/CHANGELOG.md +8 -0
- package/npm-shrinkwrap.json +13870 -16067
- package/package.json +19 -26
- package/screenshot/utils/confHelpers.js +2 -2
- package/src/build-apps.js +4 -3
- package/ui/wdio.conf.js +5 -2
- package/utils/Page.js +1 -1
- package/utils/runTest.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enact/ui-test-utils",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
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,31 @@
|
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@wdio/cli": "^7.
|
|
24
|
-
"@wdio/dot-reporter": "^7.
|
|
25
|
-
"@wdio/local-runner": "^7.
|
|
26
|
-
"@wdio/mocha-framework": "^7.
|
|
27
|
-
"@wdio/selenium-standalone-service": "^7.
|
|
28
|
-
"@wdio/spec-reporter": "^7.
|
|
29
|
-
"@wdio/static-server-service": "^7.
|
|
30
|
-
"chai": "4.
|
|
31
|
-
"chalk": "^
|
|
23
|
+
"@wdio/cli": "^7.34.0",
|
|
24
|
+
"@wdio/dot-reporter": "^7.33.0",
|
|
25
|
+
"@wdio/local-runner": "^7.34.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
|
+
"chai": "^4.4.1",
|
|
31
|
+
"chalk": "^5.3.0",
|
|
32
32
|
"cross-spawn": "^7.0.3",
|
|
33
33
|
"dirty-chai": "2.0.1",
|
|
34
|
-
"expect-webdriverio": "^3.
|
|
35
|
-
"fs-extra": "^11.
|
|
34
|
+
"expect-webdriverio": "^3.6.0",
|
|
35
|
+
"fs-extra": "^11.2.0",
|
|
36
36
|
"minimist": "^1.2.8",
|
|
37
|
-
"query-string": "^7.1.
|
|
38
|
-
"ramda": "^0.29.
|
|
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
41
|
"wdio-image-comparison-service": "^5.0.3",
|
|
42
|
-
"webdriverio": "^7.
|
|
42
|
+
"webdriverio": "^7.34.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"
|
|
46
|
-
"eslint": "^
|
|
47
|
-
"eslint-config-
|
|
48
|
-
"eslint-
|
|
49
|
-
"eslint-plugin-enact": "^1.0.4",
|
|
50
|
-
"eslint-plugin-import": "^2.27.5",
|
|
51
|
-
"eslint-plugin-jest": "^27.2.3",
|
|
52
|
-
"eslint-plugin-jsx-a11y": "^6.7.1",
|
|
53
|
-
"eslint-plugin-prettier": "^5.0.0",
|
|
54
|
-
"eslint-plugin-react": "^7.33.0",
|
|
55
|
-
"eslint-plugin-react-hooks": "^4.6.0"
|
|
45
|
+
"eslint": "^8.54.0",
|
|
46
|
+
"eslint-config-enact": "^4.2.0",
|
|
47
|
+
"eslint-config-prettier": "^9.1.0",
|
|
48
|
+
"eslint-plugin-import": "^2.29.1"
|
|
56
49
|
}
|
|
57
50
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
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) + '-' +
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
package/utils/runTest.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
const
|
|
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) + '-' +
|
|
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};
|