Use different mouse events to fix tag unfollow icon hovering

This commit is contained in:
Sarah Mei 2011-08-27 21:54:05 -07:00
parent b9dbe0ecdd
commit 60c8a0d00b
2 changed files with 8 additions and 12 deletions

View file

@ -1,22 +1,19 @@
@javascript
Feature: posting
In order to takeover humanity for the good of society
In order to take over humanity for the good of society
As a rock star
I want to see what humanity is saying about particular tags
Background:
Given a user with username "bob"
And a user with username "alice"
When I sign in as "bob@bob.bob"
When I sign in as "bob@bob.bob"
And I post a status with the text "I am da #boss"
And I am on the home page
Then I should see "I am da #boss"
And I go to the destroy user session page
When I go to the destroy user session page
And I sign in as "alice@alice.alice"
And I search for "#boss"
And I press "Follow #boss"
@ -27,14 +24,13 @@ Feature: posting
And I follow "#boss"
Then I should see "I am da #boss"
Scenario: can stop following a particular tag
Scenario: can stop following a tag from the tag page
When I hover over the ".button.tag_following"
When I press "Stop Following #boss"
And I press "Following #boss"
And I go to the home page
Then I should not see "#boss" within ".left_nav"
Scenario:
Scenario: can stop following a tag from the homepage
When I go to the home page
And I preemptively confirm the alert
And I hover over the "li.unfollow#boss"

View file

@ -5,9 +5,9 @@
var TagFollowings = {
initialize: function(){
$('.unfollow').live('mouseover', function(){
$('.unfollow').live('mouseenter', function(){
$(this).find('.unfollow_icon').removeClass('hidden');
}).live('mouseout', function(){
}).live('mouseleave', function(){
$(this).find('.unfollow_icon').addClass('hidden');
});
}