Skip to content

Commit 461a634

Browse files
committed
test back mock soft / hard limit
1 parent 18fa349 commit 461a634

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

playwright/tests/changes/changes.spec.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,14 @@ test("I have to confirm the push when I reach a soft limit of deleted documents"
141141
reusablePageType,
142142
slice,
143143
}) => {
144+
procedures.mock("getState", ({ data }) => ({
145+
...(data as Record<string, unknown>),
146+
libraries: generateLibraries({ slicesCount: 0 }),
147+
customTypes: generateTypes({ typesCount: 1 }),
148+
remoteCustomTypes: [],
149+
remoteSlices: [],
150+
clientError: undefined,
151+
}));
144152
procedures.mock(
145153
"prismicRepository.pushChanges",
146154
() => ({
@@ -177,6 +185,14 @@ test("I cannot push the changes when I reach a hard limit of deleted documents",
177185
reusablePageType,
178186
slice,
179187
}) => {
188+
procedures.mock("getState", ({ data }) => ({
189+
...(data as Record<string, unknown>),
190+
libraries: generateLibraries({ slicesCount: 0 }),
191+
customTypes: generateTypes({ typesCount: 1 }),
192+
remoteCustomTypes: [],
193+
remoteSlices: [],
194+
clientError: undefined,
195+
}));
180196
procedures.mock(
181197
"prismicRepository.pushChanges",
182198
() => ({

0 commit comments

Comments
 (0)