Changing all statements of form "I fill in " to tabular form, helps when there are multiple such statements consecutively. Changed single statements also for clarity and uniformity

This commit is contained in:
Devendra 2012-08-21 16:41:06 +05:30
parent 845c942385
commit 94fadaebcb
10 changed files with 63 additions and 43 deletions

View file

@ -42,7 +42,8 @@ Feature: invitation acceptance
Given a user with email "bob@bob.bob"
When I sign in as "bob@bob.bob"
And I follow "By email"
And I fill in "email_inviter_emails" with "alex@example.com"
And I fill in the following:
| email_inviter_emails | alex@example.com |
And I press "Send an invitation"
Then I should have 1 Devise email delivery
And I should not see "change your notification settings" in the last sent email

View file

@ -4,7 +4,8 @@ Feature: Change email
Scenario: Change my email
Given I am signed in
When I go to the users edit page
And I fill in "user_email" with "new_email@newplac.es"
And I fill in the following:
| user_email | new_email@newplac.es |
And I press "Change email"
Then I should see "Email changed"
And I follow the "confirm_email" link from the last sent email

View file

@ -15,7 +15,8 @@ Feature: commenting
And I am on "alice@alice.alice"'s page
Then I should see "Look at this dog"
When I focus the comment field
And I fill in "text" with "is that a poodle?"
And I fill in the following:
| text | is that a poodle? |
And I press "Comment"
Then I should see "is that a poodle?" within ".comment"
And I should see "less than a minute ago" within ".comment time"
@ -25,7 +26,8 @@ Feature: commenting
And I am on "alice@alice.alice"'s page
Then I should see "Look at this dog"
When I focus the comment field
And I fill in "text" with "is that a poodle?"
And I fill in the following:
| text | is that a poodle? |
And I press "Comment"
And I wait for the ajax to finish
When I hover over the ".comment"

View file

@ -11,7 +11,8 @@ Feature: following and being followed
When I am on the home page
And I expand the publisher
And I fill in "status_message_fake_text" with "I am following you"
And I fill in the following:
| status_message_fake_text | I am following you |
And I press "Share"
Then I go to the destroy user session page
@ -27,7 +28,8 @@ Feature: following and being followed
Given I sign in as "alice@alice.alice"
And I am on the home page
And I expand the publisher
And I fill in "status_message_fake_text" with "I am ALICE"
And I fill in the following:
| status_message_fake_text | I am ALICE |
And I press the first ".toggle" within "#publisher"
And I press the first ".public" within "#publisher"
And I press "Share"
@ -106,4 +108,4 @@ Feature: following and being followed
And I wait for the ajax to finish
When I go to "bob@bob.bob"'s page
Then I should see "All Aspects" and "Mention" and "Message"
Then I should see "All Aspects" and "Mention" and "Message"

View file

@ -4,13 +4,14 @@ Feature: editing your profile
Given I am signed in
And I go to the edit profile page
When I fill in "profile_gender" with "Fearless"
And I fill in "profile_first_name" with "Boba"
And I fill in "profile_last_name" with "Fett"
And I fill in "profile_bio" with "This is a bio"
When I fill in the following:
| profile_gender | Fearless |
| profile_first_name | Boba |
| profile_last_name | Fett |
| profile_bio | This is a bio |
And I select "1986" from "profile_date_year"
And I select "November" from "profile_date_month"
And I select "30" from "profile_date_day"
And I select "November" from "profile_date_month"
And I press "Update Profile"

View file

@ -62,7 +62,8 @@ Feature: Notifications
When I sign in as "bob@bob.bob"
And I am on "alice@alice.alice"'s page
And I focus the comment field
And I fill in "text" with "great post!"
And I fill in the following:
| text | great post! |
And I press "Comment"
And I wait for the ajax to finish
And I go to the destroy user session page

View file

@ -12,9 +12,9 @@ Feature: oembed
Scenario: Post a secure video link
Given I expand the publisher
When I fill in "status_message_fake_text" with "http://youtube.com/watch?v=M3r2XDceM6A&format=json"
When I fill in the following:
| status_message_fake_text | http://youtube.com/watch?v=M3r2XDceM6A&format=json |
And I press "Share"
And I follow "My Aspects"
Then I should see a video player
And I should see a ".oembed" within ".post-content"
@ -22,36 +22,36 @@ Feature: oembed
Scenario: Post an unsecure video link
Given I expand the publisher
When I fill in "status_message_fake_text" with "http://mytube.com/watch?v=M3r2XDceM6A&format=json"
When I fill in the following:
| status_message_fake_text | http://mytube.com/watch?v=M3r2XDceM6A&format=json |
And I press "Share"
And I wait for the ajax to finish
And I follow "My Aspects"
Then I should not see a video player
And I should see "http://mytube.com/watch?v=M3r2XDceM6A&format=json"
Scenario: Post an unsecure rich-typed link
Given I expand the publisher
When I fill in "status_message_fake_text" with "http://myrichtube.com/watch?v=M3r2XDceM6A&format=json"
When I fill in the following:
| status_message_fake_text | http://myrichtube.com/watch?v=M3r2XDceM6A&format=json |
And I press "Share"
And I follow "My Aspects"
Then I should not see a video player
And I should see "http://myrichtube.com/watch?v=M3r2XDceM6A&format=json"
Scenario: Post a photo link
Given I expand the publisher
When I fill in "status_message_fake_text" with "http://farm4.static.flickr.com/3123/2341623661_7c99f48bbf_m.jpg"
When I fill in the following:
| status_message_fake_text | http://farm4.static.flickr.com/3123/2341623661_7c99f48bbf_m.jpg |
And I press "Share"
And I follow "My Aspects"
Then I should see a "img" within ".stream_element"
Scenario: Post an unsupported text link
Given I expand the publisher
When I fill in "status_message_fake_text" with "http://www.we-do-not-support-oembed.com/index.html"
When I fill in the following:
| status_message_fake_text | http://www.we-do-not-support-oembed.com/index.html |
And I press "Share"
And I follow "My Aspects"
Then I should see "http://www.we-do-not-support-oembed.com/index.html" within ".stream_element"

