@@ -24,16 +24,56 @@ test.describe('Node Interaction', () => {
2424 await expect ( comfyPage . canvas ) . toHaveScreenshot ( 'dragged-node1.png' )
2525 } )
2626
27- test ( 'Can disconnect/connect edge' , async ( { comfyPage } ) => {
28- await comfyPage . setSetting ( 'Comfy.LinkRelease.Action' , 'no action' )
29- await comfyPage . disconnectEdge ( )
30- await expect ( comfyPage . canvas ) . toHaveScreenshot (
31- 'disconnected-edge-with-menu.png'
32- )
33- await comfyPage . connectEdge ( )
34- // Litegraph renders edge with a slight offset.
35- await expect ( comfyPage . canvas ) . toHaveScreenshot ( 'default.png' , {
36- maxDiffPixels : 50
27+ test . describe ( 'Edge Interaction' , ( ) => {
28+ test . beforeEach ( async ( { comfyPage } ) => {
29+ await comfyPage . setSetting ( 'Comfy.LinkRelease.Action' , 'no action' )
30+ await comfyPage . setSetting ( 'Comfy.LinkRelease.ActionShift' , 'no action' )
31+ } )
32+
33+ test ( 'Can disconnect/connect edge' , async ( { comfyPage } ) => {
34+ await comfyPage . disconnectEdge ( )
35+ await expect ( comfyPage . canvas ) . toHaveScreenshot ( 'disconnected-edge.png' )
36+ await comfyPage . connectEdge ( )
37+ // Litegraph renders edge with a slight offset.
38+ await expect ( comfyPage . canvas ) . toHaveScreenshot ( 'default.png' , {
39+ maxDiffPixels : 50
40+ } )
41+ } )
42+
43+ // Chromium 2x cannot move link.
44+ // See https://github.com/Comfy-Org/ComfyUI_frontend/actions/runs/10876381315/job/30176211513
45+ test . skip ( 'Can move link' , async ( { comfyPage } ) => {
46+ await comfyPage . dragAndDrop (
47+ comfyPage . clipTextEncodeNode1InputSlot ,
48+ comfyPage . emptySpace
49+ )
50+ await expect ( comfyPage . canvas ) . toHaveScreenshot ( 'disconnected-edge.png' )
51+ await comfyPage . dragAndDrop (
52+ comfyPage . clipTextEncodeNode2InputSlot ,
53+ comfyPage . clipTextEncodeNode1InputSlot
54+ )
55+ await expect ( comfyPage . canvas ) . toHaveScreenshot ( 'moved-link.png' )
56+ } )
57+
58+ // Copy link is not working on CI at all
59+ // Chromium 2x recognize it as dragging canvas.
60+ // Chromium triggers search box after link release. The link is indeed copied.
61+ // See https://github.com/Comfy-Org/ComfyUI_frontend/actions/runs/10876381315/job/30176211513
62+ test . skip ( 'Can copy link by shift-drag existing link' , async ( {
63+ comfyPage
64+ } ) => {
65+ await comfyPage . dragAndDrop (
66+ comfyPage . clipTextEncodeNode1InputSlot ,
67+ comfyPage . emptySpace
68+ )
69+ await expect ( comfyPage . canvas ) . toHaveScreenshot ( 'disconnected-edge.png' )
70+ await comfyPage . page . keyboard . down ( 'Shift' )
71+ await comfyPage . dragAndDrop (
72+ comfyPage . clipTextEncodeNode2InputLinkPath ,
73+ comfyPage . clipTextEncodeNode1InputSlot
74+ )
75+ await comfyPage . page . keyboard . up ( 'Shift' )
76+ await expect ( comfyPage . canvas ) . toHaveScreenshot ( 'copied-link.png' )
3777 } )
3878 } )
3979
0 commit comments