refactor done todos view and tests

This commit is contained in:
Reinier Balt 2013-03-18 12:24:42 +01:00
parent aac744e411
commit 85fc82d494
16 changed files with 141 additions and 116 deletions

View file

@ -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