Skip to content

Commit 79b17d6

Browse files
committed
chore: fix tests
1 parent 7d01d75 commit 79b17d6

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

packages/decap-cms-backend-github/src/implementation.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ export default class GitHub implements Implementation {
425425
const repoURL = this.api!.originRepoURL;
426426
const page = options?.page ?? 1;
427427
const pageSize = options?.pageSize ?? 20;
428-
const usePagination = options?.pagination ?? false;
428+
const usePagination = options?.pagination ?? true;
429429

430430
let cursor: Cursor;
431431

packages/decap-cms-backend-test/src/implementation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ export default class TestBackend implements Implementation {
223223
}));
224224
const pageSize = options?.pageSize ?? DEFAULT_PAGE_SIZE;
225225
const page = options?.page ?? 1;
226-
const usePagination = options?.pagination ?? false;
226+
const usePagination = options?.pagination ?? true;
227227

228228
const cursor = getCursor(folder, extension, entries, page - 1, depth, pageSize);
229229

packages/decap-cms-core/src/components/Collection/Entries/__tests__/__snapshots__/EntriesCollection.spec.js.snap

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ exports[`EntriesCollection should render connected component 1`] = `
55
<mock-entries
66
collectionname="Pages"
77
collections="Map { \\"name\\": \\"pages\\", \\"label\\": \\"Pages\\", \\"folder\\": \\"src/pages\\" }"
8+
currentpage="1"
89
cursor="[object Object]"
910
entries="List [ Map { \\"slug\\": \\"index\\", \\"path\\": \\"src/pages/index.md\\", \\"data\\": Map { \\"title\\": \\"Root\\" } }, Map { \\"slug\\": \\"dir1/index\\", \\"path\\": \\"src/pages/dir1/index.md\\", \\"data\\": Map { \\"title\\": \\"File 1\\" } }, Map { \\"slug\\": \\"dir2/index\\", \\"path\\": \\"src/pages/dir2/index.md\\", \\"data\\": Map { \\"title\\": \\"File 2\\" } } ]"
11+
pagesize="100"
12+
totalcount="0"
1013
/>
1114
</DocumentFragment>
1215
`;
@@ -16,8 +19,11 @@ exports[`EntriesCollection should render show only immediate children for nested
1619
<mock-entries
1720
collectionname="Pages"
1821
collections="Map { \\"name\\": \\"pages\\", \\"label\\": \\"Pages\\", \\"folder\\": \\"src/pages\\", \\"nested\\": Map { \\"depth\\": 10, \\"subfolders\\": false } }"
22+
currentpage="1"
1923
cursor="[object Object]"
2024
entries="List [ Map { \\"slug\\": \\"index\\", \\"path\\": \\"src/pages/index.md\\", \\"data\\": Map { \\"title\\": \\"Root\\" } } ]"
25+
pagesize="100"
26+
totalcount="0"
2127
/>
2228
</DocumentFragment>
2329
`;
@@ -27,9 +33,12 @@ exports[`EntriesCollection should render with applied filter term for nested col
2733
<mock-entries
2834
collectionname="Pages"
2935
collections="Map { \\"name\\": \\"pages\\", \\"label\\": \\"Pages\\", \\"folder\\": \\"src/pages\\", \\"nested\\": Map { \\"depth\\": 10, \\"subfolders\\": false } }"
36+
currentpage="1"
3037
cursor="[object Object]"
3138
entries="List [ Map { \\"slug\\": \\"dir3/dir4/index\\", \\"path\\": \\"src/pages/dir3/dir4/index.md\\", \\"data\\": Map { \\"title\\": \\"File 4\\" } } ]"
3239
filterterm="dir3/dir4"
40+
pagesize="100"
41+
totalcount="0"
3342
/>
3443
</DocumentFragment>
3544
`;

0 commit comments

Comments
 (0)