diff --git a/features/mentions.feature b/features/mentions.feature new file mode 100644 index 0000000000000000000000000000000000000000..3519c94701b899d4ccaa8954de351f5e1c0f3567 --- /dev/null +++ b/features/mentions.feature @@ -0,0 +1,15 @@ +@javascript +Feature: Mentions + As user + I want to mention another user and have a link to them + To show people that this person exsists. + + Scenario: A user mentions another user and it displays correctly + Given a user named "Bob Jones" with email "bob@bob.bob" + And a user named "Alice Smith" with email "alice@alice.alice" + And a user with email "bob@bob.bob" is connected with "alice@alice.alice" + And Alice has a post mentioning Bob + When I sign in as "alice@alice.alice" + And I am on the home page + And I follow "Bob Jones" + Then I should see "Bob Jones" diff --git a/features/step_definitions/mention_steps.rb b/features/step_definitions/mention_steps.rb new file mode 100644 index 0000000000000000000000000000000000000000..67d8c37e275acfb0f92b0e615eb85482eef37f61 --- /dev/null +++ b/features/step_definitions/mention_steps.rb @@ -0,0 +1,11 @@ +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.first + alice.post(:status_message, :text => "@{Bob Jones; #{bob.person.diaspora_handle}}", :to => alice.aspects.first) +end + +When /^I fill in a mention for bob into the publisher$/ do + bob = User.find_by_email 'bob@bob.bob' + And 'I fill in "status_message_fake_text" with "Hi, @{Bob Jones; #{bob.person.diaspora_handle}} long time no see' +end