Skip to content

Commit 76f34f6

Browse files
test: update live preview HOC tests to verify additional postMessage calls and their counts
1 parent ef5c964 commit 76f34f6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/preview/__test__/contentstack-live-preview-HOC.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ describe("Live Preview HOC init", () => {
105105
expect(livePreviewPostMessageSpy).toHaveBeenCalledTimes(1);
106106
expect(visualBuilderPostMessageSpy).toHaveBeenCalledWith('init', { isSSR: true, href: 'http://localhost:3000/' });
107107
expect(visualBuilderPostMessageSpy).toHaveBeenCalledWith('send-variant-and-locale');
108-
expect(visualBuilderPostMessageSpy).toHaveBeenCalledTimes(2);
108+
expect(visualBuilderPostMessageSpy).toHaveBeenCalledWith('get-highlight-variant-fields-status');
109+
expect(visualBuilderPostMessageSpy).toHaveBeenCalledTimes(3);
109110
});
110111

111112
test("should return the existing live preview instance if it is already initialized", async () => {

0 commit comments

Comments
 (0)