fix #1396 and add a test for it

This commit is contained in:
Reinier Balt 2013-02-18 17:14:37 +01:00
parent 28bfbe6f1d
commit fe31eb75a5
3 changed files with 28 additions and 3 deletions

View file

@ -90,3 +90,12 @@ end
Then /^the context list badge for ([^"]*) contexts should show (\d+)$/ do |state_name, count|
find("span##{state_name}-contexts-count").text.should == count
end
Then /^I should (see|not see) empty message for (active|hidden) contexts$/ do |visible, state|
box = (state=='active') ? "div#active-contexts-empty-nd" : "div#hidden-contexts-empty-nd"
elem = page.find(box)
elem.should_not be_nil
elem.send(visible=="see" ? "should" : "should_not", be_visible)
end