mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-31 05:05:18 +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
|
|
@ -70,13 +70,4 @@ Then /^he should see that a context named "([^\"]*)" (is|is not) present$/ do |c
|
|||
else
|
||||
page.should_not have_selector("div#context_#{context.id} div.context_description a", :visible => true) if context
|
||||
end
|
||||
end
|
||||
|
||||
Then /^I should (see|not see) empty message for (todo|completed todo|deferred todo)s of context/ do |visible, state|
|
||||
css = "error"
|
||||
css = "div#c#{@context.id}-empty-d" if state == "todo"
|
||||
css = "div#completed_container-empty-d" if state == "completed todo"
|
||||
css = "div#deferred_pending_container-empty-d" if state == "deferred todo"
|
||||
|
||||
page.send(visible=="see" ? :should : :should_not, have_css(css, :visible=>true))
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue