Refactor posts.feature, take out Scenario Outlines which seemed to causing issues on some systems
This commit is contained in:
parent
d646428a5e
commit
4ac6bd7d85
2 changed files with 92 additions and 71 deletions
53
features/mentions_from_profile_page.feature
Normal file
53
features/mentions_from_profile_page.feature
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
@javascript
|
||||
Feature: mentioning a contact from their profile page
|
||||
In order to enlighten humanity for the good of society
|
||||
As a rock star
|
||||
I want to mention someone I think is cool
|
||||
|
||||
Background:
|
||||
Given I am on the home page
|
||||
And a user with username "bob"
|
||||
And a user with username "alice"
|
||||
|
||||
When I sign in as "bob@bob.bob"
|
||||
And a user with username "bob" is connected with "alice"
|
||||
And I have an aspect called "PostTo"
|
||||
And I have an aspect called "DidntPostTo"
|
||||
And I have user with username "alice" in an aspect called "PostTo"
|
||||
And I have user with username "alice" in an aspect called "DidntPostTo"
|
||||
|
||||
And I am on the home page
|
||||
|
||||
Scenario: mentioning while posting to all aspects
|
||||
Given I am on "alice@alice.alice"'s page
|
||||
And I have turned off jQuery effects
|
||||
And I click "Mention" button
|
||||
And I expand the publisher in the modal window
|
||||
And I append "I am eating a yogurt" to the publisher
|
||||
And I press "Share" in the modal window
|
||||
|
||||
When I am on the aspects page
|
||||
And I follow "PostTo" within "#aspect_nav"
|
||||
Then I should see "I am eating a yogurt"
|
||||
|
||||
When I am on the aspects page
|
||||
And I follow "DidntPostTo" within "#aspect_nav"
|
||||
Then I should see "I am eating a yogurt"
|
||||
|
||||
Scenario: mentioning while posting to just one aspect
|
||||
Given I am on "alice@alice.alice"'s page
|
||||
And I have turned off jQuery effects
|
||||
And I click "Mention" button
|
||||
And I expand the publisher in the modal window
|
||||
And I append "I am eating a yogurt" to the publisher
|
||||
And I press the aspect dropdown in the modal window
|
||||
And I toggle the aspect "DidntPostTo" in the modal window
|
||||
And I press "Share" in the modal window
|
||||
|
||||
When I am on the aspects page
|
||||
And I follow "PostTo" within "#aspect_nav"
|
||||
Then I should see "I am eating a yogurt"
|
||||
|
||||
When I am on the aspects page
|
||||
And I follow "DidntPostTo" within "#aspect_nav"
|
||||
Then I should not see "I am eating a yogurt"
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
@javascript
|
||||
Feature: posting
|
||||
Feature: posting from the main page
|
||||
In order to enlighten humanity for the good of society
|
||||
As a rock star
|
||||
I want to tell the world I am eating a yogurt
|
||||
|
|
@ -18,13 +18,44 @@ Feature: posting
|
|||
|
||||
And I am on the home page
|
||||
|
||||
Scenario: post to all aspects
|
||||
Scenario: post a text-only message to all aspects
|
||||
Given I expand the publisher
|
||||
When I fill in "status_message_fake_text" with "I am eating a yogurt"
|
||||
And I press "Share"
|
||||
And I follow "Your Aspects"
|
||||
Then I should see "I am eating a yogurt" within ".stream_element"
|
||||
|
||||
Scenario: post a text-only message to just one aspect
|
||||
When I follow "PostTo"
|
||||
And I wait for the ajax to finish
|
||||
And I expand the publisher
|
||||
And I fill in "status_message_fake_text" with "I am eating a yogurt"
|
||||
And I press "Share"
|
||||
And I wait for the ajax to finish
|
||||
|
||||
When I am on the aspects page
|
||||
And I follow "PostTo" within "#aspect_nav"
|
||||
Then I should see "I am eating a yogurt"
|
||||
|
||||
When I am on the aspects page
|
||||
And I follow "DidntPostTo" within "#aspect_nav"
|
||||
Then I should not see "I am eating a yogurt"
|
||||
|
||||
Scenario: post a photo with text
|
||||
Given I expand the publisher
|
||||
And I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload"
|
||||
And I fill in "status_message_fake_text" with "Look at this dog"
|
||||
And I press "Share"
|
||||
And I wait for the ajax to finish
|
||||
And I follow "Your Aspects"
|
||||
Then I should see a "img" within ".stream_element div.photo_attachments"
|
||||
And I should see "Look at this dog" within ".stream_element"
|
||||
Then I log out
|
||||
And I sign in as "alice@alice.alice"
|
||||
And I go to "bob@bob.bob"'s page
|
||||
Then I should see a "img" within ".stream_element div.photo_attachments"
|
||||
And I should see "Look at this dog" within ".stream_element"
|
||||
|
||||
Scenario: post a photo without text
|
||||
Given I expand the publisher
|
||||
And I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload"
|
||||
|
|
@ -72,22 +103,7 @@ Feature: posting
|
|||
Then I should see an uploaded image within the photo drop zone
|
||||
And the publisher should be expanded
|
||||
|
||||
Scenario: post a photo with text
|
||||
Given I expand the publisher
|
||||
And I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload"
|
||||
And I fill in "status_message_fake_text" with "Look at this dog"
|
||||
And I press "Share"
|
||||
And I wait for the ajax to finish
|
||||
And I follow "Your Aspects"
|
||||
Then I should see a "img" within ".stream_element div.photo_attachments"
|
||||
And I should see "Look at this dog" within ".stream_element"
|
||||
Then I log out
|
||||
And I sign in as "alice@alice.alice"
|
||||
And I go to "bob@bob.bob"'s page
|
||||
Then I should see a "img" within ".stream_element div.photo_attachments"
|
||||
And I should see "Look at this dog" within ".stream_element"
|
||||
|
||||
Scenario: hide a post
|
||||
Scenario: hide a contact's post
|
||||
Given I expand the publisher
|
||||
When I fill in "status_message_fake_text" with "Here is a post for you to hide"
|
||||
And I press "Share"
|
||||
|
|
@ -106,64 +122,16 @@ Feature: posting
|
|||
And I am on the aspects page
|
||||
Then I should not see "Here is a post for you to hide"
|
||||
|
||||
Scenario: delete a post
|
||||
Given I expand the publisher
|
||||
When I fill in "status_message_fake_text" with "I am eating a yogurt"
|
||||
Scenario: delete one of my posts
|
||||
When I expand the publisher
|
||||
And I fill in "status_message_fake_text" with "I am eating a yogurt"
|
||||
And I press "Share"
|
||||
And I wait for the ajax to finish
|
||||
And I follow "Your Aspects"
|
||||
|
||||
When I follow "Your Aspects"
|
||||
And I hover over the ".stream_element"
|
||||
And I preemptively confirm the alert
|
||||
And I click to delete the first post
|
||||
And I wait for the ajax to finish
|
||||
And I follow "Your Aspects"
|
||||
Then I should not see "I am eating a yogurt"
|
||||
|
||||
Scenario Outline: post to one aspect
|
||||
When I follow "PostTo"
|
||||
And I wait for the ajax to finish
|
||||
And I expand the publisher
|
||||
And I fill in "status_message_fake_text" with "I am eating a yogurt"
|
||||
And I press "Share"
|
||||
And I am on the aspects page
|
||||
And I follow "<aspect>" within "#aspect_nav"
|
||||
Then I should <see> "I am eating a yogurt"
|
||||
|
||||
Examples:
|
||||
| aspect | see |
|
||||
| PostTo | see |
|
||||
| DidntPostTo | not see |
|
||||
|
||||
Scenario Outline: posting to all aspects from the profile page
|
||||
Given I am on "alice@alice.alice"'s page
|
||||
And I have turned off jQuery effects
|
||||
And I click "Mention" button
|
||||
And I expand the publisher in the modal window
|
||||
And I append "I am eating a yogurt" to the publisher
|
||||
And I press "Share" in the modal window
|
||||
And I am on the aspects page
|
||||
And I follow "<aspect>" within "#aspect_nav"
|
||||
Then I should <see> "I am eating a yogurt"
|
||||
|
||||
Examples:
|
||||
| aspect | see |
|
||||
| PostTo | see |
|
||||
| DidntPostTo | see |
|
||||
|
||||
Scenario Outline: posting to one aspect from the profile page
|
||||
Given I am on "alice@alice.alice"'s page
|
||||
And I have turned off jQuery effects
|
||||
And I click "Mention" button
|
||||
And I expand the publisher in the modal window
|
||||
And I append "I am eating a yogurt" to the publisher
|
||||
And I press the aspect dropdown in the modal window
|
||||
And I toggle the aspect "DidntPostTo" in the modal window
|
||||
And I press "Share" in the modal window
|
||||
And I am on the aspects page
|
||||
And I follow "<aspect>" within "#aspect_nav"
|
||||
Then I should <see> "I am eating a yogurt"
|
||||
|
||||
Examples:
|
||||
| aspect | see |
|
||||
| PostTo | see |
|
||||
| DidntPostTo | not see |
|
||||
Loading…
Reference in a new issue