File tree Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -113,11 +113,23 @@ def source
113113 end
114114
115115 def drag ( node , other )
116- raise NotImplementedError
116+ x1 , y1 = node . find_position
117+ x2 , y2 = other . find_position
118+
119+ mouse . move ( x : x1 , y : y1 )
120+ mouse . down
121+ mouse . move ( x : x2 , y : y2 )
122+ mouse . up
117123 end
118124
119125 def drag_by ( node , x , y )
120- raise NotImplementedError
126+ x1 , y1 = node . find_position
127+ x2 , y2 = x1 + x , y1 + y
128+
129+ mouse . move ( x : x1 , y : y1 )
130+ mouse . down
131+ mouse . move ( x : x2 , y : y2 )
132+ mouse . up
121133 end
122134
123135 def select_file ( node , value )
Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ def hover
160160 end
161161
162162 def drag_to ( other )
163- command ( :drag , other )
163+ command ( :drag , other . node )
164164 end
165165
166166 def drag_by ( x , y )
Original file line number Diff line number Diff line change 575575 end
576576 end
577577
578- context "dragging support" , skip : true do
578+ context "dragging support" do
579579 before do
580580 @session . visit "/cuprite/drag"
581581 end
You can’t perform that action at this time.
0 commit comments