Merge branch 'next-minor' into develop
This commit is contained in:
commit
edd3ddef52
6 changed files with 43 additions and 63 deletions
|
|
@ -1,21 +0,0 @@
|
|||
-# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||
-# licensed under the Affero General Public License version 3 or later. See
|
||||
-# the COPYRIGHT file.
|
||||
|
||||
- content_for :head do
|
||||
= javascript_include_tag :photos
|
||||
|
||||
#author_info
|
||||
= person_image_link(post.author, :size => :thumb_small)
|
||||
.from
|
||||
%h2
|
||||
= post.author_name
|
||||
|
||||
#show_photo{:data=>{:guid=>post.id}}
|
||||
= image_tag post.url(:scaled_full)
|
||||
|
||||
#caption
|
||||
= post.text
|
||||
|
||||
%br
|
||||
= link_to t('photos.show.show_original_post'), post_path(post.status_message)
|
||||
|
|
@ -898,8 +898,6 @@ en:
|
|||
invited_by: "You were invited by"
|
||||
|
||||
photos:
|
||||
show:
|
||||
show_original_post: "Show original post"
|
||||
create:
|
||||
runtime_error: "Photo upload failed. Are you sure that your seatbelt is fastened?"
|
||||
integrity_error: "Photo upload failed. Are you sure that was an image?"
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ Feature: Notifications
|
|||
When I filter notifications by mentions
|
||||
Then I should see "mentioned you in the post"
|
||||
|
||||
Scenario: show aspect dropdown in user hovercard
|
||||
Scenario: show hovercard in notification dropdown from the profile edit page
|
||||
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
|
||||
|
|
@ -120,11 +120,13 @@ Feature: Notifications
|
|||
When I sign in as "alice@alice.alice"
|
||||
And I go to the edit profile page
|
||||
And I follow "Notifications" in the header
|
||||
And I activate the first hovercard after loading the notifications page
|
||||
When I press the aspect dropdown
|
||||
Then the notification dropdown should be visible
|
||||
When I wait for notifications to load
|
||||
And I activate the first hovercard in the notification dropdown
|
||||
And I press the aspect dropdown
|
||||
Then the aspect dropdown should be visible
|
||||
|
||||
Scenario: show hovercard in notification dropdown
|
||||
Scenario: show hovercard in notification dropdown from the stream
|
||||
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
|
||||
|
|
@ -132,7 +134,8 @@ Feature: Notifications
|
|||
When I sign in as "alice@alice.alice"
|
||||
And I follow "Notifications" in the header
|
||||
Then the notification dropdown should be visible
|
||||
When I activate the first hovercard after loading the notifications page
|
||||
When I wait for notifications to load
|
||||
And I activate the first hovercard in the notification dropdown
|
||||
And I press the aspect dropdown
|
||||
Then the aspect dropdown should be visible
|
||||
|
||||
|
|
@ -151,8 +154,9 @@ Feature: Notifications
|
|||
And I follow "Notifications" in the header
|
||||
Then the notification dropdown should be visible
|
||||
Then the notification dropdown scrollbar should be visible
|
||||
When I wait for notifications to load
|
||||
Then there should be 10 notifications loaded
|
||||
When I scroll down on the notifications dropdown
|
||||
Then I should have scrolled down on the notification dropdown
|
||||
And I wait for notifications to load
|
||||
Then the notification dropdown should load more notifications
|
||||
When I wait for notifications to load
|
||||
Then there should be 15 notifications loaded
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ module AspectCukeHelpers
|
|||
aspect = find(".aspect_membership_dropdown.open .dropdown-menu li", text: aspect_name)
|
||||
aspect_selected = aspect["class"].include? "selected"
|
||||
aspect.trigger "click"
|
||||
aspect.parent.should have_no_css(".loading")
|
||||
expect(find(".aspect_membership_dropdown .dropdown-menu", visible: false)).to have_no_css(".loading")
|
||||
|
||||
# close dropdown
|
||||
page.should have_no_css('#profile.loading')
|
||||
|
|
|
|||
|
|
@ -210,36 +210,11 @@ end
|
|||
And /^I scroll down$/ do
|
||||
page.execute_script("window.scrollBy(0,3000000)")
|
||||
end
|
||||
And /^I scroll down on the notifications dropdown$/ do
|
||||
page.execute_script("$('.notifications').scrollTop(350)")
|
||||
end
|
||||
|
||||
Then /^I should have scrolled down$/ do
|
||||
expect(page.evaluate_script("window.pageYOffset")).to be > 0
|
||||
end
|
||||
|
||||
Then /^I should have scrolled down on the notification dropdown$/ do
|
||||
expect(page.evaluate_script("$('.notifications').scrollTop()")).to be > 0
|
||||
end
|
||||
|
||||
|
||||
Then /^the notification dropdown should be visible$/ do
|
||||
expect(find(:css, "#notification-dropdown")).to be_visible
|
||||
end
|
||||
|
||||
Then /^the notification dropdown scrollbar should be visible$/ do
|
||||
find(:css, ".ps-active-y").should be_visible
|
||||
end
|
||||
|
||||
Then /^there should be (\d+) notifications loaded$/ do |n|
|
||||
result = page.evaluate_script("$('.media.stream-element').length")
|
||||
result.should == n.to_i
|
||||
end
|
||||
|
||||
And "I wait for notifications to load" do
|
||||
page.should_not have_selector(".loading")
|
||||
end
|
||||
|
||||
When /^I resize my window to 800x600$/ do
|
||||
page.driver.resize(800, 600)
|
||||
end
|
||||
|
|
@ -321,8 +296,3 @@ end
|
|||
Then(/^I should have a validation error on "(.*?)"$/) do |field_list|
|
||||
check_fields_validation_error field_list
|
||||
end
|
||||
|
||||
And /^I activate the first hovercard after loading the notifications page$/ do
|
||||
page.should have_css '.notifications .hovercardable'
|
||||
first('.notifications .hovercardable').hover
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
When /^I filter notifications by likes$/ do
|
||||
When "I filter notifications by likes" do
|
||||
step %(I follow "Liked" within "#notifications_container .list-group")
|
||||
end
|
||||
|
||||
When /^I filter notifications by mentions$/ do
|
||||
When "I filter notifications by mentions" do
|
||||
step %(I follow "Mentioned" within "#notifications_container .list-group")
|
||||
end
|
||||
|
||||
|
|
@ -16,3 +16,32 @@ Then /^I should( not)? have activated notifications for the post( in the single
|
|||
expect(find(selector, match: :first)).to have_no_css(".create_participation", visible: false)
|
||||
end
|
||||
end
|
||||
|
||||
And "I wait for notifications to load" do
|
||||
expect(find("#notification-dropdown")).to have_no_css(".loading")
|
||||
end
|
||||
|
||||
And "I scroll down on the notifications dropdown" do
|
||||
page.execute_script("$('.notifications').scrollTop(350)")
|
||||
end
|
||||
|
||||
Then "the notification dropdown should load more notifications" do
|
||||
expect(find("#notification-dropdown")).to have_css(".loading")
|
||||
end
|
||||
|
||||
Then "the notification dropdown should be visible" do
|
||||
expect(find(:css, "#notification-dropdown")).to be_visible
|
||||
end
|
||||
|
||||
Then "the notification dropdown scrollbar should be visible" do
|
||||
expect(find(:css, ".ps-active-y")).to be_visible
|
||||
end
|
||||
|
||||
Then /^there should be (\d+) notifications loaded$/ do |n|
|
||||
expect(page).to have_css("#notification-dropdown .media.stream-element", count: n)
|
||||
end
|
||||
|
||||
When "I activate the first hovercard in the notification dropdown" do
|
||||
expect(page).to have_css("#notification-dropdown .hovercardable")
|
||||
first("#notification-dropdown .hovercardable").hover
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue