@enact/ui-test-utils 1.0.0-alpha.1 → 1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enact/ui-test-utils",
3
- "version": "1.0.0-alpha.1",
3
+ "version": "1.0.0",
4
4
  "description": "UI Testing for the Enact framework",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -38,12 +38,13 @@
38
38
  "webdriverio": "^7.9.0"
39
39
  },
40
40
  "devDependencies": {
41
+ "@babel/eslint-plugin": "^7.17.7",
41
42
  "eslint": "^8.12.0",
42
- "eslint-config-enact": "^4.0.0",
43
+ "eslint-config-enact": "^4.1.1",
43
44
  "eslint-config-prettier": "^8.5.0",
44
- "eslint-plugin-babel": "^5.3.1",
45
- "eslint-plugin-enact": "^1.0.0",
45
+ "eslint-plugin-enact": "^1.0.1",
46
46
  "eslint-plugin-import": "^2.25.4",
47
+ "eslint-plugin-jest": "^26.1.5",
47
48
  "eslint-plugin-jsx-a11y": "^6.5.1",
48
49
  "eslint-plugin-prettier": "^4.0.0",
49
50
  "eslint-plugin-react": "^7.29.4",
@@ -1,4 +1,4 @@
1
- import {render} from 'react-dom';
1
+ import {createRoot} from 'react-dom/client';
2
2
  import App, {testMetadata} from 'UI_TEST_APP_ENTRY';
3
3
  import TestChooser from './TestChooser';
4
4
 
@@ -18,13 +18,9 @@ if ('testId' in props) props.testId = Number.parseInt(props.testId);
18
18
  if ('request' in props) {
19
19
  window.__TEST_DATA = testMetadata;
20
20
  } else if (Object.keys(props).length) {
21
- render(
22
- <App {...props} />,
23
- document.getElementById('root')
24
- );
21
+ createRoot(document.getElementById('root'))
22
+ .render(<App {...props} />);
25
23
  } else {
26
- render(
27
- <TestChooser metadata={testMetadata} />,
28
- document.getElementById('root')
29
- );
24
+ createRoot(document.getElementById('root'))
25
+ .render(<TestChooser metadata={testMetadata} />);
30
26
  }
package/ui/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import {render} from 'react-dom';
1
+ import {createRoot} from 'react-dom/client';
2
2
  import App from 'UI_TEST_APP_ENTRY';
3
3
 
4
4
  const url = new URL(window.location.href);
@@ -7,10 +7,8 @@ const locale = url.searchParams.get('locale');
7
7
  const appElement = (<App locale={locale} />);
8
8
 
9
9
  if (typeof window !== 'undefined') {
10
- render(
11
- appElement,
12
- document.getElementById('root')
13
- );
10
+ createRoot(document.getElementById('root'))
11
+ .render(appElement);
14
12
  }
15
13
 
16
14
  export default appElement;