diaspora/features/support/application_cuke_helpers.rb
Jonne Haß 300752fc87 bump capybara
* removed wait_until where possible
* replaced wait_until with DOM obersavtions
* added match: :first to all finders that assumed getting the first element
* replaced evaluate_script with execute_script where possible
* replaced a few execute_script with DOM observations through Capybara
* removed sleep where possible
* replaced sleep with DOM obersvations
* replaced "wait for ajax" with DOM obersavations
* replaced alert confirmation with new selenium API
* bump selenium webdriver
* made any other fixes to get green again
2013-07-31 01:47:23 +02:00

20 lines
446 B
Ruby

module ApplicationCukeHelpers
def flash_message_success?
flash_message("notice").visible?
end
def flash_message_failure?
flash_message("error").visible?
end
def flash_message_containing?(text)
flash_message.should have_content(text)
end
def flash_message(selector=".message")
selector = "#flash_#{selector}" unless selector == ".message"
find(selector, match: :first)
end
end
World(ApplicationCukeHelpers)