@@ -113,6 +113,23 @@ test.describe('Node Interaction', () => {
113113 'text-encode-toggled-back-open.png'
114114 )
115115 } )
116+
117+ test ( 'Can close prompt dialog with canvas click' , async ( { comfyPage } ) => {
118+ await comfyPage . canvas . click ( {
119+ position : {
120+ x : 724 ,
121+ y : 645
122+ }
123+ } )
124+ await expect ( comfyPage . canvas ) . toHaveScreenshot ( 'prompt-dialog-opened.png' )
125+ await comfyPage . canvas . click ( {
126+ position : {
127+ x : 10 ,
128+ y : 10
129+ }
130+ } )
131+ await expect ( comfyPage . canvas ) . toHaveScreenshot ( 'prompt-dialog-closed.png' )
132+ } )
116133} )
117134
118135test . describe ( 'Canvas Interaction' , ( ) => {
@@ -147,6 +164,36 @@ test.describe('Canvas Interaction', () => {
147164 await comfyPage . page . keyboard . up ( 'Shift' )
148165 } )
149166
167+ test ( 'Can zoom in/out after decreasing canvas zoom speed setting' , async ( {
168+ comfyPage
169+ } ) => {
170+ await comfyPage . setSetting ( 'Comfy.Graph.ZoomSpeed' , 1.05 )
171+ await comfyPage . zoom ( - 100 , 4 )
172+ await expect ( comfyPage . canvas ) . toHaveScreenshot (
173+ 'zoomed-in-low-zoom-speed.png'
174+ )
175+ await comfyPage . zoom ( 100 , 8 )
176+ await expect ( comfyPage . canvas ) . toHaveScreenshot (
177+ 'zoomed-out-low-zoom-speed.png'
178+ )
179+ await comfyPage . setSetting ( 'Comfy.Graph.ZoomSpeed' , 1.1 )
180+ } )
181+
182+ test ( 'Can zoom in/out after increasing canvas zoom speed' , async ( {
183+ comfyPage
184+ } ) => {
185+ await comfyPage . setSetting ( 'Comfy.Graph.ZoomSpeed' , 1.5 )
186+ await comfyPage . zoom ( - 100 , 4 )
187+ await expect ( comfyPage . canvas ) . toHaveScreenshot (
188+ 'zoomed-in-high-zoom-speed.png'
189+ )
190+ await comfyPage . zoom ( 100 , 8 )
191+ await expect ( comfyPage . canvas ) . toHaveScreenshot (
192+ 'zoomed-out-high-zoom-speed.png'
193+ )
194+ await comfyPage . setSetting ( 'Comfy.Graph.ZoomSpeed' , 1.1 )
195+ } )
196+
150197 test ( 'Can pan' , async ( { comfyPage } ) => {
151198 await comfyPage . pan ( { x : 200 , y : 200 } )
152199 await expect ( comfyPage . canvas ) . toHaveScreenshot ( 'panned.png' )
0 commit comments