Skip to content

Commit 28ea4b2

Browse files
Merge pull request #533 from contentstack/VB-138+sync-dev
Add support for Variant highlights
2 parents 78efa76 + 298ad6a commit 28ea4b2

9 files changed

Lines changed: 277 additions & 69 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ ContentstackLivePreview.init({
5151

5252
MIT License
5353

54-
Copyright © 2021-2025 [Contentstack](https://www.contentstack.com/). All Rights Reserved
54+
Copyright © 2021-2026 [Contentstack](https://www.contentstack.com/). All Rights Reserved
5555

5656
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5757

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)