Merge pull request #5185 from goobertron/mobile_features
Add sign-up tests for mobile version
This commit is contained in:
commit
62ce1c3a43
12 changed files with 83 additions and 33 deletions
|
|
@ -23,6 +23,7 @@ The default for including jQuery from a CDN has changed. If you want to continue
|
||||||
* Port testsuite to RSpec 3 [#5170](https://github.com/diaspora/diaspora/pull/5170)
|
* Port testsuite to RSpec 3 [#5170](https://github.com/diaspora/diaspora/pull/5170)
|
||||||
* Port tag stream to Bootstrap [#5138](https://github.com/diaspora/diaspora/pull/5138)
|
* Port tag stream to Bootstrap [#5138](https://github.com/diaspora/diaspora/pull/5138)
|
||||||
* Consolidate migrations, if you need a migration prior 2013, checkout the latest release in the 0.4.x series first [#5173](https://github.com/diaspora/diaspora/pull/5173)
|
* Consolidate migrations, if you need a migration prior 2013, checkout the latest release in the 0.4.x series first [#5173](https://github.com/diaspora/diaspora/pull/5173)
|
||||||
|
* Add tests for mobile sign up [#5185](https://github.com/diaspora/diaspora/pull/5185)
|
||||||
|
|
||||||
## Bug fixes
|
## Bug fixes
|
||||||
* orca cannot see 'Add Contact' button [#5158](https://github.com/diaspora/diaspora/pull/5158)
|
* orca cannot see 'Add Contact' button [#5158](https://github.com/diaspora/diaspora/pull/5158)
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ Feature: new user registration
|
||||||
Background:
|
Background:
|
||||||
When I go to the new user registration page
|
When I go to the new user registration page
|
||||||
And I fill in the new user form
|
And I fill in the new user form
|
||||||
And I press "Continue"
|
And I submit the form
|
||||||
Then I should be on the getting started page
|
Then I should be on the getting started page
|
||||||
Then I should see the 'getting started' contents
|
Then I should see the 'getting started' contents
|
||||||
|
|
||||||
|
|
@ -22,7 +22,6 @@ Feature: new user registration
|
||||||
And I focus the "follow_tags" field
|
And I focus the "follow_tags" field
|
||||||
Then I should see a flash message containing "Hey, <script>alert(0)//!"
|
Then I should see a flash message containing "Hey, <script>alert(0)//!"
|
||||||
|
|
||||||
|
|
||||||
Scenario: new user does not add any tags in setup wizard and cancel the alert
|
Scenario: new user does not add any tags in setup wizard and cancel the alert
|
||||||
When I fill in the following:
|
When I fill in the following:
|
||||||
| profile_first_name | some name |
|
| profile_first_name | some name |
|
||||||
|
|
@ -46,7 +45,7 @@ Feature: new user registration
|
||||||
And I wait for the popovers to appear
|
And I wait for the popovers to appear
|
||||||
And I click close on all the popovers
|
And I click close on all the popovers
|
||||||
And I go to the home page
|
And I go to the home page
|
||||||
Then I should not see "Welcome to Diaspora"
|
Then I should not see "Welcome to diaspora*"
|
||||||
|
|
||||||
Scenario: user fills in bogus data - client side validation
|
Scenario: user fills in bogus data - client side validation
|
||||||
When I log out manually
|
When I log out manually
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ Feature: Viewing my activity on the steam mobile page
|
||||||
Background:
|
Background:
|
||||||
Given a user with username "alice"
|
Given a user with username "alice"
|
||||||
And "alice@alice.alice" has a public post with text "Hello! i am #newhere"
|
And "alice@alice.alice" has a public post with text "Hello! i am #newhere"
|
||||||
When I sign in as "alice@alice.alice"
|
When I toggle the mobile view
|
||||||
And I toggle the mobile view
|
And I sign in as "alice@alice.alice"
|
||||||
|
|
||||||
Scenario: Show my activity empty
|
Scenario: Show my activity empty
|
||||||
When I open the drawer
|
When I open the drawer
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,9 @@ Feature: private conversations mobile
|
||||||
Background:
|
Background:
|
||||||
Given a user with username "bob"
|
Given a user with username "bob"
|
||||||
And a user named "Alice Awesome" with email "alice@alice.alice"
|
And a user named "Alice Awesome" with email "alice@alice.alice"
|
||||||
When I sign in as "bob@bob.bob"
|
|
||||||
And a user with username "bob" is connected with "alice_awesome"
|
And a user with username "bob" is connected with "alice_awesome"
|
||||||
And I toggle the mobile view
|
When I toggle the mobile view
|
||||||
|
And I sign in as "bob@bob.bob"
|
||||||
|
|
||||||
Scenario: send and delete a mobile message
|
Scenario: send and delete a mobile message
|
||||||
Given I send a mobile message with subject "Greetings" and text "hello, alice!" to "Alice Awesome"
|
Given I send a mobile message with subject "Greetings" and text "hello, alice!" to "Alice Awesome"
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,23 @@
|
||||||
@javascript
|
@javascript
|
||||||
Feature: editing the getting started in the mobile view
|
Feature: editing the getting started in the mobile view
|
||||||
|
|
||||||
Scenario: editing getting started fields
|
Background:
|
||||||
When I go to the new user registration page
|
Given I toggle the mobile view
|
||||||
|
And I am on the login page
|
||||||
|
When I follow "Sign up"
|
||||||
And I fill in the new user form
|
And I fill in the new user form
|
||||||
And I press "Continue"
|
And I submit the form
|
||||||
And I visit the mobile getting started page
|
Then I should be on the getting started page
|
||||||
Then I should see the 'getting started' contents
|
Then I should see the 'getting started' contents
|
||||||
|
|
||||||
|
Scenario: new user does not add any tags in setup wizard
|
||||||
|
When I fill in the following:
|
||||||
|
| profile_first_name | some name |
|
||||||
|
And I follow "awesome_button"
|
||||||
|
Then I should be on the stream page
|
||||||
|
And I should not see "awesome_button"
|
||||||
|
|
||||||
|
Scenario: new user adds a profile photo and tags
|
||||||
When I attach the file "spec/fixtures/bad_urls.txt" to "file" within "#file-upload"
|
When I attach the file "spec/fixtures/bad_urls.txt" to "file" within "#file-upload"
|
||||||
And I confirm the alert
|
And I confirm the alert
|
||||||
And I attach the file "spec/fixtures/button.png" to hidden "file" within "#file-upload"
|
And I attach the file "spec/fixtures/button.png" to hidden "file" within "#file-upload"
|
||||||
|
|
@ -17,6 +27,7 @@ Feature: editing the getting started in the mobile view
|
||||||
And I press the first ".as-result-item" within ".as-results"
|
And I press the first ".as-result-item" within ".as-results"
|
||||||
Then I should see "#men" within "ul#as-selections-tags"
|
Then I should see "#men" within "ul#as-selections-tags"
|
||||||
|
|
||||||
|
Scenario: new user skips the setup wizard
|
||||||
When I follow "awesome_button"
|
When I follow "awesome_button"
|
||||||
Then I should be on the stream page
|
Then I should be on the stream page
|
||||||
And I should not see "awesome_button"
|
And I should not see "awesome_button"
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ Feature: viewing photos on the mobile main page
|
||||||
Background:
|
Background:
|
||||||
Given a user with username "bob"
|
Given a user with username "bob"
|
||||||
|
|
||||||
When I sign in as "bob@bob.bob"
|
When I toggle the mobile view
|
||||||
And I toggle the mobile view
|
And I sign in as "bob@bob.bob"
|
||||||
And I click on selector "#compose_badge"
|
And I click on selector "#compose_badge"
|
||||||
|
|
||||||
Scenario: view full size image
|
Scenario: view full size image
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,8 @@ Feature: posting from the mobile main page
|
||||||
| username |
|
| username |
|
||||||
| bob |
|
| bob |
|
||||||
| alice |
|
| alice |
|
||||||
And I visit the mobile home page
|
And I toggle the mobile view
|
||||||
|
And I am on the home page
|
||||||
And I sign in as "bob@bob.bob"
|
And I sign in as "bob@bob.bob"
|
||||||
And a user with username "bob" is connected with "alice"
|
And a user with username "bob" is connected with "alice"
|
||||||
Given I have following aspects:
|
Given I have following aspects:
|
||||||
|
|
@ -19,8 +20,8 @@ Feature: posting from the mobile main page
|
||||||
And I have user with username "alice" in an aspect called "NotPostingThingsHere"
|
And I have user with username "alice" in an aspect called "NotPostingThingsHere"
|
||||||
|
|
||||||
Scenario: post and delete some text
|
Scenario: post and delete some text
|
||||||
Given I publisher mobile page
|
Given I visit the mobile publisher page
|
||||||
And I append "I am eating yogurt" to the publisher mobile
|
And I append "I am eating yogurt" to the mobile publisher
|
||||||
And I select "Unicorns" from "aspect_ids_"
|
And I select "Unicorns" from "aspect_ids_"
|
||||||
And I press "Share"
|
And I press "Share"
|
||||||
When I visit the mobile stream page
|
When I visit the mobile stream page
|
||||||
|
|
@ -30,7 +31,7 @@ Feature: posting from the mobile main page
|
||||||
Then I should not see "I am eating yogurt"
|
Then I should not see "I am eating yogurt"
|
||||||
|
|
||||||
Scenario: post a photo without text
|
Scenario: post a photo without text
|
||||||
Given I publisher mobile page
|
Given I visit the mobile publisher page
|
||||||
When I attach the file "spec/fixtures/button.png" to hidden "file" within "#file-upload-publisher"
|
When I attach the file "spec/fixtures/button.png" to hidden "file" within "#file-upload-publisher"
|
||||||
Then I should see an uploaded image within the photo drop zone
|
Then I should see an uploaded image within the photo drop zone
|
||||||
And I should see "button.png completed"
|
And I should see "button.png completed"
|
||||||
|
|
@ -43,7 +44,7 @@ Feature: posting from the mobile main page
|
||||||
Then I should see a "img" within ".stream_element div.photo_attachments"
|
Then I should see a "img" within ".stream_element div.photo_attachments"
|
||||||
|
|
||||||
Scenario: back out of posting a photo-only post
|
Scenario: back out of posting a photo-only post
|
||||||
Given I publisher mobile page
|
Given I visit the mobile publisher page
|
||||||
When I attach the file "spec/fixtures/bad_urls.txt" to "file" within "#file-upload-publisher"
|
When I attach the file "spec/fixtures/bad_urls.txt" to "file" within "#file-upload-publisher"
|
||||||
And I confirm the alert
|
And I confirm the alert
|
||||||
Then I should not see an uploaded image within the photo drop zone
|
Then I should not see an uploaded image within the photo drop zone
|
||||||
|
|
@ -53,8 +54,8 @@ Feature: posting from the mobile main page
|
||||||
Then I should not see an uploaded image within the photo drop zone
|
Then I should not see an uploaded image within the photo drop zone
|
||||||
|
|
||||||
Scenario: back out of uploading a picture when another has been attached
|
Scenario: back out of uploading a picture when another has been attached
|
||||||
Given I publisher mobile page
|
Given I visit the mobile publisher page
|
||||||
And I append "I am eating yogurt" to the publisher mobile
|
And I append "I am eating yogurt" to the mobile publisher
|
||||||
And I attach the file "spec/fixtures/button.gif" to hidden "file" within "#file-upload-publisher"
|
And I attach the file "spec/fixtures/button.gif" to hidden "file" within "#file-upload-publisher"
|
||||||
And I attach the file "spec/fixtures/button.png" to hidden "file" within "#file-upload-publisher"
|
And I attach the file "spec/fixtures/button.png" to hidden "file" within "#file-upload-publisher"
|
||||||
And I click to delete the first uploaded photo
|
And I click to delete the first uploaded photo
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,8 @@ Feature: reactions mobile post
|
||||||
| Alice Smith | alice@alice.alice |
|
| Alice Smith | alice@alice.alice |
|
||||||
And a user with email "bob@bob.bob" is connected with "alice@alice.alice"
|
And a user with email "bob@bob.bob" is connected with "alice@alice.alice"
|
||||||
When "alice@alice.alice" has posted a status message with a photo
|
When "alice@alice.alice" has posted a status message with a photo
|
||||||
And I sign in as "bob@bob.bob"
|
|
||||||
And I toggle the mobile view
|
And I toggle the mobile view
|
||||||
|
And I sign in as "bob@bob.bob"
|
||||||
|
|
||||||
Scenario: like on a mobile post
|
Scenario: like on a mobile post
|
||||||
When I should see "0 reactions" within ".show_comments"
|
When I should see "0 reactions" within ".show_comments"
|
||||||
|
|
|
||||||
34
features/mobile/signs_up.feature
Normal file
34
features/mobile/signs_up.feature
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
@javascript
|
||||||
|
Feature: New user registration
|
||||||
|
In order to use Diaspora*
|
||||||
|
As a mobile user
|
||||||
|
I want to register an account
|
||||||
|
|
||||||
|
Background:
|
||||||
|
Given I toggle the mobile view
|
||||||
|
And I am on the login page
|
||||||
|
And I follow "Sign up"
|
||||||
|
|
||||||
|
Scenario: user signs up and goes to getting started
|
||||||
|
When I fill in the new user form
|
||||||
|
And I submit the form
|
||||||
|
Then I should be on the getting started page
|
||||||
|
Then I should see the 'getting started' contents
|
||||||
|
|
||||||
|
Scenario: user fills in bogus data - client side validation
|
||||||
|
When I fill in the following:
|
||||||
|
| user_username | $%&(/&%$&/=)(/ |
|
||||||
|
And I submit the form
|
||||||
|
Then I should not be able to sign up
|
||||||
|
|
||||||
|
When I fill in the following:
|
||||||
|
| user_username | valid_user |
|
||||||
|
| user_email | this is not a valid email $%&/()( |
|
||||||
|
And I submit the form
|
||||||
|
Then I should not be able to sign up
|
||||||
|
|
||||||
|
When I fill in the following:
|
||||||
|
| user_email | valid@email.com |
|
||||||
|
| user_password | 1 |
|
||||||
|
And I submit the form
|
||||||
|
Then I should not be able to sign up
|
||||||
|
|
@ -4,8 +4,8 @@ Feature: Interacting with tags
|
||||||
Background:
|
Background:
|
||||||
Given a user with username "alice"
|
Given a user with username "alice"
|
||||||
And "alice@alice.alice" has a public post with text "Hello! i am #newhere"
|
And "alice@alice.alice" has a public post with text "Hello! i am #newhere"
|
||||||
When I sign in as "alice@alice.alice"
|
When I toggle the mobile view
|
||||||
And I toggle the mobile view
|
And I sign in as "alice@alice.alice"
|
||||||
|
|
||||||
Scenario: Searching for a tag
|
Scenario: Searching for a tag
|
||||||
When I visit the mobile search page
|
When I visit the mobile search page
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,20 @@
|
||||||
When /^I visit the mobile aspects page$/ do
|
When /^I toggle the mobile view$/ do
|
||||||
visit('/aspects.mobile')
|
visit('/mobile/toggle')
|
||||||
end
|
end
|
||||||
|
|
||||||
When /^I visit the mobile home page$/ do
|
When /^I visit the mobile home page$/ do
|
||||||
visit('/users/sign_in.mobile')
|
visit('/users/sign_in.mobile')
|
||||||
end
|
end
|
||||||
|
|
||||||
Given /^I publisher mobile page$/ do
|
When /^I visit the mobile registration page$/ do
|
||||||
|
visit('/users/sign_up.mobile')
|
||||||
|
end
|
||||||
|
|
||||||
|
When /^I visit the mobile getting started page$/ do
|
||||||
|
visit('/getting_started.mobile')
|
||||||
|
end
|
||||||
|
|
||||||
|
Given /^I visit the mobile publisher page$/ do
|
||||||
visit('/status_messages/new.mobile')
|
visit('/status_messages/new.mobile')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -14,12 +22,8 @@ When /^I visit the mobile stream page$/ do
|
||||||
visit('/stream.mobile')
|
visit('/stream.mobile')
|
||||||
end
|
end
|
||||||
|
|
||||||
When /^I toggle the mobile view$/ do
|
When /^I visit the mobile aspects page$/ do
|
||||||
visit('/mobile/toggle')
|
visit('/aspects.mobile')
|
||||||
end
|
|
||||||
|
|
||||||
When /^I visit the mobile getting started page$/ do
|
|
||||||
visit('/getting_started.mobile')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
When /^I visit the mobile search page$/ do
|
When /^I visit the mobile search page$/ do
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ When /^I append "([^"]*)" to the publisher$/ do |text|
|
||||||
append_to_publisher(text)
|
append_to_publisher(text)
|
||||||
end
|
end
|
||||||
|
|
||||||
When /^I append "([^"]*)" to the publisher mobile$/ do |text|
|
When /^I append "([^"]*)" to the mobile publisher$/ do |text|
|
||||||
append_to_publisher(text, '#status_message_text')
|
append_to_publisher(text, '#status_message_text')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue