From ae20d82e1d3a060f0b0c8d204b15c2c2b367b35a Mon Sep 17 00:00:00 2001 From: n1474335 Date: Fri, 30 Aug 2019 15:30:30 +0100 Subject: [PATCH] Fix Nightwatch test --- tests/browser/nightwatch.js | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/tests/browser/nightwatch.js b/tests/browser/nightwatch.js index 8c469791e..8ba7f483c 100644 --- a/tests/browser/nightwatch.js +++ b/tests/browser/nightwatch.js @@ -194,21 +194,13 @@ module.exports = { .click(otherCat) .expect.element(genUUID).to.be.visible; - // Drag and drop op into recipe + // Add op to recipe + /* mouseButtonUp drops wherever the actual cursor is, not necessarily in the right place, + so we can't test Sortable.js properly using Nightwatch. html-dnd doesn't work either. + Instead of relying on drag and drop, we double click on the op to load it. */ browser .getLocationInView(genUUID) .moveToElement(genUUID, 10, 10) - .mouseButtonDown("left") - .pause(100) - .useCss() - .moveToElement("#rec-list", 10, 10) - .waitForElementVisible(".sortable-ghost", 100) - .mouseButtonUp("left") - /* mouseButtonUp drops wherever the actual cursor is, not necessarily in the right place - so we can't test Sortable.js properly using Nightwatch. html-dnd doesn't work either. - Instead of relying on the drop, we double click on the op to load it. */ - .useXpath() - .moveToElement(genUUID, 10, 10) .doubleClick() .useCss() .waitForElementVisible(".operation .op-title", 1000)