function setInput(browser, input, type=true) {
    clear(browser);
    if (type) {
        browser
            .useCss()
            .sendKeys("#input-text .cm-content", input)
            .pause(100);
    } else {
        browser.execute(text => {
            window.app.setInput(text);
        }, [input]);
        browser.pause(100);
    }
    expectInput(browser, input);
}
@function
Sets the input to the desired string

@param {Browser} browser - Nightwatch client
@param {string} input - The text to populate the input with
@param {boolean} [type=true] - Whether to type the characters in by using sendKeys,
     or to set the value of the editor directly (useful for special characters)