webdriverio-boneyard / wdio-sync

A WebdriverIO v4 plugin. Helper module to run WebdriverIO commands synchronously.
http://v4.webdriver.io
MIT License
17 stars 31 forks source link

Async custom commands don't work #16

Closed christian-bromann closed 7 years ago

christian-bromann commented 8 years ago

See webdriverio/wdio-mocha-framework#6 Example:

        // ...but this fails with `AssertionError: expected 0 to be above 990` (i.e. it doesn't wait):
        browser.addCommand('customWrapWdio', function async (a) {
            return browser.customWdio(a)
            .then((b) => {
                return b + 1
            })
        })
georgecrawford commented 8 years ago

Added a failing test case for this in https://github.com/webdriverio/wdio-mocha-framework/pull/7