Permalink
Browse files

Merge remote-tracking branch 'wilkie/bugfix/alps-missing-rels'

  • Loading branch information...
2 parents a04dd01 + 1e4cf45 commit 50b8d4f35a04b503604fa584f90b2a7be6626da7 @carols10cents carols10cents committed May 27, 2013
Showing with 35 additions and 6 deletions.
  1. +3 −3 app/views/shared/sidebar/_profile.haml
  2. +3 −3 app/views/users/show.haml
  3. +29 −0 test/acceptance/alps/user_profile_test.rb
View
6 app/views/shared/sidebar/_profile.haml
@@ -10,17 +10,17 @@
@#{current_user.username}
%ul.stats
%li.update-count
- %a{ :href => "/users/#{current_user.username}" }
+ %a{ :href => "/users/#{current_user.username}", :rel => 'messages-me' }
.icon
%span.number= current_user.feed.updates.count
Updates
%li.following-count
- %a{ :href => "/users/#{current_user.username}/following" }
+ %a{ :href => "/users/#{current_user.username}/following", :rel => 'users-friends' }
.icon
%span.number= current_user.following.length
Following
%li.follower-count.last
- %a{ :href => "/users/#{current_user.username}/followers" }
+ %a{ :href => "/users/#{current_user.username}/followers", :rel => 'users-followers' }
.icon
%span.number= current_user.followers.length
Followers
View
6 app/views/users/show.haml
@@ -43,17 +43,17 @@
%ul.stats
%li.update-count
- %a{ :href => "#profile_updates" }
+ %a{ :href => "#profile_updates", :rel => 'messages-me' }
%span.icon
%span.number= @author.feed.updates.count
Updates
%li.following-count
- %a{ :href => "/users/#{@author.username}/following" }
+ %a{ :href => "/users/#{@author.username}/following", :rel => 'users-friends' }
%span.icon
%span.number= @author.user.following.length
Following
%li.follower-count
- %a{ :href => "/users/#{@author.username}/followers" }
+ %a{ :href => "/users/#{@author.username}/followers", :rel => 'users-followers'}
%span.icon
%span.number= @author.user.followers.length
Followers
View
29 test/acceptance/alps/user_profile_test.rb
@@ -57,5 +57,34 @@
end
end
+ it "has the followers link in a rel=users-followers" do
+ visit "/users/#{@user.username}"
+ within "li.user" do
+ assert has_selector?(
+ :xpath,
+ "//a[contains(@rel, 'users-followers') and @href='/users/#{@user.username}/followers']"
+ )
+ end
+ end
+
+ it "has the following link in a rel=users-friends" do
+ visit "/users/#{@user.username}"
+ within "li.user" do
+ assert has_selector?(
+ :xpath,
+ "//a[contains(@rel, 'users-friends') and @href='/users/#{@user.username}/following']"
+ )
+ end
+ end
+
+ it "has the updates link in a rel=messages-me" do
+ visit "/users/#{@user.username}"
+ within "li.user" do
+ assert has_selector?(
+ :xpath,
+ "//a[contains(@rel, 'messages-me') and @href='#profile_updates']"
+ )
+ end
+ end
end

0 comments on commit 50b8d4f

Please sign in to comment.