@enact/ui-test-utils 2.0.0 → 3.0.0

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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # Change Log
2
2
 
3
+ ## [3.0.0] (July 30, 2025)
4
+
5
+ * Migrated to ESM
6
+
7
+ ## [2.0.1] (July 18, 2025)
8
+
9
+ * Updated dependencies.
10
+
3
11
  ## [2.0.0] (June 10, 2025)
4
12
 
5
13
  * Updated dependencies.
package/README.md CHANGED
@@ -9,29 +9,29 @@ and must be configured as a `devDependency` of the UI library.
9
9
  1. Add `@enact/ui-test-utils` as a devDependency: `npm i --save-dev @enact/ui-test-utils`
10
10
  2. Create the `tests/ui` folder structure within the UI library
11
11
  3. Add `apps` and `specs` folders to `tests/ui`
12
- 4. Add local WebDriver configuration files within `tests/ui`
12
+ 4. Add local WebDriver configuration files within `tests/ui/config`
13
13
 
14
- * `wdio.conf.js` containing `module.exports = require('@enact/ui-test-utils/ui/wdio.conf.js');`
15
- * `wdio.docker.conf.js` containing `module.exports = require('@enact/ui-test-utils/ui/wdio.docker.conf.js');`
16
- * `wdio.tv.conf.js` containing `module.exports = require('@enact/ui-test-utils/ui/wdio.tv.conf.js');`
14
+ * `wdio.conf.js` containing `import config from '@enact/ui-test-utils/ui/wdio.conf.js'; export default uiConfig;`
15
+ * `wdio.docker.conf.js` containing `import {uiDockerConfig} from '@enact/ui-test-utils/ui/wdio.docker.conf.js'; export default config;`
16
+ * `wdio.tv.conf.js` containing `import {uiTVConfig} from '@enact/ui-test-utils/ui/wdio.tv.conf.js'; export default config;`
17
17
 
18
- * and `tests/screenshot`
18
+ * and `tests/screenshot/config`
19
19
 
20
- * `wdio.conf.js` containing `module.exports = require('@enact/ui-test-utils/screenshot/wdio.conf.js');`
21
- * `wdio.docker.conf.js` containing `module.exports = require('@enact/ui-test-utils/screenshot/wdio.docker.conf.js');`
22
- * `wdio.tv.conf.js` containing `module.exports = require('@enact/ui-test-utils/screenshot/wdio.tv.conf.js');`
20
+ * `wdio.conf.js` containing `import config from '@enact/ui-test-utils/screenshot/wdio.conf.js'; export default ssConfig;`
21
+ * `wdio.docker.conf.js` containing `import {ssDockerConfig} from '@enact/ui-test-utils/screenshot/wdio.docker.conf.js'; export default config;`
22
+ * `wdio.tv.conf.js` containing `import {ssTVConfig} from '@enact/ui-test-utils/screenshot/wdio.tv.conf.js'; export default config;`
23
23
 
24
24
  5. Add npm scripts for each of the above configuration files. There are likely other scripts already
25
25
  defined so these will be added to the existing scripts.
26
26
 
27
27
  ```json
28
28
  "scripts": {
29
- "test-ui": "start-tests tests/ui/wdio.conf.js",
30
- "test-ui-docker": "start-tests tests/ui/wdio.docker.conf.js",
31
- "test-ui-tv": "start-tests tests/ui/wdio.tv.conf.js",
32
- "test-ss": "start-tests tests/screenshot/wdio.conf.js",
33
- "test-ss-docker": "start-tests tests/screenshot/wdio.docker.conf.js",
34
- "test-ss-tv": "start-tests tests/screenshot/wdio.tv.conf.js",
29
+ "test-ui": "start-tests tests/ui/config/wdio.conf.js",
30
+ "test-ui-docker": "start-tests tests/ui/config/wdio.docker.conf.js",
31
+ "test-ui-tv": "start-tests tests/ui/config/wdio.tv.conf.js",
32
+ "test-ss": "start-tests tests/screenshot/config/wdio.conf.js",
33
+ "test-ss-docker": "start-tests tests/screenshot/config/wdio.docker.conf.js",
34
+ "test-ss-tv": "start-tests tests/screenshot/config/wdio.tv.conf.js",
35
35
  }
36
36
  ```
37
37
 
@@ -1,5 +1,5 @@
1
- const parseArgs = require('minimist');
2
- const {execSync} = require('child_process');
1
+ import parseArgs from 'minimist';
2
+ import {execSync} from 'child_process';
3
3
 
4
4
  const args = parseArgs(process.argv);
5
5
 
@@ -7,7 +7,7 @@ const visibleBrowser = !!args.visible,
7
7
  maxInstances = args.instances || 5,
8
8
  offline = args.offline;
9
9
 
10
- module.exports.configure = (options) => {
10
+ export const configure = (options) => {
11
11
  const {base, services} = options;
12
12
  const opts = Object.assign({}, options);
13
13
 
@@ -83,7 +83,7 @@ module.exports.configure = (options) => {
83
83
  // the config file unless it's absolute.
84
84
  //
85
85
  specs: [
86
- '../../tests/' + base + '/specs/**/*-specs.js'
86
+ '../../../tests/' + base + '/specs/**/*-specs.js'
87
87
  ],
88
88
  // Patterns to exclude.
89
89
  exclude: [
@@ -220,8 +220,6 @@ module.exports.configure = (options) => {
220
220
  * variables like `browser`. It is the perfect place to define custom commands.
221
221
  */
222
222
  before: function () {
223
- require('expect-webdriverio');
224
-
225
223
  global.wdioExpect = global.expect;
226
224
 
227
225
  if (options.before) {
package/eslint.config.js CHANGED
@@ -1,5 +1,5 @@
1
- const enactStrict = require('eslint-config-enact/strict');
2
- const globals = require('globals');
1
+ import enactStrict from 'eslint-config-enact/strict.js';
2
+ import globals from 'globals';
3
3
 
4
4
  const customGlobals = {
5
5
  'browser': true,
@@ -8,7 +8,7 @@ const customGlobals = {
8
8
  '$$': true
9
9
  };
10
10
 
11
- module.exports = [
11
+ export default [
12
12
  ...enactStrict,
13
13
  {
14
14
  languageOptions: {