diaspora/features/step_definitions/mention_steps.rb
2014-04-21 21:01:27 +02:00

15 lines
600 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'
write_in_publisher("@{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