@@ -85,4 +85,36 @@ test.describe('Node Right Click Menu', () => {
8585 'right-click-node-widget-converted.png'
8686 )
8787 } )
88+
89+ test ( 'Can pin and unpin' , async ( { comfyPage } ) => {
90+ await comfyPage . rightClickEmptyLatentNode ( )
91+ await expect ( comfyPage . canvas ) . toHaveScreenshot ( 'right-click-node.png' )
92+ await comfyPage . page . click ( '.litemenu-entry:has-text("Pin")' )
93+ await comfyPage . nextFrame ( )
94+ await comfyPage . dragAndDrop ( { x : 621 , y : 617 } , { x : 16 , y : 16 } )
95+ await comfyPage . rightClickEmptyLatentNode ( )
96+ await expect ( comfyPage . canvas ) . toHaveScreenshot (
97+ 'right-click-pinned-node.png'
98+ )
99+ await comfyPage . page . click ( '.litemenu-entry:has-text("Unpin")' )
100+ await comfyPage . nextFrame ( )
101+ await comfyPage . rightClickEmptyLatentNode ( )
102+ await expect ( comfyPage . canvas ) . toHaveScreenshot (
103+ 'right-click-unpinned-node.png'
104+ )
105+ } )
106+
107+ test ( 'Can move after unpin' , async ( { comfyPage } ) => {
108+ await comfyPage . rightClickEmptyLatentNode ( )
109+ await comfyPage . page . click ( '.litemenu-entry:has-text("Pin")' )
110+ await comfyPage . nextFrame ( )
111+ await comfyPage . rightClickEmptyLatentNode ( )
112+ await comfyPage . page . click ( '.litemenu-entry:has-text("Unpin")' )
113+ await comfyPage . nextFrame ( )
114+ await comfyPage . page . waitForTimeout ( 256 )
115+ await comfyPage . dragAndDrop ( { x : 496 , y : 618 } , { x : 200 , y : 590 } )
116+ await expect ( comfyPage . canvas ) . toHaveScreenshot (
117+ 'right-click-unpinned-node-moved.png'
118+ )
119+ } )
88120} )
0 commit comments