Skip to content

Commit 4d56fdf

Browse files
authored
Merge pull request #549 from contentstack/VB-138
Highlight variant changes
2 parents 1654fc9 + 298ad6a commit 4d56fdf

10 files changed

Lines changed: 284 additions & 71 deletions

File tree

src/livePreview/editButton/__test__/editButtonAction.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ describe("cslp tooltip", () => {
598598
});
599599
new LivePreview();
600600

601-
let tooltip = document.querySelector(
601+
const tooltip = document.querySelector(
602602
"[data-test-id='cs-cslp-tooltip']"
603603
);
604604
const tooltipParent = tooltip?.parentNode;

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)