another attempt at #1150 and fix some failing cucumber scenarios

This commit is contained in:
Reinier Balt 2011-04-19 16:40:55 +02:00
parent 539e18d87e
commit cb58318858
11 changed files with 82 additions and 86 deletions

View file

@ -1,8 +1,13 @@
Then /^I should not see the context "([^"]*)"$/ do |context_name|
context = @current_user.contexts.find_by_name(context_name)
context.should_not be_nil
wait_for :timeout => 5 do
!selenium.is_visible("xpath=//div[@id='c#{context.id}']")
xpath = "//div[@id='c#{context.id}']"
if selenium.is_element_present(xpath) # only check visibility if it is present
wait_for :timeout => 5 do
!selenium.is_visible("xpath=#{xpath}")
end
end
end