@truedat/ai 7.0.8 → 7.1.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 +5 -5
- package/src/components/actions/Action.js +2 -2
- package/src/components/actions/__tests__/ActionEdit.spec.js +1 -1
- package/src/components/actions/__tests__/ActionNew.spec.js +20 -5
- package/src/components/actions/__tests__/__snapshots__/Action.spec.js.snap +4 -2
- package/src/components/actions/__tests__/__snapshots__/ActionActions.spec.js.snap +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/ai",
|
|
3
|
-
"version": "7.0
|
|
3
|
+
"version": "7.1.0",
|
|
4
4
|
"description": "Truedat Web Artificial Intelligence package",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@testing-library/react": "^12.0.0",
|
|
36
36
|
"@testing-library/react-hooks": "^8.0.1",
|
|
37
37
|
"@testing-library/user-event": "^13.2.1",
|
|
38
|
-
"@truedat/test": "
|
|
38
|
+
"@truedat/test": "7.1.0",
|
|
39
39
|
"babel-jest": "^28.1.0",
|
|
40
40
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
41
41
|
"babel-plugin-lodash": "^3.3.4",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"identity-obj-proxy": "^3.0.0",
|
|
45
45
|
"jest": "^29.0.0",
|
|
46
46
|
"jest-environment-jsdom": "^29.0.0",
|
|
47
|
+
"jsdom": "^26.0.0",
|
|
47
48
|
"react": "^16.14.0",
|
|
48
49
|
"react-dom": "^16.14.0",
|
|
49
50
|
"rimraf": "^3.0.2",
|
|
@@ -84,11 +85,10 @@
|
|
|
84
85
|
]
|
|
85
86
|
},
|
|
86
87
|
"dependencies": {
|
|
87
|
-
"@truedat/core": "7.0
|
|
88
|
+
"@truedat/core": "7.1.0",
|
|
88
89
|
"prop-types": "^15.8.1",
|
|
89
90
|
"react-hook-form": "^7.45.4",
|
|
90
91
|
"react-intl": "^5.20.10",
|
|
91
|
-
"react-router-dom": "^5.2.0",
|
|
92
92
|
"semantic-ui-react": "^2.1.4",
|
|
93
93
|
"swr": "^2.0.0"
|
|
94
94
|
},
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"react-dom": ">= 16.8.6 < 17",
|
|
98
98
|
"semantic-ui-react": ">= 2.0.3 < 2.2"
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "cb08380da04c7286e694540bc24d32f01a728dfc"
|
|
101
101
|
}
|
|
@@ -13,8 +13,8 @@ import ActionDetail from "./ActionDetail";
|
|
|
13
13
|
export const ActionHeader = ({ action, actionMutate }) => {
|
|
14
14
|
const { formatMessage } = useIntl();
|
|
15
15
|
const buildStatusMessage = (status, icon, color) => (
|
|
16
|
-
<p>
|
|
17
|
-
<Icon name={icon} color={color} fitted />
|
|
16
|
+
<p className="flex-gapped">
|
|
17
|
+
<Icon name={icon} color={color} fitted />
|
|
18
18
|
{formatMessage({ id: `ai.actions.is_enabled.${status}` })}
|
|
19
19
|
</p>
|
|
20
20
|
);
|
|
@@ -82,22 +82,29 @@ describe("<ActionNew />", () => {
|
|
|
82
82
|
setActionResource,
|
|
83
83
|
};
|
|
84
84
|
it("matches the latest snapshot", async () => {
|
|
85
|
-
const {
|
|
85
|
+
const { container, queryByText } = render(
|
|
86
86
|
<ActionNew {...props} />,
|
|
87
87
|
renderOpts
|
|
88
88
|
);
|
|
89
89
|
|
|
90
|
-
await waitFor(() =>
|
|
90
|
+
await waitFor(() => {
|
|
91
|
+
expect(queryByText(/lazy/i)).not.toBeInTheDocument();
|
|
92
|
+
expect(container.querySelector(".loader")).not.toBeInTheDocument();
|
|
93
|
+
});
|
|
91
94
|
expect(container).toMatchSnapshot();
|
|
92
95
|
});
|
|
93
96
|
|
|
94
97
|
it("matches the latest snapshot", async () => {
|
|
95
|
-
const {
|
|
98
|
+
const { container, queryByText } = render(
|
|
96
99
|
<ActionNew {...props} />,
|
|
97
100
|
renderOpts
|
|
98
101
|
);
|
|
99
102
|
|
|
100
|
-
await waitFor(() =>
|
|
103
|
+
await waitFor(() => {
|
|
104
|
+
expect(queryByText(/lazy/i)).not.toBeInTheDocument();
|
|
105
|
+
expect(container.querySelector(".loader")).not.toBeInTheDocument();
|
|
106
|
+
});
|
|
107
|
+
|
|
101
108
|
expect(container).toMatchSnapshot();
|
|
102
109
|
});
|
|
103
110
|
|
|
@@ -106,7 +113,15 @@ describe("<ActionNew />", () => {
|
|
|
106
113
|
isEnabled: true,
|
|
107
114
|
onSubmit: jest.fn(),
|
|
108
115
|
};
|
|
109
|
-
const { getByRole } = render(
|
|
116
|
+
const { container, queryByText, getByRole } = render(
|
|
117
|
+
<ActionNew {...props} />,
|
|
118
|
+
renderOpts
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
await waitFor(() => {
|
|
122
|
+
expect(queryByText(/lazy/i)).not.toBeInTheDocument();
|
|
123
|
+
expect(container.querySelector(".loader")).not.toBeInTheDocument();
|
|
124
|
+
});
|
|
110
125
|
|
|
111
126
|
expect(getByRole("button", { name: /create/i })).not.toBeEnabled();
|
|
112
127
|
});
|
|
@@ -46,12 +46,13 @@ exports[`<Action /> matches the latest snapshot 1`] = `
|
|
|
46
46
|
<div
|
|
47
47
|
class="sub header"
|
|
48
48
|
>
|
|
49
|
-
<p
|
|
49
|
+
<p
|
|
50
|
+
class="flex-gapped"
|
|
51
|
+
>
|
|
50
52
|
<i
|
|
51
53
|
aria-hidden="true"
|
|
52
54
|
class="green play fitted icon"
|
|
53
55
|
/>
|
|
54
|
-
|
|
55
56
|
Active
|
|
56
57
|
</p>
|
|
57
58
|
</div>
|
|
@@ -62,6 +63,7 @@ exports[`<Action /> matches the latest snapshot 1`] = `
|
|
|
62
63
|
class="right aligned eight wide column"
|
|
63
64
|
>
|
|
64
65
|
<div
|
|
66
|
+
aria-disabled="false"
|
|
65
67
|
aria-expanded="false"
|
|
66
68
|
class="ui floating dropdown button icon group-actions"
|
|
67
69
|
role="listbox"
|