@jobber/hooks 2.0.0 → 2.0.2-pre.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/dist/index.js +24 -13
- package/dist/useAssert/index.js +2 -1
- package/dist/useAssert/useAssert.js +2 -1
- package/dist/useCollectionQuery/index.js +2 -1
- package/dist/useCollectionQuery/mdxUtils.js +19 -7
- package/dist/useCollectionQuery/test-utilities/index.js +17 -6
- package/dist/useCollectionQuery/test-utilities/mocks.d.ts +3 -3
- package/dist/useCollectionQuery/test-utilities/mocks.js +17 -17
- package/dist/useCollectionQuery/test-utilities/queries.js +57 -9
- package/dist/useCollectionQuery/test-utilities/utils.js +4 -38
- package/dist/useCollectionQuery/uniqueEdges.js +5 -4
- package/dist/useCollectionQuery/uniqueNodes.js +4 -3
- package/dist/useCollectionQuery/useCollectionQuery.d.ts +2 -2
- package/dist/useCollectionQuery/useCollectionQuery.js +60 -101
- package/dist/useCollectionQuery/useCollectionQuery.test.js +240 -438
- package/dist/useFocusTrap/index.js +2 -1
- package/dist/useFocusTrap/useFocusTrap.js +11 -10
- package/dist/useFocusTrap/useFocusTrap.test.js +19 -20
- package/dist/useFormState/index.js +2 -1
- package/dist/useFormState/useFormState.js +4 -19
- package/dist/useIsMounted/index.js +2 -1
- package/dist/useIsMounted/useIsMounted.js +5 -4
- package/dist/useIsMounted/useIsMounted.test.js +8 -8
- package/dist/useLiveAnnounce/index.js +2 -1
- package/dist/useLiveAnnounce/useLiveAnnounce.js +9 -24
- package/dist/useLiveAnnounce/useLiveAnnounce.test.js +36 -97
- package/dist/useOnKeyDown/index.js +2 -1
- package/dist/useOnKeyDown/useOnKeyDown.d.ts +2 -2
- package/dist/useOnKeyDown/useOnKeyDown.js +7 -6
- package/dist/useOnKeyDown/useOnKeyDown.test.js +9 -10
- package/dist/usePasswordStrength/index.js +2 -1
- package/dist/usePasswordStrength/usePasswordStrength.js +9 -8
- package/dist/useRefocusOnActivator/index.js +2 -1
- package/dist/useRefocusOnActivator/useRefocusOnActivator.js +5 -4
- package/dist/useResizeObserver/index.js +15 -4
- package/dist/useResizeObserver/useResizeObserver.js +20 -36
- package/package.json +4 -4
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
7
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
8
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -12,62 +8,35 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
12
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
13
9
|
});
|
|
14
10
|
};
|
|
15
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
16
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
17
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
18
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
19
|
-
function step(op) {
|
|
20
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
21
|
-
while (_) try {
|
|
22
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
23
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
24
|
-
switch (op[0]) {
|
|
25
|
-
case 0: case 1: t = op; break;
|
|
26
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
27
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
28
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
29
|
-
default:
|
|
30
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
31
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
32
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
33
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
34
|
-
if (t[2]) _.ops.pop();
|
|
35
|
-
_.trys.pop(); continue;
|
|
36
|
-
}
|
|
37
|
-
op = body.call(thisArg, _);
|
|
38
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
39
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
beforeEach(
|
|
48
|
-
test_utilities_1.setListQueryMockHasNextPage(true);
|
|
12
|
+
const react_hooks_1 = require("@testing-library/react-hooks");
|
|
13
|
+
const react_1 = require("@testing-library/react");
|
|
14
|
+
const useCollectionQuery_1 = require("./useCollectionQuery");
|
|
15
|
+
const test_utilities_1 = require("./test-utilities");
|
|
16
|
+
beforeEach(() => {
|
|
17
|
+
(0, test_utilities_1.setListQueryMockHasNextPage)(true);
|
|
49
18
|
test_utilities_1.listQueryResponseMock.mockClear();
|
|
50
19
|
test_utilities_1.subscriptionQueryMock.mockClear();
|
|
51
20
|
});
|
|
52
21
|
function useCollectionQueryHook(query) {
|
|
53
|
-
return useCollectionQuery_1.useCollectionQuery({
|
|
22
|
+
return (0, useCollectionQuery_1.useCollectionQuery)({
|
|
54
23
|
query: query,
|
|
55
|
-
getCollectionByPath
|
|
24
|
+
getCollectionByPath(data) {
|
|
56
25
|
var _a;
|
|
57
26
|
return (_a = data === null || data === void 0 ? void 0 : data.conversation) === null || _a === void 0 ? void 0 : _a.smsMessages;
|
|
58
27
|
},
|
|
59
28
|
});
|
|
60
29
|
}
|
|
61
30
|
function useCollectionQueryHookWithSubscription(query) {
|
|
62
|
-
return useCollectionQuery_1.useCollectionQuery({
|
|
31
|
+
return (0, useCollectionQuery_1.useCollectionQuery)({
|
|
63
32
|
query: query,
|
|
64
|
-
getCollectionByPath
|
|
33
|
+
getCollectionByPath(data) {
|
|
65
34
|
var _a;
|
|
66
35
|
return (_a = data === null || data === void 0 ? void 0 : data.conversation) === null || _a === void 0 ? void 0 : _a.smsMessages;
|
|
67
36
|
},
|
|
68
37
|
subscription: {
|
|
69
38
|
document: test_utilities_1.SUBSCRIPTION_QUERY,
|
|
70
|
-
getNodeByPath
|
|
39
|
+
getNodeByPath(conversationData) {
|
|
71
40
|
var _a;
|
|
72
41
|
return (_a = conversationData === null || conversationData === void 0 ? void 0 : conversationData.conversationMessage) === null || _a === void 0 ? void 0 : _a.smsMessage;
|
|
73
42
|
},
|
|
@@ -75,451 +44,284 @@ function useCollectionQueryHookWithSubscription(query) {
|
|
|
75
44
|
});
|
|
76
45
|
}
|
|
77
46
|
function useCollectionQueryHookWithSubscriptionAndSearch(query, searchTerm) {
|
|
78
|
-
return useCollectionQuery_1.useCollectionQuery({
|
|
47
|
+
return (0, useCollectionQuery_1.useCollectionQuery)({
|
|
79
48
|
query: query,
|
|
80
49
|
queryOptions: {
|
|
81
50
|
variables: {
|
|
82
51
|
searchTerm: searchTerm,
|
|
83
52
|
},
|
|
84
53
|
},
|
|
85
|
-
getCollectionByPath
|
|
54
|
+
getCollectionByPath(data) {
|
|
86
55
|
var _a;
|
|
87
56
|
return (_a = data === null || data === void 0 ? void 0 : data.conversation) === null || _a === void 0 ? void 0 : _a.smsMessages;
|
|
88
57
|
},
|
|
89
58
|
subscription: {
|
|
90
59
|
document: test_utilities_1.SUBSCRIPTION_QUERY,
|
|
91
|
-
getNodeByPath
|
|
60
|
+
getNodeByPath(conversationData) {
|
|
92
61
|
var _a;
|
|
93
62
|
return (_a = conversationData === null || conversationData === void 0 ? void 0 : conversationData.conversationMessage) === null || _a === void 0 ? void 0 : _a.smsMessage;
|
|
94
63
|
},
|
|
95
64
|
},
|
|
96
65
|
});
|
|
97
66
|
}
|
|
98
|
-
describe("useCollectionQuery",
|
|
99
|
-
describe.each
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
result.current.nextPage();
|
|
116
|
-
});
|
|
117
|
-
return [4 /*yield*/, react_hooks_1.act(test_utilities_1.wait)];
|
|
118
|
-
case 1:
|
|
119
|
-
_a.sent();
|
|
120
|
-
expect(responseMock).toHaveBeenCalledTimes(1);
|
|
121
|
-
return [2 /*return*/];
|
|
122
|
-
}
|
|
67
|
+
describe("useCollectionQuery", () => {
|
|
68
|
+
describe.each `
|
|
69
|
+
testCase | query | responseMock
|
|
70
|
+
${"excludes totalCount"} | ${test_utilities_1.LIST_QUERY} | ${test_utilities_1.listQueryResponseMock}
|
|
71
|
+
${"includes totalCount"} | ${test_utilities_1.LIST_QUERY_WITH_TOTAL_COUNT} | ${test_utilities_1.listQueryWithTotalCountResponseMock}
|
|
72
|
+
`("when the query run $testCase", ({ query, responseMock }) => {
|
|
73
|
+
describe("when useCollectionQuery is first called", () => {
|
|
74
|
+
describe("when nextPage is called while it's still loading initial content", () => {
|
|
75
|
+
it("should not trigger a the next page to be fetched", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
76
|
+
const { result } = (0, react_hooks_1.renderHook)(() => useCollectionQueryHook(query), {
|
|
77
|
+
wrapper: (0, test_utilities_1.wrapper)([
|
|
78
|
+
(0, test_utilities_1.buildListRequestMock)(query, responseMock),
|
|
79
|
+
(0, test_utilities_1.buildListRequestMockForNextPage)(query, responseMock),
|
|
80
|
+
]),
|
|
81
|
+
});
|
|
82
|
+
(0, react_hooks_1.act)(() => {
|
|
83
|
+
result.current.nextPage();
|
|
123
84
|
});
|
|
124
|
-
|
|
85
|
+
yield (0, react_hooks_1.act)(test_utilities_1.wait);
|
|
86
|
+
expect(responseMock).toHaveBeenCalledTimes(1);
|
|
87
|
+
}));
|
|
125
88
|
});
|
|
126
|
-
describe("when refresh is called while it's still loading initial content",
|
|
127
|
-
it("should not trigger a refresh",
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
wrapper: test_utilities_1.wrapper([
|
|
134
|
-
test_utilities_1.buildListRequestMock(query, responseMock),
|
|
135
|
-
test_utilities_1.buildListRequestMock(query, responseMock),
|
|
136
|
-
]),
|
|
137
|
-
}).result;
|
|
138
|
-
react_hooks_1.act(function () {
|
|
139
|
-
result.current.refresh();
|
|
140
|
-
});
|
|
141
|
-
return [4 /*yield*/, react_hooks_1.act(test_utilities_1.wait)];
|
|
142
|
-
case 1:
|
|
143
|
-
_a.sent();
|
|
144
|
-
expect(responseMock).toHaveBeenCalledTimes(1);
|
|
145
|
-
return [2 /*return*/];
|
|
146
|
-
}
|
|
89
|
+
describe("when refresh is called while it's still loading initial content", () => {
|
|
90
|
+
it("should not trigger a refresh", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
91
|
+
const { result } = (0, react_hooks_1.renderHook)(() => useCollectionQueryHook(query), {
|
|
92
|
+
wrapper: (0, test_utilities_1.wrapper)([
|
|
93
|
+
(0, test_utilities_1.buildListRequestMock)(query, responseMock),
|
|
94
|
+
(0, test_utilities_1.buildListRequestMock)(query, responseMock),
|
|
95
|
+
]),
|
|
147
96
|
});
|
|
148
|
-
|
|
97
|
+
(0, react_hooks_1.act)(() => {
|
|
98
|
+
result.current.refresh();
|
|
99
|
+
});
|
|
100
|
+
yield (0, react_hooks_1.act)(test_utilities_1.wait);
|
|
101
|
+
expect(responseMock).toHaveBeenCalledTimes(1);
|
|
102
|
+
}));
|
|
149
103
|
});
|
|
150
|
-
describe("when there is no error",
|
|
151
|
-
it("should update data",
|
|
152
|
-
var result;
|
|
104
|
+
describe("when there is no error", () => {
|
|
105
|
+
it("should update data", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
153
106
|
var _a, _b, _c, _d;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
case 0:
|
|
157
|
-
result = react_hooks_1.renderHook(function () { return useCollectionQueryHook(query); }, {
|
|
158
|
-
wrapper: test_utilities_1.wrapper([test_utilities_1.buildListRequestMock(query, responseMock)]),
|
|
159
|
-
}).result;
|
|
160
|
-
return [4 /*yield*/, react_hooks_1.act(test_utilities_1.wait)];
|
|
161
|
-
case 1:
|
|
162
|
-
_e.sent();
|
|
163
|
-
expect((_d = (_c = (_b = (_a = result.current.data) === null || _a === void 0 ? void 0 : _a.conversation) === null || _b === void 0 ? void 0 : _b.smsMessages) === null || _c === void 0 ? void 0 : _c.edges) === null || _d === void 0 ? void 0 : _d.length).toBe(1);
|
|
164
|
-
return [2 /*return*/];
|
|
165
|
-
}
|
|
107
|
+
const { result } = (0, react_hooks_1.renderHook)(() => useCollectionQueryHook(query), {
|
|
108
|
+
wrapper: (0, test_utilities_1.wrapper)([(0, test_utilities_1.buildListRequestMock)(query, responseMock)]),
|
|
166
109
|
});
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
result = react_hooks_1.renderHook(function () { return useCollectionQueryHook(query); }, {
|
|
174
|
-
wrapper: test_utilities_1.wrapper([test_utilities_1.buildListRequestMock(query, responseMock)]),
|
|
175
|
-
}).result;
|
|
176
|
-
expect(result.current.loadingInitialContent).toBe(true);
|
|
177
|
-
return [4 /*yield*/, react_hooks_1.act(test_utilities_1.wait)];
|
|
178
|
-
case 1:
|
|
179
|
-
_a.sent();
|
|
180
|
-
return [2 /*return*/];
|
|
181
|
-
}
|
|
110
|
+
yield (0, react_hooks_1.act)(test_utilities_1.wait);
|
|
111
|
+
expect((_d = (_c = (_b = (_a = result.current.data) === null || _a === void 0 ? void 0 : _a.conversation) === null || _b === void 0 ? void 0 : _b.smsMessages) === null || _c === void 0 ? void 0 : _c.edges) === null || _d === void 0 ? void 0 : _d.length).toBe(1);
|
|
112
|
+
}));
|
|
113
|
+
it("should set initialLoading while loading data", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
114
|
+
const { result } = (0, react_hooks_1.renderHook)(() => useCollectionQueryHook(query), {
|
|
115
|
+
wrapper: (0, test_utilities_1.wrapper)([(0, test_utilities_1.buildListRequestMock)(query, responseMock)]),
|
|
182
116
|
});
|
|
183
|
-
|
|
117
|
+
expect(result.current.loadingInitialContent).toBe(true);
|
|
118
|
+
yield (0, react_hooks_1.act)(test_utilities_1.wait);
|
|
119
|
+
}));
|
|
184
120
|
});
|
|
185
121
|
});
|
|
186
|
-
describe("#nextPage",
|
|
187
|
-
describe("when nextPage is called while it's still loadingNextPage",
|
|
188
|
-
it("should not trigger a nextPage",
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
}).result;
|
|
200
|
-
return [4 /*yield*/, react_hooks_1.act(test_utilities_1.wait)];
|
|
201
|
-
case 1:
|
|
202
|
-
_a.sent();
|
|
203
|
-
react_hooks_1.act(function () {
|
|
204
|
-
result.current.nextPage();
|
|
205
|
-
});
|
|
206
|
-
react_hooks_1.act(function () {
|
|
207
|
-
result.current.nextPage();
|
|
208
|
-
});
|
|
209
|
-
return [4 /*yield*/, react_hooks_1.act(test_utilities_1.wait)];
|
|
210
|
-
case 2:
|
|
211
|
-
_a.sent();
|
|
212
|
-
return [4 /*yield*/, react_1.waitFor(function () {
|
|
213
|
-
var _a, _b, _c;
|
|
214
|
-
expect((_c = (_b = (_a = result.current.data) === null || _a === void 0 ? void 0 : _a.conversation) === null || _b === void 0 ? void 0 : _b.smsMessages) === null || _c === void 0 ? void 0 : _c.edges).toHaveLength(2);
|
|
215
|
-
})];
|
|
216
|
-
case 3:
|
|
217
|
-
_a.sent();
|
|
218
|
-
return [2 /*return*/];
|
|
219
|
-
}
|
|
122
|
+
describe("#nextPage", () => {
|
|
123
|
+
describe("when nextPage is called while it's still loadingNextPage", () => {
|
|
124
|
+
it("should not trigger a nextPage", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
125
|
+
const { result } = (0, react_hooks_1.renderHook)(() => useCollectionQueryHook(query), {
|
|
126
|
+
wrapper: (0, test_utilities_1.wrapper)([
|
|
127
|
+
(0, test_utilities_1.buildListRequestMock)(query, responseMock),
|
|
128
|
+
(0, test_utilities_1.buildListRequestMockForNextPage)(query, responseMock),
|
|
129
|
+
(0, test_utilities_1.buildListRequestMockForNextPage)(query, responseMock),
|
|
130
|
+
]),
|
|
131
|
+
});
|
|
132
|
+
yield (0, react_hooks_1.act)(test_utilities_1.wait);
|
|
133
|
+
(0, react_hooks_1.act)(() => {
|
|
134
|
+
result.current.nextPage();
|
|
220
135
|
});
|
|
221
|
-
|
|
136
|
+
(0, react_hooks_1.act)(() => {
|
|
137
|
+
result.current.nextPage();
|
|
138
|
+
});
|
|
139
|
+
yield (0, react_hooks_1.act)(test_utilities_1.wait);
|
|
140
|
+
yield (0, react_1.waitFor)(() => {
|
|
141
|
+
var _a, _b, _c;
|
|
142
|
+
expect((_c = (_b = (_a = result.current.data) === null || _a === void 0 ? void 0 : _a.conversation) === null || _b === void 0 ? void 0 : _b.smsMessages) === null || _c === void 0 ? void 0 : _c.edges).toHaveLength(2);
|
|
143
|
+
});
|
|
144
|
+
}));
|
|
222
145
|
});
|
|
223
|
-
describe("when refresh is called while it's still loadingNextPage",
|
|
224
|
-
it("should trigger a refresh",
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
_a.sent();
|
|
239
|
-
react_hooks_1.act(function () {
|
|
240
|
-
result.current.nextPage();
|
|
241
|
-
});
|
|
242
|
-
react_hooks_1.act(function () {
|
|
243
|
-
result.current.refresh();
|
|
244
|
-
});
|
|
245
|
-
expect(result.current.loadingRefresh).toBe(true);
|
|
246
|
-
return [4 /*yield*/, react_hooks_1.act(test_utilities_1.wait)];
|
|
247
|
-
case 2:
|
|
248
|
-
_a.sent();
|
|
249
|
-
return [2 /*return*/];
|
|
250
|
-
}
|
|
146
|
+
describe("when refresh is called while it's still loadingNextPage", () => {
|
|
147
|
+
it("should trigger a refresh", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
148
|
+
const { result } = (0, react_hooks_1.renderHook)(() => useCollectionQueryHook(query), {
|
|
149
|
+
wrapper: (0, test_utilities_1.wrapper)([
|
|
150
|
+
(0, test_utilities_1.buildListRequestMock)(query, responseMock),
|
|
151
|
+
(0, test_utilities_1.buildListRequestMock)(query, responseMock),
|
|
152
|
+
(0, test_utilities_1.buildListRequestMockForNextPage)(query, responseMock),
|
|
153
|
+
]),
|
|
154
|
+
});
|
|
155
|
+
yield (0, react_hooks_1.act)(test_utilities_1.wait);
|
|
156
|
+
(0, react_hooks_1.act)(() => {
|
|
157
|
+
result.current.nextPage();
|
|
158
|
+
});
|
|
159
|
+
(0, react_hooks_1.act)(() => {
|
|
160
|
+
result.current.refresh();
|
|
251
161
|
});
|
|
252
|
-
|
|
162
|
+
expect(result.current.loadingRefresh).toBe(true);
|
|
163
|
+
yield (0, react_hooks_1.act)(test_utilities_1.wait);
|
|
164
|
+
}));
|
|
253
165
|
});
|
|
254
|
-
describe("when there is no more data to fetch",
|
|
255
|
-
it("should not fetch more data",
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
wrapper: test_utilities_1.wrapper([
|
|
263
|
-
test_utilities_1.buildListRequestMock(query, responseMock),
|
|
264
|
-
test_utilities_1.buildListRequestMockForNextPage(query, responseMock),
|
|
265
|
-
]),
|
|
266
|
-
}).result;
|
|
267
|
-
return [4 /*yield*/, react_hooks_1.act(test_utilities_1.wait)];
|
|
268
|
-
case 1:
|
|
269
|
-
_a.sent();
|
|
270
|
-
react_hooks_1.act(function () {
|
|
271
|
-
result.current.nextPage();
|
|
272
|
-
});
|
|
273
|
-
return [4 /*yield*/, react_hooks_1.act(test_utilities_1.wait)];
|
|
274
|
-
case 2:
|
|
275
|
-
_a.sent();
|
|
276
|
-
expect(responseMock).toHaveBeenCalledTimes(1);
|
|
277
|
-
return [2 /*return*/];
|
|
278
|
-
}
|
|
166
|
+
describe("when there is no more data to fetch", () => {
|
|
167
|
+
it("should not fetch more data", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
168
|
+
(0, test_utilities_1.setListQueryMockHasNextPage)(false);
|
|
169
|
+
const { result } = (0, react_hooks_1.renderHook)(() => useCollectionQueryHook(query), {
|
|
170
|
+
wrapper: (0, test_utilities_1.wrapper)([
|
|
171
|
+
(0, test_utilities_1.buildListRequestMock)(query, responseMock),
|
|
172
|
+
(0, test_utilities_1.buildListRequestMockForNextPage)(query, responseMock),
|
|
173
|
+
]),
|
|
279
174
|
});
|
|
280
|
-
|
|
175
|
+
yield (0, react_hooks_1.act)(test_utilities_1.wait);
|
|
176
|
+
(0, react_hooks_1.act)(() => {
|
|
177
|
+
result.current.nextPage();
|
|
178
|
+
});
|
|
179
|
+
yield (0, react_hooks_1.act)(test_utilities_1.wait);
|
|
180
|
+
expect(responseMock).toHaveBeenCalledTimes(1);
|
|
181
|
+
}));
|
|
281
182
|
});
|
|
282
|
-
describe("when there is no error",
|
|
283
|
-
it("should update data",
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
result.current.nextPage();
|
|
299
|
-
});
|
|
300
|
-
return [4 /*yield*/, react_hooks_1.act(test_utilities_1.wait)];
|
|
301
|
-
case 2:
|
|
302
|
-
_a.sent();
|
|
303
|
-
return [4 /*yield*/, react_1.waitFor(function () {
|
|
304
|
-
var _a, _b, _c;
|
|
305
|
-
expect((_c = (_b = (_a = result.current.data) === null || _a === void 0 ? void 0 : _a.conversation) === null || _b === void 0 ? void 0 : _b.smsMessages) === null || _c === void 0 ? void 0 : _c.edges).toHaveLength(2);
|
|
306
|
-
})];
|
|
307
|
-
case 3:
|
|
308
|
-
_a.sent();
|
|
309
|
-
return [2 /*return*/];
|
|
310
|
-
}
|
|
183
|
+
describe("when there is no error", () => {
|
|
184
|
+
it("should update data", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
185
|
+
const { result } = (0, react_hooks_1.renderHook)(() => useCollectionQueryHook(query), {
|
|
186
|
+
wrapper: (0, test_utilities_1.wrapper)([
|
|
187
|
+
(0, test_utilities_1.buildListRequestMock)(query, responseMock),
|
|
188
|
+
(0, test_utilities_1.buildListRequestMockForNextPage)(query, responseMock),
|
|
189
|
+
]),
|
|
190
|
+
});
|
|
191
|
+
yield (0, react_hooks_1.act)(test_utilities_1.wait);
|
|
192
|
+
(0, react_hooks_1.act)(() => {
|
|
193
|
+
result.current.nextPage();
|
|
194
|
+
});
|
|
195
|
+
yield (0, react_hooks_1.act)(test_utilities_1.wait);
|
|
196
|
+
yield (0, react_1.waitFor)(() => {
|
|
197
|
+
var _a, _b, _c;
|
|
198
|
+
expect((_c = (_b = (_a = result.current.data) === null || _a === void 0 ? void 0 : _a.conversation) === null || _b === void 0 ? void 0 : _b.smsMessages) === null || _c === void 0 ? void 0 : _c.edges).toHaveLength(2);
|
|
311
199
|
});
|
|
312
|
-
})
|
|
313
|
-
it("should set loadingNextPage while loading data",
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
wrapper: test_utilities_1.wrapper([
|
|
320
|
-
test_utilities_1.buildListRequestMock(query, responseMock),
|
|
321
|
-
test_utilities_1.buildListRequestMockForNextPage(query, responseMock),
|
|
322
|
-
]),
|
|
323
|
-
}).result;
|
|
324
|
-
return [4 /*yield*/, react_hooks_1.act(test_utilities_1.wait)];
|
|
325
|
-
case 1:
|
|
326
|
-
_a.sent();
|
|
327
|
-
react_hooks_1.act(function () {
|
|
328
|
-
result.current.nextPage();
|
|
329
|
-
});
|
|
330
|
-
expect(result.current.loadingNextPage).toBe(true);
|
|
331
|
-
return [4 /*yield*/, react_hooks_1.act(test_utilities_1.wait)];
|
|
332
|
-
case 2:
|
|
333
|
-
_a.sent();
|
|
334
|
-
return [2 /*return*/];
|
|
335
|
-
}
|
|
200
|
+
}));
|
|
201
|
+
it("should set loadingNextPage while loading data", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
202
|
+
const { result } = (0, react_hooks_1.renderHook)(() => useCollectionQueryHook(query), {
|
|
203
|
+
wrapper: (0, test_utilities_1.wrapper)([
|
|
204
|
+
(0, test_utilities_1.buildListRequestMock)(query, responseMock),
|
|
205
|
+
(0, test_utilities_1.buildListRequestMockForNextPage)(query, responseMock),
|
|
206
|
+
]),
|
|
336
207
|
});
|
|
337
|
-
|
|
208
|
+
yield (0, react_hooks_1.act)(test_utilities_1.wait);
|
|
209
|
+
(0, react_hooks_1.act)(() => {
|
|
210
|
+
result.current.nextPage();
|
|
211
|
+
});
|
|
212
|
+
expect(result.current.loadingNextPage).toBe(true);
|
|
213
|
+
yield (0, react_hooks_1.act)(test_utilities_1.wait);
|
|
214
|
+
}));
|
|
338
215
|
});
|
|
339
216
|
});
|
|
340
|
-
describe("#refresh",
|
|
341
|
-
describe("when refresh is called while it's still loadingRefresh",
|
|
342
|
-
it("should not trigger a refresh",
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
}).result;
|
|
354
|
-
return [4 /*yield*/, react_hooks_1.act(test_utilities_1.wait)];
|
|
355
|
-
case 1:
|
|
356
|
-
_a.sent();
|
|
357
|
-
react_hooks_1.act(function () {
|
|
358
|
-
result.current.refresh();
|
|
359
|
-
});
|
|
360
|
-
react_hooks_1.act(function () {
|
|
361
|
-
result.current.refresh();
|
|
362
|
-
});
|
|
363
|
-
return [4 /*yield*/, react_hooks_1.act(test_utilities_1.wait)];
|
|
364
|
-
case 2:
|
|
365
|
-
_a.sent();
|
|
366
|
-
expect(responseMock).toHaveBeenCalledTimes(2);
|
|
367
|
-
return [2 /*return*/];
|
|
368
|
-
}
|
|
217
|
+
describe("#refresh", () => {
|
|
218
|
+
describe("when refresh is called while it's still loadingRefresh", () => {
|
|
219
|
+
it("should not trigger a refresh", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
220
|
+
const { result } = (0, react_hooks_1.renderHook)(() => useCollectionQueryHook(query), {
|
|
221
|
+
wrapper: (0, test_utilities_1.wrapper)([
|
|
222
|
+
(0, test_utilities_1.buildListRequestMock)(query, responseMock),
|
|
223
|
+
(0, test_utilities_1.buildListRequestMock)(query, responseMock),
|
|
224
|
+
(0, test_utilities_1.buildListRequestMock)(query, responseMock),
|
|
225
|
+
]),
|
|
226
|
+
});
|
|
227
|
+
yield (0, react_hooks_1.act)(test_utilities_1.wait);
|
|
228
|
+
(0, react_hooks_1.act)(() => {
|
|
229
|
+
result.current.refresh();
|
|
369
230
|
});
|
|
370
|
-
|
|
231
|
+
(0, react_hooks_1.act)(() => {
|
|
232
|
+
result.current.refresh();
|
|
233
|
+
});
|
|
234
|
+
yield (0, react_hooks_1.act)(test_utilities_1.wait);
|
|
235
|
+
expect(responseMock).toHaveBeenCalledTimes(2);
|
|
236
|
+
}));
|
|
371
237
|
});
|
|
372
|
-
describe("when nextPage is called while it's still loadingRefresh",
|
|
373
|
-
it("should not trigger a nextPage",
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
}).result;
|
|
385
|
-
return [4 /*yield*/, react_hooks_1.act(test_utilities_1.wait)];
|
|
386
|
-
case 1:
|
|
387
|
-
_a.sent();
|
|
388
|
-
react_hooks_1.act(function () {
|
|
389
|
-
result.current.refresh();
|
|
390
|
-
});
|
|
391
|
-
react_hooks_1.act(function () {
|
|
392
|
-
result.current.nextPage();
|
|
393
|
-
});
|
|
394
|
-
expect(result.current.loadingNextPage).toBe(false);
|
|
395
|
-
return [4 /*yield*/, react_hooks_1.act(test_utilities_1.wait)];
|
|
396
|
-
case 2:
|
|
397
|
-
_a.sent();
|
|
398
|
-
return [2 /*return*/];
|
|
399
|
-
}
|
|
238
|
+
describe("when nextPage is called while it's still loadingRefresh", () => {
|
|
239
|
+
it("should not trigger a nextPage", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
240
|
+
const { result } = (0, react_hooks_1.renderHook)(() => useCollectionQueryHook(query), {
|
|
241
|
+
wrapper: (0, test_utilities_1.wrapper)([
|
|
242
|
+
(0, test_utilities_1.buildListRequestMock)(query, responseMock),
|
|
243
|
+
(0, test_utilities_1.buildListRequestMock)(query, responseMock),
|
|
244
|
+
(0, test_utilities_1.buildListRequestMockForNextPage)(query, responseMock),
|
|
245
|
+
]),
|
|
246
|
+
});
|
|
247
|
+
yield (0, react_hooks_1.act)(test_utilities_1.wait);
|
|
248
|
+
(0, react_hooks_1.act)(() => {
|
|
249
|
+
result.current.refresh();
|
|
400
250
|
});
|
|
401
|
-
|
|
251
|
+
(0, react_hooks_1.act)(() => {
|
|
252
|
+
result.current.nextPage();
|
|
253
|
+
});
|
|
254
|
+
expect(result.current.loadingNextPage).toBe(false);
|
|
255
|
+
yield (0, react_hooks_1.act)(test_utilities_1.wait);
|
|
256
|
+
}));
|
|
402
257
|
});
|
|
403
|
-
describe("when there is no error",
|
|
404
|
-
it("should set loadingRefresh while loading data",
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
}).result;
|
|
415
|
-
return [4 /*yield*/, react_hooks_1.act(test_utilities_1.wait)];
|
|
416
|
-
case 1:
|
|
417
|
-
_a.sent();
|
|
418
|
-
react_hooks_1.act(function () {
|
|
419
|
-
result.current.refresh();
|
|
420
|
-
});
|
|
421
|
-
expect(result.current.loadingRefresh).toBe(true);
|
|
422
|
-
return [4 /*yield*/, react_hooks_1.act(test_utilities_1.wait)];
|
|
423
|
-
case 2:
|
|
424
|
-
_a.sent();
|
|
425
|
-
return [2 /*return*/];
|
|
426
|
-
}
|
|
258
|
+
describe("when there is no error", () => {
|
|
259
|
+
it("should set loadingRefresh while loading data", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
260
|
+
const { result } = (0, react_hooks_1.renderHook)(() => useCollectionQueryHook(query), {
|
|
261
|
+
wrapper: (0, test_utilities_1.wrapper)([
|
|
262
|
+
(0, test_utilities_1.buildListRequestMock)(query, responseMock),
|
|
263
|
+
(0, test_utilities_1.buildListRequestMock)(query, responseMock),
|
|
264
|
+
]),
|
|
265
|
+
});
|
|
266
|
+
yield (0, react_hooks_1.act)(test_utilities_1.wait);
|
|
267
|
+
(0, react_hooks_1.act)(() => {
|
|
268
|
+
result.current.refresh();
|
|
427
269
|
});
|
|
428
|
-
|
|
270
|
+
expect(result.current.loadingRefresh).toBe(true);
|
|
271
|
+
yield (0, react_hooks_1.act)(test_utilities_1.wait);
|
|
272
|
+
}));
|
|
429
273
|
});
|
|
430
274
|
});
|
|
431
|
-
describe("#subscribeToMore",
|
|
432
|
-
describe("when hook receives update from item not in collection",
|
|
433
|
-
it("should add new item to collection",
|
|
434
|
-
var _a,
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
wrapper: test_utilities_1.wrapper([
|
|
441
|
-
test_utilities_1.buildListRequestMock(query, responseMock, "1"),
|
|
442
|
-
test_utilities_1.buildSubscriptionRequestMock("2"),
|
|
443
|
-
]),
|
|
444
|
-
}), result = _a.result, waitForNextUpdate = _a.waitForNextUpdate;
|
|
445
|
-
// Wait for initial load
|
|
446
|
-
return [4 /*yield*/, react_hooks_1.act(waitForNextUpdate)];
|
|
447
|
-
case 1:
|
|
448
|
-
// Wait for initial load
|
|
449
|
-
_g.sent();
|
|
450
|
-
// Wait for subscription
|
|
451
|
-
return [4 /*yield*/, react_hooks_1.act(waitForNextUpdate)];
|
|
452
|
-
case 2:
|
|
453
|
-
// Wait for subscription
|
|
454
|
-
_g.sent();
|
|
455
|
-
expect((_f = (_e = (_d = (_c = (_b = result === null || result === void 0 ? void 0 : result.current) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.conversation) === null || _d === void 0 ? void 0 : _d.smsMessages) === null || _e === void 0 ? void 0 : _e.edges) === null || _f === void 0 ? void 0 : _f.length).toBe(2);
|
|
456
|
-
return [2 /*return*/];
|
|
457
|
-
}
|
|
275
|
+
describe("#subscribeToMore", () => {
|
|
276
|
+
describe("when hook receives update from item not in collection", () => {
|
|
277
|
+
it("should add new item to collection", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
278
|
+
var _a, _b, _c, _d, _e;
|
|
279
|
+
const { result, waitForNextUpdate } = (0, react_hooks_1.renderHook)(() => useCollectionQueryHookWithSubscription(query), {
|
|
280
|
+
wrapper: (0, test_utilities_1.wrapper)([
|
|
281
|
+
(0, test_utilities_1.buildListRequestMock)(query, responseMock, "1"),
|
|
282
|
+
(0, test_utilities_1.buildSubscriptionRequestMock)("2"),
|
|
283
|
+
]),
|
|
458
284
|
});
|
|
459
|
-
|
|
285
|
+
// Wait for initial load
|
|
286
|
+
yield (0, react_hooks_1.act)(waitForNextUpdate);
|
|
287
|
+
// Wait for subscription
|
|
288
|
+
yield (0, react_hooks_1.act)(waitForNextUpdate);
|
|
289
|
+
expect((_e = (_d = (_c = (_b = (_a = result === null || result === void 0 ? void 0 : result.current) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.conversation) === null || _c === void 0 ? void 0 : _c.smsMessages) === null || _d === void 0 ? void 0 : _d.edges) === null || _e === void 0 ? void 0 : _e.length).toBe(2);
|
|
290
|
+
}));
|
|
460
291
|
});
|
|
461
|
-
describe("when hook receives update from item already in collection",
|
|
462
|
-
it("should return the existing collection",
|
|
463
|
-
var _a,
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
wrapper: test_utilities_1.wrapper([
|
|
470
|
-
test_utilities_1.buildListRequestMock(query, responseMock, "1"),
|
|
471
|
-
test_utilities_1.buildSubscriptionRequestMock("1"),
|
|
472
|
-
]),
|
|
473
|
-
}), result = _a.result, waitForNextUpdate = _a.waitForNextUpdate;
|
|
474
|
-
// Wait for initial load
|
|
475
|
-
return [4 /*yield*/, react_hooks_1.act(waitForNextUpdate)];
|
|
476
|
-
case 1:
|
|
477
|
-
// Wait for initial load
|
|
478
|
-
_g.sent();
|
|
479
|
-
// Wait for subscription
|
|
480
|
-
return [4 /*yield*/, react_hooks_1.act(function () { return test_utilities_1.wait(200); })];
|
|
481
|
-
case 2:
|
|
482
|
-
// Wait for subscription
|
|
483
|
-
_g.sent();
|
|
484
|
-
expect((_f = (_e = (_d = (_c = (_b = result === null || result === void 0 ? void 0 : result.current) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.conversation) === null || _d === void 0 ? void 0 : _d.smsMessages) === null || _e === void 0 ? void 0 : _e.edges) === null || _f === void 0 ? void 0 : _f.length).toBe(1);
|
|
485
|
-
return [2 /*return*/];
|
|
486
|
-
}
|
|
292
|
+
describe("when hook receives update from item already in collection", () => {
|
|
293
|
+
it("should return the existing collection", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
294
|
+
var _a, _b, _c, _d, _e;
|
|
295
|
+
const { result, waitForNextUpdate } = (0, react_hooks_1.renderHook)(() => useCollectionQueryHookWithSubscription(query), {
|
|
296
|
+
wrapper: (0, test_utilities_1.wrapper)([
|
|
297
|
+
(0, test_utilities_1.buildListRequestMock)(query, responseMock, "1"),
|
|
298
|
+
(0, test_utilities_1.buildSubscriptionRequestMock)("1"),
|
|
299
|
+
]),
|
|
487
300
|
});
|
|
488
|
-
|
|
301
|
+
// Wait for initial load
|
|
302
|
+
yield (0, react_hooks_1.act)(waitForNextUpdate);
|
|
303
|
+
// Wait for subscription
|
|
304
|
+
yield (0, react_hooks_1.act)(() => (0, test_utilities_1.wait)(200));
|
|
305
|
+
expect((_e = (_d = (_c = (_b = (_a = result === null || result === void 0 ? void 0 : result.current) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.conversation) === null || _c === void 0 ? void 0 : _c.smsMessages) === null || _d === void 0 ? void 0 : _d.edges) === null || _e === void 0 ? void 0 : _e.length).toBe(1);
|
|
306
|
+
}));
|
|
489
307
|
});
|
|
490
|
-
describe("when hook receives `update` but is currently searching a collection",
|
|
491
|
-
it("should return the existing collection without adding the subscribed content",
|
|
492
|
-
var
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
return useCollectionQueryHookWithSubscriptionAndSearch(query, searchTerm);
|
|
500
|
-
}, {
|
|
501
|
-
wrapper: test_utilities_1.wrapper([
|
|
502
|
-
test_utilities_1.buildListRequestMock(query, responseMock, "1", searchTerm),
|
|
503
|
-
test_utilities_1.buildSubscriptionRequestMock("1"),
|
|
504
|
-
]),
|
|
505
|
-
}), result = _a.result, waitForNextUpdate = _a.waitForNextUpdate;
|
|
506
|
-
// Wait for initial load
|
|
507
|
-
return [4 /*yield*/, react_hooks_1.act(waitForNextUpdate)];
|
|
508
|
-
case 1:
|
|
509
|
-
// Wait for initial load
|
|
510
|
-
_g.sent();
|
|
511
|
-
// Wait for subscription
|
|
512
|
-
return [4 /*yield*/, react_hooks_1.act(function () { return test_utilities_1.wait(200); })];
|
|
513
|
-
case 2:
|
|
514
|
-
// Wait for subscription
|
|
515
|
-
_g.sent();
|
|
516
|
-
expect((_f = (_e = (_d = (_c = (_b = result === null || result === void 0 ? void 0 : result.current) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.conversation) === null || _d === void 0 ? void 0 : _d.smsMessages) === null || _e === void 0 ? void 0 : _e.edges) === null || _f === void 0 ? void 0 : _f.length).toBe(1);
|
|
517
|
-
return [2 /*return*/];
|
|
518
|
-
}
|
|
308
|
+
describe("when hook receives `update` but is currently searching a collection", () => {
|
|
309
|
+
it("should return the existing collection without adding the subscribed content", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
310
|
+
var _a, _b, _c, _d, _e;
|
|
311
|
+
const searchTerm = "FooBar";
|
|
312
|
+
const { result, waitForNextUpdate } = (0, react_hooks_1.renderHook)(() => useCollectionQueryHookWithSubscriptionAndSearch(query, searchTerm), {
|
|
313
|
+
wrapper: (0, test_utilities_1.wrapper)([
|
|
314
|
+
(0, test_utilities_1.buildListRequestMock)(query, responseMock, "1", searchTerm),
|
|
315
|
+
(0, test_utilities_1.buildSubscriptionRequestMock)("1"),
|
|
316
|
+
]),
|
|
519
317
|
});
|
|
520
|
-
|
|
318
|
+
// Wait for initial load
|
|
319
|
+
yield (0, react_hooks_1.act)(waitForNextUpdate);
|
|
320
|
+
// Wait for subscription
|
|
321
|
+
yield (0, react_hooks_1.act)(() => (0, test_utilities_1.wait)(200));
|
|
322
|
+
expect((_e = (_d = (_c = (_b = (_a = result === null || result === void 0 ? void 0 : result.current) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.conversation) === null || _c === void 0 ? void 0 : _c.smsMessages) === null || _d === void 0 ? void 0 : _d.edges) === null || _e === void 0 ? void 0 : _e.length).toBe(1);
|
|
323
|
+
}));
|
|
521
324
|
});
|
|
522
325
|
});
|
|
523
326
|
});
|
|
524
327
|
});
|
|
525
|
-
var templateObject_1;
|