Skip to content

Commit

Permalink
Fix Nightwatch test
Browse files Browse the repository at this point in the history
  • Loading branch information
n1474335 committed Aug 30, 2019
1 parent 463b2ce commit ae20d82
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions tests/browser/nightwatch.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ae20d82

Please sign in to comment.