@agility/content-sync 1.1.1 → 1.1.2
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.
|
@@ -11397,7 +11397,7 @@ var expandContentItem = /*#__PURE__*/function () {var _ref19 = store_interface_a
|
|
|
11397
11397
|
}case 42:_context10.next = 35;break;case 44:_context10.next = 49;break;case 46:_context10.prev = 46;_context10.t2 = _context10["catch"](33);_iterator.e(_context10.t2);case 49:_context10.prev = 49;_iterator.f();return _context10.finish(49);case 52:_iterator2 = store_interface_createForOfIteratorHelper(
|
|
11398
11398
|
|
|
11399
11399
|
|
|
11400
|
-
list);_context10.prev = 53;_iterator2.s();case 55:if ((_step2 = _iterator2.n()).done) {_context10.next = 69;break;}listItem = _step2.value;
|
|
11400
|
+
list.items);_context10.prev = 53;_iterator2.s();case 55:if ((_step2 = _iterator2.n()).done) {_context10.next = 69;break;}listItem = _step2.value;
|
|
11401
11401
|
itemCount++;if (!(
|
|
11402
11402
|
itemCount > 50)) {_context10.next = 60;break;}return _context10.abrupt("break", 69);case 60:
|
|
11403
11403
|
|
package/package.json
CHANGED
package/src/store-interface.js
CHANGED
|
@@ -42,5 +42,26 @@ describe('store.getContentList:', async function() {
|
|
|
42
42
|
assert.strictEqual(contentList.items.length, 1, 'retrieved only the item of the content list we asked for')
|
|
43
43
|
|
|
44
44
|
})
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
it('should be able to expand a nested list with expandAllContentLinks', async function () {
|
|
48
|
+
var syncClient = createSyncClient();
|
|
49
|
+
|
|
50
|
+
const contentList = await syncClient.store.getContentList({
|
|
51
|
+
referenceName: 'listwithnestedcontentlink',
|
|
52
|
+
languageCode: languageCode,
|
|
53
|
+
depth: 10,
|
|
54
|
+
take: 50,
|
|
55
|
+
skip: 0,
|
|
56
|
+
expandAllContentLinks: true
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
assert.isAtLeast(contentList.totalCount, 1, 'retrieved the totalCount of the content list we asked for')
|
|
60
|
+
assert.exists(contentList.items, 'retrieved the items of the content list we asked for')
|
|
61
|
+
assert.exists(contentList.items[0].fields, 'retrieved the item of the content list we asked for')
|
|
62
|
+
assert.isAtLeast(contentList.items[0].fields.posts.length, 1, 'expanded the linked cotnent of the posts field')
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
})
|
|
45
66
|
});
|
|
46
67
|
|
|
@@ -15,7 +15,8 @@ function createSyncClient() {
|
|
|
15
15
|
apiKey: apiKeyFetch,
|
|
16
16
|
isPreview: false,
|
|
17
17
|
channels: [ 'website'],
|
|
18
|
-
|
|
18
|
+
languages: ['en-us'],
|
|
19
|
+
baseUrl: "https://api-dev.aglty.io"
|
|
19
20
|
});
|
|
20
21
|
|
|
21
22
|
return syncClient;
|
|
@@ -31,7 +32,8 @@ function createSyncClientUsingConsoleStore() {
|
|
|
31
32
|
store: {
|
|
32
33
|
interface: storeInterfaceConsole,
|
|
33
34
|
options: {}
|
|
34
|
-
}
|
|
35
|
+
},
|
|
36
|
+
baseUrl: "https://api-dev.aglty.io"
|
|
35
37
|
});
|
|
36
38
|
return syncClient;
|
|
37
39
|
}
|
|
@@ -43,7 +45,8 @@ function createPreviewSyncClient() {
|
|
|
43
45
|
apiKey: apiKeyPreview,
|
|
44
46
|
isPreview: true,
|
|
45
47
|
channels: [ 'website'],
|
|
46
|
-
languages: ['en-us']
|
|
48
|
+
languages: ['en-us'],
|
|
49
|
+
baseUrl: "https://api-dev.aglty.io"
|
|
47
50
|
});
|
|
48
51
|
return syncClient;
|
|
49
52
|
}
|