mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-05 20:40:14 +01:00
refactor done todos view and tests
This commit is contained in:
parent
aac744e411
commit
85fc82d494
16 changed files with 141 additions and 116 deletions
|
|
@ -152,19 +152,14 @@ Then /^I should see "([^"]*)" in the completed section of the mobile site$/ do |
|
|||
page.should have_xpath(xpath)
|
||||
end
|
||||
|
||||
Then /^I should (see|not see) empty message for (completed todos|todos) of home/ do |visible, kind_of_todo|
|
||||
elem = find(kind_of_todo=="todos" ? "div#no_todos_in_view" : "div#completed_container-empty-d")
|
||||
elem.send(visible=="see" ? "should" : "should_not", be_visible)
|
||||
end
|
||||
|
||||
Then /^I should (see|not see) the empty tickler message$/ do |see|
|
||||
elem = find("div#no_todos_in_view")
|
||||
elem.send(see=="see" ? "should" : "should_not", be_visible)
|
||||
end
|
||||
|
||||
Then /^I should (see|not see) the notes of "([^"]*)"$/ do |visible, todo_description|
|
||||
todo = @current_user.todos.where(:description => todo_description).first
|
||||
todo.should_not be_nil
|
||||
|
||||
page.find("div#notes_todo_#{todo.id}").send(visible=="see" ? "should" : "should_not", be_visible)
|
||||
end
|
||||
|
||||
Then /^I should (see|not see) the empty tickler message$/ do |see|
|
||||
elem = find("div#no_todos_in_view")
|
||||
elem.send(see=="see" ? "should" : "should_not", be_visible)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue