add tests for toggling visibility of collapsed contexts

This commit is contained in:
Reinier Balt 2011-09-10 00:51:39 +02:00
parent 30c2fb8b82
commit cdff38995c
5 changed files with 127 additions and 5 deletions

View file

@ -1,3 +1,17 @@
When /^I collapse the context container of "([^"]*)"$/ do |context_name|
context = @current_user.contexts.find_by_name(context_name)
context.should_not be_nil
xpath = "//a[@id='toggle_c#{context.id}']"
selenium.is_visible(xpath).should be_true
selenium.click(xpath)
end
When /^I toggle all collapsed context containers$/ do
click_link 'Toggle collapsed contexts'
end
####### Context #######
Then /^I should not see the context "([^"]*)"$/ do |context_name|
@ -17,6 +31,10 @@ Then /^I should not see the container for context "([^"]*)"$/ do |context_name|
Then "I should not see the context \"#{context_name}\""
end
Then /^I should not see the context container for "([^"]*)"$/ do |context_name|
Then "I should not see the context \"#{context_name}\""
end
Then /^the container for the context "([^"]*)" should not be visible$/ do |context_name|
Then "I should not see the context \"#{context_name}\""
end