Description
Version
2.5.17-beta.0
Reproduction link
https://jsfiddle.net/tox8hg2h/1/
Steps to reproduce
On a clean install of the dev
branch run npm run test:e2e
.
What is expected?
All tests should pass.
What is actually happening?
A test fails at test\e2e\specs\todomvc.js:124:15
, returning:
Testing if element <.todo:nth-child(1) label> contains text: "edited!". - expected "edited!" but got: "test"
The todomvc.js
spec double clicks the label of an already-completed todo (line 117
), then changes its text (lines 120-121
) and finally blurs the field by clicking something else (line 122
): the footer. But here's the catch: it actually "clicks the in-view centre point" of the footer (according to Nightwatch docs), which is where the 'Active' filter button is rendered (at least when using Chrome, this does not happen in PhantomJS).
As it clicks the 'Active' filter, the just-edited todo is hidden. When the spec then asserts the text of the first visible todo, it does not match its expectations and fails. So the fault lives on line 122: browser.click('footer')
.
A simple solution is simply to click something else, like the '.new-todo' text input. This solves the issue. I will make a PR to fix this.