|
|
|
@ -209,15 +209,27 @@ describe("SplitGridNode", () => { |
|
|
|
expect(screen.queryByTestId("split-grid-settings-modal")).not.toBeInTheDocument(); |
|
|
|
}); |
|
|
|
|
|
|
|
it("should auto-open settings when not configured and no child nodes", () => { |
|
|
|
it("should auto-open settings for a freshly created split grid node", () => { |
|
|
|
render( |
|
|
|
<TestWrapper> |
|
|
|
<SplitGridNode {...createNodeProps({ isConfigured: false, childNodeIds: [] })} /> |
|
|
|
<SplitGridNode {...createNodeProps({ shouldOpenSettingsOnCreate: true })} /> |
|
|
|
</TestWrapper> |
|
|
|
); |
|
|
|
|
|
|
|
// Modal should be open automatically
|
|
|
|
expect(screen.getByTestId("split-grid-settings-modal")).toBeInTheDocument(); |
|
|
|
expect(mockUpdateNodeData).toHaveBeenCalledWith("split-grid-node-1", { |
|
|
|
shouldOpenSettingsOnCreate: false, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
it("should not auto-open settings for loaded unconfigured split grid nodes", () => { |
|
|
|
render( |
|
|
|
<TestWrapper> |
|
|
|
<SplitGridNode {...createNodeProps({ isConfigured: false, childNodeIds: [] })} /> |
|
|
|
</TestWrapper> |
|
|
|
); |
|
|
|
|
|
|
|
expect(screen.queryByTestId("split-grid-settings-modal")).not.toBeInTheDocument(); |
|
|
|
}); |
|
|
|
|
|
|
|
it("should not auto-open settings when already configured", () => { |
|
|
|
|