diff --git a/test/assets/drag-n-drop.html b/test/assets/drag-n-drop.html new file mode 100644 index 0000000000..8cc03a5656 --- /dev/null +++ b/test/assets/drag-n-drop.html @@ -0,0 +1,51 @@ + + +Examples of DataTransfer's setData(), getData() and clearData() + + + + + +

Examples of DataTransfer: setData(), getData(), clearData()

+
+

+ Select this element, drag it to the Drop Zone and then release the selection to move the element.

+
+
Drop Zone
+ + diff --git a/test/mouse.spec.js b/test/mouse.spec.js index 4fc86adec6..28256de345 100644 --- a/test/mouse.spec.js +++ b/test/mouse.spec.js @@ -149,5 +149,15 @@ module.exports.describe = function({testRunner, expect, FFOX, CHROMIUM, WEBKIT, expect(await page.evaluate('result')).toEqual({x: 30, y: 40}); await context.close(); }); + describe('Drag and Drop', function() { + xit('should work', async({server, page}) => { + await page.goto(server.PREFIX + '/drag-n-drop.html'); + await page.hover('#source'); + await page.mouse.down(); + await page.hover('#target'); + await page.mouse.up(); + expect(await page.$eval('#target', target => target.contains(document.querySelector('#source')))).toBe(true, 'could not find source in target'); + }) + }); }); };