diaspora/features/reshare.feature
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

48 lines
1.8 KiB
Gherkin

@javascript
Feature: public repost
In order to make Diaspora more viral
As a User
I want to reshare my friend's post
Background:
Given following users exist:
| username | email |
| Bob Jones | bob@bob.bob |
| Alice Smith | alice@alice.alice |
| Eve Doe | eve@eve.eve |
And a user with email "bob@bob.bob" is connected with "alice@alice.alice"
Scenario: Resharing a post from a single post page
Given "bob@bob.bob" has a public post with text "reshare this!"
And I sign in as "alice@alice.alice"
And I am on "bob@bob.bob"'s page
And I follow "Last Post"
And I click on selector "a.reshare"
And I confirm the alert
Then I should see a flash message indicating success
And I should see a flash message containing "successfully"
Scenario: Resharing a post from a single post page that is reshared
Given "bob@bob.bob" has a public post with text "reshare this!"
And the post with text "reshare this!" is reshared by "eve@eve.eve"
And I sign in as "alice@alice.alice"
And I am on "bob@bob.bob"'s page
And I follow "Last Post"
And I click on selector "a.reshare"
And I confirm the alert
Then I should see a flash message indicating success
And I should see a flash message containing "successfully"
# should be covered in rspec, so testing that the post is added to
# app.stream in jasmine should be enough coverage
Scenario: When I reshare, it shows up on my profile page
Given "bob@bob.bob" has a public post with text "reshare this!"
And I sign in as "alice@alice.alice"
And I follow "Reshare"
And I confirm the alert
Then I should see a flash message indicating success
And I should see a flash message containing "successfully"
And I should not see a ".reshare" within ".feedback"