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"
|
invited_by: "You were invited by"
|
||||||
|
|
||||||
photos:
|
photos:
|
||||||
show:
|
|
||||||
show_original_post: "Show original post"
|
|
||||||
create:
|
create:
|
||||||
runtime_error: "Photo upload failed. Are you sure that your seatbelt is fastened?"
|
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?"
|
integrity_error: "Photo upload failed. Are you sure that was an image?"
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ Feature: Notifications
|
||||||
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
|
Scenario: show hovercard in notification dropdown from the profile edit page
|
||||||
When I sign in as "bob@bob.bob"
|
When I sign in as "bob@bob.bob"
|
||||||
And I am on "alice@alice.alice"'s page
|
And I am on "alice@alice.alice"'s page
|
||||||
And I add the person to my "Besties" aspect
|
And I add the person to my "Besties" aspect
|
||||||
|
|
@ -120,11 +120,13 @@ Feature: Notifications
|
||||||
When I sign in as "alice@alice.alice"
|
When I sign in as "alice@alice.alice"
|
||||||
And I go to the edit profile page
|
And I go to the edit profile page
|
||||||
And I follow "Notifications" in the header
|
And I follow "Notifications" in the header
|
||||||
And I activate the first hovercard after loading the notifications page
|
Then the notification dropdown should be visible
|
||||||
When I press the aspect dropdown
|
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
|
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"
|
When I sign in as "bob@bob.bob"
|
||||||
And I am on "alice@alice.alice"'s page
|
And I am on "alice@alice.alice"'s page
|
||||||
And I add the person to my "Besties" aspect
|
And I add the person to my "Besties" aspect
|
||||||
|
|
@ -132,7 +134,8 @@ Feature: Notifications
|
||||||
When I sign in as "alice@alice.alice"
|
When I sign in as "alice@alice.alice"
|
||||||
And I follow "Notifications" in the header
|
And I follow "Notifications" in the header
|
||||||
Then the notification dropdown should be visible
|
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
|
And I press the aspect dropdown
|
||||||
Then the aspect dropdown should be visible
|
Then the aspect dropdown should be visible
|
||||||
|
|
||||||
|
|
@ -151,8 +154,9 @@ Feature: Notifications
|
||||||
And I follow "Notifications" in the header
|
And I follow "Notifications" in the header
|
||||||
Then the notification dropdown should be visible
|
Then the notification dropdown should be visible
|
||||||
Then the notification dropdown scrollbar 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
|
Then there should be 10 notifications loaded
|
||||||
When I scroll down on the notifications dropdown
|
When I scroll down on the notifications dropdown
|
||||||
Then I should have scrolled down on the notification dropdown
|
Then the notification dropdown should load more notifications
|
||||||
And I wait for notifications to load
|
When I wait for notifications to load
|
||||||
Then there should be 15 notifications loaded
|
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 = find(".aspect_membership_dropdown.open .dropdown-menu li", text: aspect_name)
|
||||||
aspect_selected = aspect["class"].include? "selected"
|
aspect_selected = aspect["class"].include? "selected"
|
||||||
aspect.trigger "click"
|
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
|
# close dropdown
|
||||||
page.should have_no_css('#profile.loading')
|
page.should have_no_css('#profile.loading')
|
||||||
|
|
|
||||||
|
|
@ -210,36 +210,11 @@ end
|
||||||
And /^I scroll down$/ do
|
And /^I scroll down$/ do
|
||||||
page.execute_script("window.scrollBy(0,3000000)")
|
page.execute_script("window.scrollBy(0,3000000)")
|
||||||
end
|
end
|
||||||
And /^I scroll down on the notifications dropdown$/ do
|
|
||||||
page.execute_script("$('.notifications').scrollTop(350)")
|
|
||||||
end
|
|
||||||
|
|
||||||
Then /^I should have scrolled down$/ do
|
Then /^I should have scrolled down$/ do
|
||||||
expect(page.evaluate_script("window.pageYOffset")).to be > 0
|
expect(page.evaluate_script("window.pageYOffset")).to be > 0
|
||||||
end
|
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
|
When /^I resize my window to 800x600$/ do
|
||||||
page.driver.resize(800, 600)
|
page.driver.resize(800, 600)
|
||||||
end
|
end
|
||||||
|
|
@ -321,8 +296,3 @@ 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 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")
|
step %(I follow "Liked" within "#notifications_container .list-group")
|
||||||
end
|
end
|
||||||
|
|
||||||
When /^I filter notifications by mentions$/ do
|
When "I filter notifications by mentions" do
|
||||||
step %(I follow "Mentioned" within "#notifications_container .list-group")
|
step %(I follow "Mentioned" within "#notifications_container .list-group")
|
||||||
end
|
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)
|
expect(find(selector, match: :first)).to have_no_css(".create_participation", visible: false)
|
||||||
end
|
end
|
||||||
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