So the basic problem is I have an protractor test that is failing because the space is missing. If I send "new title" it puts "newtitle" in the field, causing it to fail.
Example code:
it('should allow the description to be editted', function () { element.all(by.css('h4.review__header__item')).then(function (headerItems) { var description = headerItems[1]; expect(description.getText()).toEqual('Short Test Meeting'); browser.actions().mouseMove(description).click(description).perform(); expect(description.getAttribute('contenteditable')).toBeTruthy(); description.clear().sendKeys('Description New').sendKeys(protractor.Key.ENTER); element.all(by.css('h4.review__header__item')).then(function (headerItems) { description = headerItems[1]; expect(description.getText()).toEqual('Description New'); // Check to see if it persists browser.refresh(); element.all(by.css('h4.review__header__item')).then(function (headerItems) { description = headerItems[1]; expect(description.getText()).toEqual('Description New'); }); }); }); }); The Error:
1) Review Meeting Meta Data should allow the description to be editted
Message:
Expected 'DescriptionNew' to equal 'Description New'.
Stack: Error: Failed expectation at /Users/adam/git/mrp-www/e2e/scenarios/reviewScenario.js:18:36 at ManagedPromise.invokeCallback_ (/Users/adam/git/mrp-www/node_modules/selenium-webdriver/lib/promise.js:1379:14) at TaskQueue.execute_ (/Users/adam/git/mrp-www/node_modules/selenium-webdriver/lib/promise.js:2913:14) at TaskQueue.executeNext_ (/Users/adam/git/mrp-www/node_modules/selenium-webdriver/lib/promise.js:2896:21) at asyncRun (/Users/adam/git/mrp-www/node_modules/selenium-webdriver/lib/promise.js:2775:27) at /Users/adam/git/mrp-www/node_modules/selenium-webdriver/lib/promise.js:639:7 at process._tickCallback (internal/process/next_tick.js:103:7)