* 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
25 lines
660 B
Ruby
25 lines
660 B
Ruby
Then /^I should see an image in the publisher$/ do
|
|
photo_in_publisher.should be_present
|
|
end
|
|
|
|
Then /^I like the post "([^"]*)"$/ do |post_text|
|
|
like_post(post_text)
|
|
end
|
|
|
|
Then /^"([^"]*)" should be post (\d+)$/ do |post_text, position|
|
|
stream_element_numbers_content(position).text.should == post_text
|
|
end
|
|
|
|
When /^I toggle nsfw posts$/ do
|
|
find(".toggle_nsfw_state", match: :first).click
|
|
end
|
|
|
|
Then /^I should have (\d+) nsfw posts$/ do |num_posts|
|
|
page.should have_css(".nsfw-shield", count: num_posts.to_i)
|
|
end
|
|
|
|
When /^I click the show page link for "([^"]*)"$/ do |post_text|
|
|
within(find_post_by_text(post_text)) do
|
|
find("time").click
|
|
end
|
|
end
|