tastejs / todomvc

Helping you select an MV* framework - Todo apps for React.js, Ember.js, Angular, and many more
http://todomvc.com
Other
28.62k stars 13.78k forks source link

Tests miss the lack of focus :) #1560

Closed dmitriz closed 8 years ago

dmitriz commented 8 years ago

This fork has disabled focus on double-click to demonstrate that the tests do not catch the lack of focus:

npm run test -- --framework=angularjs-perf

https://github.com/dmitriz/todomvc/tree/tests-miss-focus-failure

samccone commented 8 years ago

good catch @dmitriz

https://github.com/tastejs/todomvc/blob/master/app-spec.md#editing

When editing mode is activated it will hide the other controls and bring forward an input that contains the todo title, which should be focused (.focus())

:pencil2:

there is no test at all for this... should be fairly simple to add this one :)

dmitriz commented 8 years ago

Doesn't look quite that obvious tho.

https://github.com/tastejs/todomvc/blob/master/tests/test.js#L92

uses

testOps.assertFocussedElementId('new-todo');

but we don't have the Id for the double-clicked element, so looks like changes are needed in several places. Or not?