This repository was archived by the owner on Mar 4, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -241,7 +241,7 @@ public function mouseUp(WebDriverCoordinates $where = null)
241
241
'parameters ' => ['pointerType ' => 'mouse ' ],
242
242
'actions ' => array_merge ($ moveAction , [
243
243
[
244
- 'type ' => 'pointerDown ' ,
244
+ 'type ' => 'pointerUp ' ,
245
245
'duration ' => 0 ,
246
246
'button ' => 0 ,
247
247
],
Original file line number Diff line number Diff line change @@ -136,6 +136,30 @@ public function testShouldDoubleClickOnElement()
136
136
$ this ->assertContains ('dblclick item-3 ' , $ this ->retrieveLoggedEvents ());
137
137
}
138
138
139
+ /**
140
+ * @covers ::__construct
141
+ * @covers ::dragAndDrop
142
+ * @covers ::perform
143
+ */
144
+ public function testShouldDragAndDrop ()
145
+ {
146
+ if ($ this ->desiredCapabilities ->getBrowserName () === WebDriverBrowserType::HTMLUNIT ) {
147
+ $ this ->markTestSkipped ('Not supported by HtmlUnit browser ' );
148
+ }
149
+
150
+ $ element = $ this ->driver ->findElement (WebDriverBy::id ('item-3 ' ));
151
+ $ target = $ this ->driver ->findElement (WebDriverBy::id ('item-1 ' ));
152
+
153
+ $ this ->driver ->action ()
154
+ ->dragAndDrop ($ element , $ target )
155
+ ->perform ();
156
+
157
+ $ this ->assertContains ('mouseover item-3 ' , $ this ->retrieveLoggedEvents ());
158
+ $ this ->assertContains ('mousedown item-3 ' , $ this ->retrieveLoggedEvents ());
159
+ $ this ->assertContains ('mouseover item-1 ' , $ this ->retrieveLoggedEvents ());
160
+ $ this ->assertContains ('mouseup item-1 ' , $ this ->retrieveLoggedEvents ());
161
+ }
162
+
139
163
/**
140
164
* @return array
141
165
*/
You can’t perform that action at this time.
0 commit comments