* Add test for mobile page: Edit profile mobile, Conversations mobile, Getting Started mobile
* Complete the existing: Post mobile. * Complete some test for no mobile: Edit profile, Post main. * Fix little error css and js mobile. * Add file-upload-custom javascripts to mobile.js.
This commit is contained in:
parent
3c29007c39
commit
7a8269ebf3
13 changed files with 160 additions and 7 deletions
|
|
@ -7,7 +7,7 @@
|
|||
//= require mbp-respond.min
|
||||
//= require mbp-helper
|
||||
//= require jquery.autoSuggest.custom
|
||||
|
||||
//= require fileuploader-custom
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
|
|
@ -309,7 +309,7 @@ function createUploader(){
|
|||
},
|
||||
|
||||
onComplete: function(id, fileName, responseJSON) {
|
||||
$('#fileInfo-publisher').text(Diaspora.I18n.t("photo_uploader.completed", file=fileName));
|
||||
$('#fileInfo-publisher').text(Diaspora.I18n.t("photo_uploader.completed", {'file': fileName}));
|
||||
var id = responseJSON.data.photo.id,
|
||||
url = responseJSON.data.photo.unprocessed_image.url,
|
||||
currentPlaceholder = $('li.loading').first();
|
||||
|
|
|
|||
|
|
@ -1172,5 +1172,5 @@ input#q.search {
|
|||
position: absolute;
|
||||
right: 10px;
|
||||
text-align: right;
|
||||
bottom: 40px;
|
||||
bottom: 25px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -120,7 +120,10 @@ class UsersController < ApplicationController
|
|||
|
||||
@css_framework = :bootstrap
|
||||
@include_application_css = true #Hack for multiple CSS frameworks and having two main styles
|
||||
render "users/getting_started", layout: "with_header_with_footer"
|
||||
respond_to do |format|
|
||||
format.mobile { render "users/getting_started" }
|
||||
format.all { render "users/getting_started", layout: "with_header_with_footer" }
|
||||
end
|
||||
end
|
||||
|
||||
def getting_started_completed
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
- content_for :head do
|
||||
= javascript_include_tag :jquery
|
||||
= javascript_include_tag 'fileuploader-custom'
|
||||
|
||||
:javascript
|
||||
$(document).ready(function () {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
-# the COPYRIGHT file.
|
||||
|
||||
- content_for :head do
|
||||
= javascript_include_tag :jquery, :home
|
||||
= javascript_include_tag :jquery
|
||||
= javascript_include_tag 'fileuploader-custom'
|
||||
|
||||
:javascript
|
||||
$(document).ready(function () {
|
||||
|
|
|
|||
24
features/conversations_mobile.feature
Normal file
24
features/conversations_mobile.feature
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
@javascript
|
||||
Feature: private messages mobile
|
||||
In order to be talkative
|
||||
As a mobile user
|
||||
I want to converse with people
|
||||
|
||||
Background:
|
||||
Given a user with username "bob"
|
||||
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 I toggle the mobile view
|
||||
|
||||
Scenario: send a mobile message
|
||||
Given I send a mobile message with subject "Greetings" and text "hello, alice!" to "Alice Awesome"
|
||||
Then I should see "Greetings" within ".ltr"
|
||||
And I should see "Greetings" within ".ltr"
|
||||
And I press the first ".ltr" within ".conversation"
|
||||
And "Alice Awesome" should be part of active conversation
|
||||
And I should see "hello, alice!" within ".stream_element"
|
||||
When I sign in as "alice@alice.alice"
|
||||
And I reply with "hey, how you doing?"
|
||||
And I press the first ".ltr" within ".conversation"
|
||||
Then I should see "hey, how you doing?"
|
||||
|
|
@ -9,10 +9,15 @@ Feature: editing your profile
|
|||
| profile_first_name | Boba |
|
||||
| profile_last_name | Fett |
|
||||
| profile_bio | This is a bio |
|
||||
| profile_location | Kamino |
|
||||
|
||||
And I select "1986" from "profile_date_year"
|
||||
And I select "30" from "profile_date_day"
|
||||
And I select "November" from "profile_date_month"
|
||||
|
||||
And I fill in "profile[tag_string]" with "#starwars"
|
||||
And I press the first ".as-result-item" within ".as-results"
|
||||
|
||||
And I press "Update Profile"
|
||||
|
||||
Then I should be on my edit profile page
|
||||
|
|
@ -24,6 +29,21 @@ Feature: editing your profile
|
|||
And the "profile_date_year" field should be filled with "1986"
|
||||
And the "profile_date_month" field should be filled with "11"
|
||||
And the "profile_date_day" field should be filled with "30"
|
||||
And the "profile_location" field should be filled with "Kamino"
|
||||
And I should see "#starwars" within "ul#as-selections-tags"
|
||||
|
||||
When I fill in "profile[tag_string]" with "#kamino"
|
||||
And I press the first ".as-result-item" within ".as-results"
|
||||
|
||||
And I press "Update Profile"
|
||||
Then I should see "#kamino" within "ul#as-selections-tags"
|
||||
And I should see "#starwars" within "ul#as-selections-tags"
|
||||
|
||||
When I attach the file "spec/fixtures/bad_urls.txt" to "file" within "#file-upload"
|
||||
And I preemptively confirm the alert
|
||||
And I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload"
|
||||
And I wait for the ajax to finish
|
||||
Then I should see a "img" within "#profile_photo_upload"
|
||||
|
||||
When I go to my new profile page
|
||||
# #commented out until we bring back the profile info on new profile
|
||||
|
|
|
|||
50
features/edits_profile_mobile.feature
Normal file
50
features/edits_profile_mobile.feature
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
@javascript
|
||||
Feature: editing the profile in the mobile view
|
||||
Scenario: editing profile fields
|
||||
Given I am signed in
|
||||
And I toggle the mobile view
|
||||
And I go to the edit profile page
|
||||
|
||||
When I fill in the following:
|
||||
| profile_gender | Fearless |
|
||||
| profile_first_name | Boba |
|
||||
| profile_last_name | Fett |
|
||||
| profile_bio | This is a bio |
|
||||
| profile_location | Kamino |
|
||||
|
||||
And I select "1986" from "profile_date_year"
|
||||
And I select "30" from "profile_date_day"
|
||||
And I select "November" from "profile_date_month"
|
||||
|
||||
And I fill in "profile[tag_string]" with "#starwars"
|
||||
And I press the first ".as-result-item" within ".as-results"
|
||||
|
||||
And I press "Update Profile"
|
||||
|
||||
Then I should be on my edit profile page
|
||||
And I should see "Profile updated"
|
||||
And the "profile_gender" field should contain "Fearless"
|
||||
And the "profile_first_name" field should contain "Boba"
|
||||
And the "profile_last_name" field should contain "Fett"
|
||||
And I should see "This is a bio"
|
||||
And the "profile_date_year" field should be filled with "1986"
|
||||
And the "profile_date_month" field should be filled with "11"
|
||||
And the "profile_date_day" field should be filled with "30"
|
||||
And the "profile_location" field should be filled with "Kamino"
|
||||
And I should see "#starwars" within "ul#as-selections-tags"
|
||||
|
||||
When I fill in "profile[tag_string]" with "#kamino"
|
||||
And I press the first ".as-result-item" within ".as-results"
|
||||
|
||||
And I press "Update Profile"
|
||||
Then I should see "#kamino" within "ul#as-selections-tags"
|
||||
And I should see "#starwars" within "ul#as-selections-tags"
|
||||
|
||||
When I attach the file "spec/fixtures/bad_urls.txt" to "file" within "#file-upload"
|
||||
And I preemptively confirm the alert
|
||||
And I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload"
|
||||
And I wait for the ajax to finish
|
||||
Then I should see a "img" within "#profile_photo_upload"
|
||||
|
||||
When I go to my new profile page
|
||||
And I should see "Boba Fett"
|
||||
28
features/getting_started_mobile.feature
Normal file
28
features/getting_started_mobile.feature
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
@javascript
|
||||
Feature: editing the gettig started in the mobile view
|
||||
|
||||
Scenario: editing gettig started fields
|
||||
When I go to the new user registration page
|
||||
And I fill in the following:
|
||||
| user_username | amparito |
|
||||
| user_email | amp@arito.com |
|
||||
| user_password | secret |
|
||||
| user_password_confirmation | secret |
|
||||
And I press "Continue"
|
||||
And I visit the mobile getting started page
|
||||
And I should see "Well, hello there!" and "Who are you?" and "What are you into?"
|
||||
And I should see "amparito"
|
||||
|
||||
When I attach the file "spec/fixtures/bad_urls.txt" to "file" within "#file-upload"
|
||||
And I preemptively confirm the alert
|
||||
And I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload"
|
||||
And I wait for the ajax to finish
|
||||
Then I should see a "img" within "#profile_photo_upload"
|
||||
|
||||
When I fill in "follow_tags" with "#men"
|
||||
And I press the first ".as-result-item" within ".as-results"
|
||||
Then I should see "#men" within "ul#as-selections-tags"
|
||||
|
||||
When I follow "awesome_button"
|
||||
Then I should be on the stream page
|
||||
And I should not see "awesome_button"
|
||||
|
|
@ -101,6 +101,9 @@ Feature: posting from the main page
|
|||
Scenario: back out of posting a photo-only post
|
||||
Given I expand the publisher
|
||||
And I have turned off jQuery effects
|
||||
When I attach the file "spec/fixtures/bad_urls.txt" to "file" within "#file-upload"
|
||||
And I preemptively confirm the alert
|
||||
Then I should not see an uploaded image within the photo drop zone
|
||||
When 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
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
@javascript
|
||||
Feature: posting from the main page
|
||||
Feature: posting from the mobile main page
|
||||
In order to navigate Diaspora*
|
||||
As a mobile user
|
||||
I want to tell the world I am eating a yogurt
|
||||
|
|
@ -31,6 +31,7 @@ Feature: posting from the main page
|
|||
When I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload-publisher"
|
||||
And I wait for the ajax to finish
|
||||
Then I should see an uploaded image within the photo drop zone
|
||||
And I should see "button.png completed"
|
||||
When I press "Share"
|
||||
And I wait for the ajax to finish
|
||||
When I visit the mobile stream page
|
||||
|
|
@ -42,8 +43,12 @@ Feature: posting from the main page
|
|||
|
||||
Scenario: back out of posting a photo-only post
|
||||
Given I publisher mobile page
|
||||
When I attach the file "spec/fixtures/bad_urls.txt" to "file" within "#file-upload-publisher"
|
||||
And I preemptively confirm the alert
|
||||
Then I should not see an uploaded image within the photo drop zone
|
||||
When I attach the file "spec/fixtures/button.png" to hidden element "file" within "#file-upload-publisher"
|
||||
And I wait for the ajax to finish
|
||||
And I should see "button.png completed"
|
||||
And I click to delete the first uploaded photo
|
||||
And I wait for the ajax to finish
|
||||
Then I should not see an uploaded image within the photo drop zone
|
||||
|
|
|
|||
|
|
@ -24,3 +24,15 @@ When /^I reply with "([^"]*)"$/ do |text|
|
|||
step %(I press "Reply")
|
||||
step %(I wait for the ajax to finish)
|
||||
end
|
||||
|
||||
Then /^I send a mobile message with subject "([^"]*)" and text "([^"]*)" to "([^"]*)"$/ do |subject, text, person|
|
||||
step %(I am on the conversations page)
|
||||
step %(I follow "New Message")
|
||||
step %(I wait for the ajax to finish)
|
||||
step %(I fill in "contact_autocomplete" with "#{person}")
|
||||
step %(I press the first ".as-result-item" within ".as-results")
|
||||
step %(I fill in "conversation_subject" with "#{subject}")
|
||||
step %(I fill in "conversation_text" with "#{text}")
|
||||
step %(I press "Send")
|
||||
step %(I wait for the ajax to finish)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -13,3 +13,11 @@ end
|
|||
When /^I visit the mobile stream page$/ do
|
||||
visit('/stream.mobile')
|
||||
end
|
||||
|
||||
When /^I toggle the mobile view$/ do
|
||||
visit('/mobile/toggle')
|
||||
end
|
||||
|
||||
When /^I visit the mobile getting started page$/ do
|
||||
visit('/getting_started.mobile')
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue