* 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
20 lines
617 B
Ruby
20 lines
617 B
Ruby
When /^I focus the comment field$/ do
|
|
focus_comment_box
|
|
end
|
|
|
|
Then /^the first comment field should be open/ do
|
|
find("#main_stream .stream_element .new_comment").should be_visible
|
|
end
|
|
|
|
Then /^the first comment field should be closed$/ do
|
|
page.should have_css(".stream_element")
|
|
find("#main_stream .stream_element .new_comment", match: :first, visible: false).should_not be_visible
|
|
end
|
|
|
|
When /^I comment "([^"]*)" on "([^"]*)"$/ do |comment_text, post_text|
|
|
comment_on_post(post_text, comment_text)
|
|
end
|
|
|
|
When /^I make a show page comment "([^"]*)"$/ do |comment_text|
|
|
comment_on_show_page(comment_text)
|
|
end
|