Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

fix failing test in usePropsLogic

Oleg Isonen8bbf22c8030b
diff --git a/app/designer/features/props-panel/use-props-logic.test.ts b/app/designer/features/props-panel/use-props-logic.test.ts
index efe3a3ccb8..be34377f19 100644
--- a/app/designer/features/props-panel/use-props-logic.test.ts
+++ b/app/designer/features/props-panel/use-props-logic.test.ts
@@ -46,14 +46,13 @@ describe("usePropsLogic", () => {
);
const { result: res2 } = renderHook(() =>
usePropsLogic({
- selectedInstanceData: getSelectedInstanceData("Button", []),
+ selectedInstanceData: getSelectedInstanceData("Button", [
+ { id: "1", prop: "type", value: "button" },
+ ]),
publish: jest.fn(),
})
);
- expect(res1.current.userProps[0]).not.toMatchObject({
- prop: "type",
- value: "button",
- });
+ expect(res1.current.userProps[0]).toBeUndefined();
expect(res2.current.userProps[0]).toMatchObject({
prop: "type",
value: "button",