From aa26f193525a3cca83dda0598ba452558a96ba1c Mon Sep 17 00:00:00 2001 From: pythongosssss <125205205+pythongosssss@users.noreply.github.com> Date: Thu, 29 Aug 2024 20:00:18 +0100 Subject: [PATCH] Add test --- tests-ui/tests/widgetInputs.test.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests-ui/tests/widgetInputs.test.ts b/tests-ui/tests/widgetInputs.test.ts index 621463163..22b2c5435 100644 --- a/tests-ui/tests/widgetInputs.test.ts +++ b/tests-ui/tests/widgetInputs.test.ts @@ -622,5 +622,21 @@ describe('widget inputs', () => { }) }) }) + it('primitive maintains size on reload', async () => { + const { ez, graph } = await start() + const primitive = ez.PrimitiveNode() + const image = ez.EmptyImage() + + image.widgets.width.convertToInput() + primitive.outputs[0].connectTo(image.inputs.width) + + primitive.node.size = [999, 999] + + await checkBeforeAndAfterReload(graph, async (r) => { + const { node } = graph.find(primitive) + expect(node.size[0]).toBe(999) + expect(node.size[1]).toBe(999) + }) + }) }) })