Merge branch 'activity_more' of git://github.com/movilla/diaspora into movilla-activity_more

Conflicts:
	Changelog.md
This commit is contained in:
Jonne Haß 2013-04-13 12:53:31 +02:00
commit fd069af2c6
6 changed files with 57 additions and 3 deletions

View file

@ -119,6 +119,7 @@ by them self.
* Fix regression in bookmarklet causing uneditable post contents. [#4057](https://github.com/diaspora/diaspora/issues/4057) * Fix regression in bookmarklet causing uneditable post contents. [#4057](https://github.com/diaspora/diaspora/issues/4057)
* Redirect all mixed case tags to the lower case equivalents [#4058](https://github.com/diaspora/diaspora/issues/4058) * Redirect all mixed case tags to the lower case equivalents [#4058](https://github.com/diaspora/diaspora/issues/4058)
* Fix wrong message on infinite scroll on contacts page [#3681](https://github.com/diaspora/diaspora/issues/3681) * Fix wrong message on infinite scroll on contacts page [#3681](https://github.com/diaspora/diaspora/issues/3681)
* My Activity mobile doesn't show second page when clicking "more". [#4109](https://github.com/diaspora/diaspora/issues/4109)
## Features ## Features

View file

@ -1196,3 +1196,8 @@ input#q.search {
text-align: right; text-align: right;
bottom: 25px; bottom: 25px;
} }
.my_activity {
height: 16px;
width: 16px;
}

View file

@ -11,7 +11,11 @@ module StreamHelper
elsif controller.instance_of?(PostsController) elsif controller.instance_of?(PostsController)
public_stream_path(:max_time => time_for_scroll(@stream)) public_stream_path(:max_time => time_for_scroll(@stream))
elsif controller.instance_of?(StreamsController) elsif controller.instance_of?(StreamsController)
stream_path(:max_time => time_for_scroll(@stream)) if current_page?(:stream)
stream_path(:max_time => time_for_scroll(@stream))
else
activity_stream_path(:max_time => time_for_scroll(@stream))
end
else else
raise 'in order to use pagination for this new controller, update next_page_path in stream helper' raise 'in order to use pagination for this new controller, update next_page_path in stream helper'
end end

View file

@ -52,7 +52,7 @@
- if user_signed_in? - if user_signed_in?
#nav_badges #nav_badges
= link_to(image_tag('icons/my_activity.png', :height => 16, :width => 16), activity_stream_path, :class => "badge badge-inverse", :id => "my_activity_badge") = link_to(image_tag('icons/my_activity.png', :class => 'my_activity'), activity_stream_path, :class => "badge badge-inverse", :id => "my_activity_badge")
= link_to(image_tag('icons/notifications_grey.png', :height => 16, :width => 16, :id => 'notification-flag'), notifications_path, :class => "badge badge-inverse", :id => "notification_badge") = link_to(image_tag('icons/notifications_grey.png', :height => 16, :width => 16, :id => 'notification-flag'), notifications_path, :class => "badge badge-inverse", :id => "notification_badge")
- if current_user.unread_notifications.count > 0 - if current_user.unread_notifications.count > 0
.badge_count{:id => "notification"} .badge_count{:id => "notification"}

View file

@ -0,0 +1,23 @@
@javascript
Feature: Viewing my activity on the steam mobile page
In order to navigate Diaspora*
As a mobile user
I want to view my actituty stream
Background:
Given a user with username "alice"
And "alice@alice.alice" has a public post with text "Hello! i am #newhere"
When I sign in as "alice@alice.alice"
And I toggle the mobile view
Scenario: Show my activity empty
When I click on selector "img.my_activity"
Then I should see "My Activity"
And I should not see "Hello! i am #newhere"
Scenario: Show post on my activity
When I click on selector "a.image_link.like_action.inactive"
And I wait for the ajax to finish
And I click on selector "img.my_activity"
Then I should see "My Activity"
And I should see "Hello! i am #newhere" within ".ltr"

View file

@ -5,4 +5,25 @@
require 'spec_helper' require 'spec_helper'
describe StreamHelper do describe StreamHelper do
describe "next_page_path" do
before do
@stream = Stream::Base.new(alice, :max_time => Time.now)
end
it 'works for public page' do
stub!(:controller).and_return(PostsController.new)
next_page_path.should include '/public'
end
it 'works for stream page when current page is stream' do
self.stub!("current_page?").and_return(true)
stub!(:controller).and_return(StreamsController.new)
next_page_path.should include stream_path
end
it 'works for activity page when current page is not stream' do
self.stub!("current_page?").and_return(false)
stub!(:controller).and_return(StreamsController.new)
next_page_path.should include activity_stream_path
end
end
end end