Skip to content

Commit f3c6abc

Browse files
test: updated new tab test for ssr reload
1 parent b78db51 commit f3c6abc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/livePreview/eventManager/__test__/postMessageEvent.hooks.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ describe("postMessageEvent.hooks", () => {
159159
(Config.get as any).mockReturnValue(mockConfig);
160160
});
161161

162-
it("should reload window when ssr is true and no event_type", () => {
163-
// Set URL to include live_preview parameter so reload path is taken
164-
mockWindow.location.href = "https://example.com?live_preview=old-hash";
162+
it("should reload window when ssr is true and no event_type and all params present", () => {
163+
// Set URL to include all required params so reload path is taken
164+
mockWindow.location.href = "https://example.com?live_preview=old-hash&content_type_uid=blog&entry_uid=entry-123";
165165

166166
const eventData: OnChangeLivePreviewPostMessageEventData = {
167167
hash: "test-hash",

0 commit comments

Comments
 (0)