@enact/ui-test-utils 1.0.10 → 2.0.0-alpha.2
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/.travis.yml +1 -1
- package/CHANGELOG.md +13 -0
- package/README.md +10 -1
- package/config/wdio.conf.js +18 -26
- package/eslint.config.js +34 -0
- package/npm-shrinkwrap.json +11113 -13973
- package/package.json +20 -19
- package/screenshot/utils/confHelpers.js +9 -1
- package/screenshot/wdio.conf.js +3 -2
- package/screenshot/wdio.tv.conf.js +7 -4
- package/src/build-apps.js +2 -1
- package/ui/wdio.conf.js +5 -3
- package/ui/wdio.tv.conf.js +7 -2
- package/utils/runTest.js +3 -2
- package/.eslintrc.js +0 -25
package/.travis.yml
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## [2.0.0-alpha.2] (March 7, 2025)
|
|
4
|
+
|
|
5
|
+
* Updated `webdriverio` and related dependencies to version 9.
|
|
6
|
+
* Dropped support for Node.js 16. Required Node.js version >= 18.
|
|
7
|
+
* Removed deprecated `@wdio/selenium-standalone-service` module and added `wdio-selenium-standalone-service` community package.
|
|
8
|
+
* Removed `w3c: false` and replaced with `'wdio:enforceWebDriverClassic': true` when running tests on a remote debugger. w3c enforces the usage of JSON Wire Protocol which has been removed from `webdriverio` v9.
|
|
9
|
+
* Replaced deprecated dependency `wdio-image-comparison-service` with `@wdio/visual-service`.
|
|
10
|
+
|
|
11
|
+
## [2.0.0-alpha.1] (February 26, 2025)
|
|
12
|
+
|
|
13
|
+
* Updated `eslint` to v9 and adopted flat config.
|
|
14
|
+
* Added `--no-animation` option for screenshot test.
|
|
15
|
+
|
|
3
16
|
## [1.0.10] (October 31, 2024)
|
|
4
17
|
|
|
5
18
|
* Updated dependencies.
|
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ and must be configured as a `devDependency` of the UI library.
|
|
|
35
35
|
}
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
6. Optionally configure different ESLint and git configuration rules using
|
|
38
|
+
6. Optionally configure different ESLint and git configuration rules using `eslint.config.js` and
|
|
39
39
|
`.gitignore` files, respectively
|
|
40
40
|
|
|
41
41
|
## Creating tests
|
|
@@ -218,6 +218,15 @@ For example, filtering for the component 'Input'.
|
|
|
218
218
|
npm run test-ui -- --visible --spec /Input
|
|
219
219
|
```
|
|
220
220
|
|
|
221
|
+
### Running without animation effects
|
|
222
|
+
|
|
223
|
+
The `--no-animation` option is used to pack Enact without animation.
|
|
224
|
+
You can use this option to test the apps without animation effects.
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
npm run test-ss -- --no-animation
|
|
228
|
+
```
|
|
229
|
+
|
|
221
230
|
### Loading sample apps in a browser
|
|
222
231
|
|
|
223
232
|
This requires that a server be running on port 3000. If you have globally installed the `serve`
|
package/config/wdio.conf.js
CHANGED
|
@@ -47,7 +47,7 @@ module.exports.configure = (options) => {
|
|
|
47
47
|
process.env.CHROME_DRIVER = chromeDriverVersion;
|
|
48
48
|
}
|
|
49
49
|
} catch (error) {
|
|
50
|
-
console.log('ERROR:
|
|
50
|
+
console.log('ERROR: Cannot find Chrome driver from Chrome ' + chromeVersionMajorNumber);
|
|
51
51
|
process.env.CHROME_DRIVER = 2.44;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
@@ -72,12 +72,18 @@ module.exports.configure = (options) => {
|
|
|
72
72
|
// Specify Test Files
|
|
73
73
|
// ==================
|
|
74
74
|
// Define which test specs should run. The pattern is relative to the directory
|
|
75
|
-
//
|
|
76
|
-
//
|
|
77
|
-
//
|
|
75
|
+
// of the configuration file being run.
|
|
76
|
+
//
|
|
77
|
+
// The specs are defined as an array of spec files (optionally using wildcards
|
|
78
|
+
// that will be expanded). The test for each spec file will be run in a separate
|
|
79
|
+
// worker process. In order to have a group of spec files run in the same worker
|
|
80
|
+
// process enclose them in an array within the specs array.
|
|
81
|
+
//
|
|
82
|
+
// The path of the spec files will be resolved relative from the directory of
|
|
83
|
+
// the config file unless it's absolute.
|
|
78
84
|
//
|
|
79
85
|
specs: [
|
|
80
|
-
'
|
|
86
|
+
'../../tests/' + base + '/specs/**/*-specs.js'
|
|
81
87
|
],
|
|
82
88
|
// Patterns to exclude.
|
|
83
89
|
exclude: [
|
|
@@ -95,7 +101,7 @@ module.exports.configure = (options) => {
|
|
|
95
101
|
// First, you can define how many instances should be started at the same time. Let's
|
|
96
102
|
// say you have 3 different capabilities (Chrome, Firefox, and Safari) and you have
|
|
97
103
|
// set maxInstances to 1; wdio will spawn 3 processes. Therefore, if you have 10 spec
|
|
98
|
-
// files and you set maxInstances to 10, all spec files will get tested at the same time
|
|
104
|
+
// files, and you set maxInstances to 10, all spec files will get tested at the same time
|
|
99
105
|
// and 30 processes will get spawned. The property handles how many capabilities
|
|
100
106
|
// from the same test should run tests.
|
|
101
107
|
//
|
|
@@ -112,6 +118,11 @@ module.exports.configure = (options) => {
|
|
|
112
118
|
maxInstances,
|
|
113
119
|
//
|
|
114
120
|
browserName: 'chrome',
|
|
121
|
+
/* WebdriverIO v8.14 and above downloads and uses the latest Chrome version when running tests.
|
|
122
|
+
We need to specify a browser version that matches chromedriver version running in CI/CD environment to
|
|
123
|
+
ensure testing accuracy.
|
|
124
|
+
TODO: Update this version when chromedriver version in CI/CD is updated */
|
|
125
|
+
browserVersion: '120.0.6099.109',
|
|
115
126
|
'goog:chromeOptions': visibleBrowser ? {} : {
|
|
116
127
|
args: ['--headless', '--window-size=1920,1080']
|
|
117
128
|
}
|
|
@@ -175,24 +186,7 @@ module.exports.configure = (options) => {
|
|
|
175
186
|
// commands. Instead, they hook themselves up into the test process.
|
|
176
187
|
services: [
|
|
177
188
|
['selenium-standalone', {
|
|
178
|
-
skipSeleniumInstall: offline
|
|
179
|
-
args: {
|
|
180
|
-
drivers : {
|
|
181
|
-
chrome : {
|
|
182
|
-
version : process.env.CHROME_DRIVER,
|
|
183
|
-
arch : process.arch
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
},
|
|
187
|
-
installArgs: {
|
|
188
|
-
drivers : {
|
|
189
|
-
chrome : {
|
|
190
|
-
version : process.env.CHROME_DRIVER,
|
|
191
|
-
arch : process.arch,
|
|
192
|
-
baseURL : process.env.CHROME_DRIVER > 114 ? 'https://storage.googleapis.com' : 'https://chromedriver.storage.googleapis.com'
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
}
|
|
189
|
+
skipSeleniumInstall: offline
|
|
196
190
|
}],
|
|
197
191
|
['static-server', {
|
|
198
192
|
folders: [
|
|
@@ -224,8 +218,6 @@ module.exports.configure = (options) => {
|
|
|
224
218
|
/**
|
|
225
219
|
* Gets executed before test execution begins. At this point you can access to all global
|
|
226
220
|
* variables like `browser`. It is the perfect place to define custom commands.
|
|
227
|
-
* @param {Array.<Object>} capabilities list of capabilities details
|
|
228
|
-
* @param {Array.<String>} specs List of spec file paths that are to be run
|
|
229
221
|
*/
|
|
230
222
|
before: function () {
|
|
231
223
|
require('expect-webdriverio');
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
const enactStrict = require('eslint-config-enact/strict');
|
|
2
|
+
const globals = require('globals');
|
|
3
|
+
|
|
4
|
+
const customGlobals = {
|
|
5
|
+
'browser': true,
|
|
6
|
+
'expect': true,
|
|
7
|
+
'$': true,
|
|
8
|
+
'$$': true
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
module.exports = [
|
|
12
|
+
...enactStrict,
|
|
13
|
+
{
|
|
14
|
+
languageOptions: {
|
|
15
|
+
ecmaVersion: 'latest',
|
|
16
|
+
sourceType: 'module',
|
|
17
|
+
globals: {
|
|
18
|
+
...globals.node,
|
|
19
|
+
...globals.mocha,
|
|
20
|
+
...customGlobals
|
|
21
|
+
},
|
|
22
|
+
parserOptions: {
|
|
23
|
+
ecmaFeatures: {
|
|
24
|
+
jsx: true
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
rules: {
|
|
29
|
+
'max-nested-callbacks': 'off',
|
|
30
|
+
'no-console': 'off',
|
|
31
|
+
'react/forbid-foreign-prop-types': 'off' // proptypes not removed in storybook config
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
];
|