Skip to content
Extraits de code Groupes Projets
Valider b2070774 rédigé par Jonne Haß's avatar Jonne Haß
Parcourir les fichiers

Merge pull request #4859 from hpetru/4848-aspect-memberships-in-notification-dropdown

Fixed jQuery evenets in notifications-badge
parents 0ea53aa5 b43e5648
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -24,12 +24,10 @@ ...@@ -24,12 +24,10 @@
}); });
} }
self.dropdown.click(function(evt) {
evt.stopPropagation();
});
self.documentBody.click(function(evt) { self.documentBody.click(function(evt) {
if(self.dropdownShowing()) { var inDropdown = $(evt.target).parents().is(self.dropdown);
if(!inDropdown && self.dropdownShowing()) {
self.badgeLink.click(); self.badgeLink.click();
} }
}); });
......
...@@ -86,3 +86,14 @@ Feature: Notifications ...@@ -86,3 +86,14 @@ Feature: Notifications
Then I should not see "mentioned you in the post" Then I should not see "mentioned you in the post"
When I filter notifications by mentions When I filter notifications by mentions
Then I should see "mentioned you in the post" Then I should see "mentioned you in the post"
Scenario: show aspect dropdown in user hovercard
When I sign in as "bob@bob.bob"
And I am on "alice@alice.alice"'s page
And I add the person to my "Besties" aspect
And I sign out
When I sign in as "alice@alice.alice"
And I follow "Notifications" in the header
And I active the first hovercard after loading the notifications page
When I press the aspect dropdown
Then the aspect dropdown should be visible
...@@ -68,6 +68,10 @@ When /^I press the aspect dropdown$/ do ...@@ -68,6 +68,10 @@ When /^I press the aspect dropdown$/ do
find('.dropdown .button').click find('.dropdown .button').click
end end
Then /^the aspect dropdown should be visible$/ do
find(:css, '.aspect_membership.dropdown.active').should be_visible
end
And /^I toggle the aspect "([^"]*)"$/ do |aspect_name| And /^I toggle the aspect "([^"]*)"$/ do |aspect_name|
aspect = @me.aspects.where(:name => aspect_name).first aspect = @me.aspects.where(:name => aspect_name).first
find(".dropdown li[data-aspect_id='#{aspect.id}']").click find(".dropdown li[data-aspect_id='#{aspect.id}']").click
...@@ -281,3 +285,8 @@ end ...@@ -281,3 +285,8 @@ end
Then(/^I should have a validation error on "(.*?)"$/) do |field_list| Then(/^I should have a validation error on "(.*?)"$/) do |field_list|
check_fields_validation_error field_list check_fields_validation_error field_list
end end
And /^I active the first hovercard after loading the notifications page$/ do
page.should have_css '.notifications .hovercardable'
first('.notifications .hovercardable').hover
end
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter