diaspora/features/step_definitions/mention_steps.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

15 lines
625 B
Ruby

And /^Alice has a post mentioning Bob$/ do
alice = User.find_by_email 'alice@alice.alice'
bob = User.find_by_email 'bob@bob.bob'
aspect = alice.aspects.where(:name => "Besties").first
alice.post(:status_message, :text => "@{Bob Jones; #{bob.person.diaspora_handle}}", :to => aspect)
end
And /^I mention Alice in the publisher$/ do
alice = User.find_by_email 'alice@alice.alice'
fill_in 'status_message_fake_text', :with => "@{Alice Smith ; #{alice.person.diaspora_handle}}"
end
And /^I click on the first user in the mentions dropdown list$/ do
find('.mentions-autocomplete-list li', match: :first).click
end