Merge pull request #4859 from hpetru/4848-aspect-memberships-in-notification-dropdown
Fixed jQuery evenets in notifications-badge
This commit is contained in:
commit
b207077405
3 changed files with 23 additions and 5 deletions
|
|
@ -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
|
||||||
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
|
||||||
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
|
||||||
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
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue