Commit f79687ea authored by Annabel Dunstone's avatar Annabel Dunstone

Clear .todo listener

parent 0591a782
...@@ -6,6 +6,7 @@ class @Todos ...@@ -6,6 +6,7 @@ class @Todos
clearListeners: -> clearListeners: ->
$('.done-todo').off('click') $('.done-todo').off('click')
$('.js-todos-mark-all').off('click') $('.js-todos-mark-all').off('click')
$('.todo').off('click')
initBtnListeners: -> initBtnListeners: ->
$('.done-todo').on('click', @doneClicked) $('.done-todo').on('click', @doneClicked)
......
...@@ -89,7 +89,7 @@ class Spinach::Features::DashboardTodos < Spinach::FeatureSteps ...@@ -89,7 +89,7 @@ class Spinach::Features::DashboardTodos < Spinach::FeatureSteps
end end
step 'I click on the todo' do step 'I click on the todo' do
execute_script("$('.todo:nth-child(1)').click()") find('.todo:nth-child(1)').click
end end
step 'I should be directed to the corresponding page' do step 'I should be directed to the corresponding page' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment