add feature for mentions
This commit is contained in:
parent
272ab55482
commit
27864660f9
2 changed files with 26 additions and 0 deletions
15
features/mentions.feature
Normal file
15
features/mentions.feature
Normal file
|
|
@ -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"
|
||||
11
features/step_definitions/mention_steps.rb
Normal file
11
features/step_definitions/mention_steps.rb
Normal file
|
|
@ -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
|
||||
Loading…
Reference in a new issue