@truedat/ai 8.12.1 → 8.12.4

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": "@truedat/ai",
3
- "version": "8.12.1",
3
+ "version": "8.12.4",
4
4
  "description": "Truedat Web Artificial Intelligence package",
5
5
  "sideEffects": false,
6
6
  "module": "src/index.js",
@@ -53,7 +53,7 @@
53
53
  "@testing-library/jest-dom": "^6.6.3",
54
54
  "@testing-library/react": "^16.3.0",
55
55
  "@testing-library/user-event": "^14.6.1",
56
- "@truedat/test": "8.12.1",
56
+ "@truedat/test": "8.12.4",
57
57
  "identity-obj-proxy": "^3.0.0",
58
58
  "jest": "^29.7.0",
59
59
  "redux-saga-test-plan": "^4.0.6"
@@ -83,5 +83,5 @@
83
83
  "semantic-ui-react": "^3.0.0-beta.2",
84
84
  "swr": "^2.3.3"
85
85
  },
86
- "gitHead": "db02aab92701c55a73d5a5b469a7114f9c3a596e"
86
+ "gitHead": "d5bc1af84c4d828bdec676b0da58385cf0d6015f"
87
87
  }
@@ -40,6 +40,8 @@ const props = {
40
40
  };
41
41
 
42
42
  describe("<PromptEditor />", () => {
43
+ beforeEach(() => jest.useRealTimers());
44
+
43
45
  it("matches the latest snapshot", async () => {
44
46
  const rendered = render(<PromptEditor {...props} />);
45
47
  await waitForLoad(rendered);
@@ -39,6 +39,8 @@ const props = {
39
39
  };
40
40
 
41
41
  describe("<ProviderEditor />", () => {
42
+ beforeEach(() => jest.useRealTimers());
43
+
42
44
  it("matches the latest snapshot", async () => {
43
45
  const rendered = render(<ProviderEditor {...props} />, renderOpts);
44
46
  await waitForLoad(rendered);
@@ -77,6 +77,8 @@ const emitServerMessage = (event, payload) => {
77
77
  };
78
78
 
79
79
  describe("<SuggestionsWidget />", () => {
80
+ beforeEach(() => jest.useRealTimers());
81
+
80
82
  const mockFetchSuggestions = jest.fn();
81
83
 
82
84
  beforeEach(() => {
@@ -106,6 +108,9 @@ describe("<SuggestionsWidget />", () => {
106
108
  resource_type: "data_structure",
107
109
  }),
108
110
  );
111
+ await act(async () => {
112
+ await mockCheckAvailability.mock.results[0].value;
113
+ });
109
114
  expect(queryByText(/actions.ai_suggestion/i)).not.toBeInTheDocument();
110
115
  });
111
116
 
@@ -194,7 +199,9 @@ describe("<SuggestionsWidget />", () => {
194
199
  });
195
200
 
196
201
  const props = { template, suggestionParams: { template_id: 1 } };
197
- render(<SuggestionsWidget {...props} />, { messages });
202
+ const rendered = render(<SuggestionsWidget {...props} />, { messages });
203
+
204
+ await rendered.findByText(/actions.ai_suggestion/i);
198
205
 
199
206
  expect(useAssistantSocket).toHaveBeenCalledWith(
200
207
  false,