View file

@ -9,7 +9,8 @@ Feature: viewing the photo lightbox
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 fill in the following:
| status_message_fake_text | Look at this dog |
And I press "Share"
And I wait for the ajax to finish

View file

@ -17,7 +17,8 @@ Feature: posting from the main page
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 yogurt"
When I fill in the following:
| status_message_fake_text | I am eating yogurt |
And I press "Share"
And I wait for the ajax to finish
@ -33,8 +34,9 @@ Feature: posting from the main page
Scenario: post a text-only message to just one aspect
When I select only "PostingTo" aspect
And I expand the publisher
And I fill in "status_message_fake_text" with "I am eating a yogurt"
And I fill in the following:
| status_message_fake_text | I am eating a yogurt |
And I press "Share"
And I wait for the ajax to finish
@ -49,7 +51,8 @@ Feature: posting from the main page
Scenario: post a photo with text
Given I expand the publisher
When 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"
When I fill in the following:
| status_message_fake_text | Look at this dog |
And I press "Share"
And I wait for the ajax to finish
And I go to the aspects page
@ -87,7 +90,8 @@ Feature: posting from the main page
Scenario: back out of uploading a picture to a post with text
Given I expand the publisher
And I have turned off jQuery effects
When I fill in "status_message_fake_text" with "I am eating a yogurt"
When I fill in the following:
| status_message_fake_text | I am eating a yogurt |
And I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload"
And I wait for the ajax to finish
And I click to delete the first uploaded photo
@ -98,7 +102,8 @@ Feature: posting from the main page
Scenario: back out of uploading a picture when another has been attached
Given I expand the publisher
And I have turned off jQuery effects
When I fill in "status_message_fake_text" with "I am eating a yogurt"
When I fill in the following:
| status_message_fake_text | I am eating a yogurt |
And I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload"
And I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload"
And I wait for the ajax to finish
@ -110,7 +115,8 @@ Feature: posting from the main page
@wip
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"
When I fill in the following:
| status_message_fake_text | Here is a post for you to hide |
And I press "Share"
And I wait for the ajax to finish
@ -131,7 +137,8 @@ Feature: posting from the main page
Scenario: delete one of my posts
Given I expand the publisher
When I fill in "status_message_fake_text" with "I am eating a yogurt"
When I fill in the following:
| status_message_fake_text | I am eating a yogurt |
And I press "Share"
And I wait for the ajax to finish
And I go to the aspects page
@ -186,7 +193,8 @@ Feature: posting from the main page
# (NOTE) make this a jasmine spec
Scenario: reject deletion one of my posts
When I expand the publisher
And I fill in "status_message_fake_text" with "I am eating a yogurt"
When I fill in the following:
| status_message_fake_text | I am eating a yogurt |
And I press "Share"
And I wait for the ajax to finish

View file

@ -3,9 +3,10 @@ Feature: new user registration
Background:
When I go to the new user registration page
And I fill in "user_username" with "ohai"
And I fill in "user_email" with "ohai@example.com"
And I fill in "user_password" with "secret"
And I fill in the following:
| user_username | ohai |
| user_email | ohai@example.com |
| user_password | secret |
And I press "Continue"
Then I should be on the getting started page
And I should see "Well, hello there!" and "Who are you?" and "What are you into?"
@ -38,22 +39,24 @@ Feature: new user registration
Scenario: user fills in bogus data - client side validation
When I log out manually
And I go to the new user registration page
And I fill in "user_username" with "§$%&(/&%$&/=)(/"
And I fill in the following:
| user_username | $%&(/&%$&/=)(/ |
And I press "Continue"
Then the "user_username" field should have a validation error
And the "user_email" field should have a validation error
And the "user_password" field should have a validation error
When I fill in "user_username" with "valid_user"
And I fill in "user_email" with "this is not a valid email $%&/()("
When I fill in the following:
| user_username | valid_user |
| user_email | this is not a valid email $%&/()( |
And I press "Continue"
Then the "user_email" field should have a validation error
And the "user_password" field should have a validation error
When I fill in "user_email" with "valid@email.com"
And I fill in "user_password" with "1"
When I fill in the following:
| user_email | valid@email.com |
| user_password | 1 |
And I press "Continue"
Then the "user_password" field should have a validation error
Then the "user_password" field should have a validation error