Merge pull request #4758 from bronislav/feature/4724-remove-own-hovercard-popup-in-reshares
[WIP] Fix hovercard in reshares
This commit is contained in:
commit
f650808828
3 changed files with 23 additions and 5 deletions
|
|
@ -13,7 +13,7 @@
|
|||
{{#with root}}
|
||||
<div class="bd">
|
||||
<div>
|
||||
<a href="/people/{{author.guid}}" class="author {{{hovercardable this}}}">{{author.name}}</a>
|
||||
<a href="/people/{{author.guid}}" class="author {{{hovercardable author}}}">{{author.name}}</a>
|
||||
|
||||
<span class="details grey">
|
||||
-
|
||||
|
|
|
|||
|
|
@ -8,9 +8,11 @@ Feature: Hovercards
|
|||
Given a user named "Bob Jones" with email "bob@bob.bob"
|
||||
And "bob@bob.bob" has a public post with text "public stuff"
|
||||
And a user named "Alice" with email "alice@alice.alice"
|
||||
And "alice@alice.alice" has a public post with text "alice public stuff"
|
||||
And the post with text "public stuff" is reshared by "alice@alice.alice"
|
||||
And the post with text "alice public stuff" is reshared by "bob@bob.bob"
|
||||
And I sign in as "alice@alice.alice"
|
||||
|
||||
|
||||
Scenario: Hovercards on the main stream
|
||||
Given I am on "bob@bob.bob"'s page
|
||||
Then I should see "public stuff" within ".stream_element"
|
||||
|
|
@ -18,3 +20,13 @@ Feature: Hovercards
|
|||
Then I should see a hovercard
|
||||
When I deactivate the first hovercard
|
||||
Then I should not see a hovercard
|
||||
|
||||
Scenario: Hovercards on the main stream in reshares
|
||||
Given I am on "bob@bob.bob"'s page
|
||||
Then I should see "Alice" within ".stream_element"
|
||||
When I hover "Alice" within ".reshare"
|
||||
Then I should not see a hovercard
|
||||
When I am on "alice@alice.alice"'s page
|
||||
Then I should see "Bob Jones" within ".stream_element"
|
||||
When I hover "Bob Jones" within ".reshare"
|
||||
Then I should see a hovercard
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
When(/^I activate the first hovercard$/) do
|
||||
page.execute_script("$('.hovercardable').first().trigger('mouseenter');")
|
||||
first('.hovercardable').hover
|
||||
end
|
||||
|
||||
Then(/^I should see a hovercard$/) do
|
||||
page.should have_css '#hovercard'
|
||||
page.should have_css('#hovercard')
|
||||
end
|
||||
|
||||
When(/^I deactivate the first hovercard$/) do
|
||||
|
|
@ -11,5 +11,11 @@ When(/^I deactivate the first hovercard$/) do
|
|||
end
|
||||
|
||||
Then(/^I should not see a hovercard$/) do
|
||||
page.should_not have_css '#hovercard'
|
||||
page.should_not have_css('#hovercard')
|
||||
end
|
||||
|
||||
When (/^I hover "([^"]*)" within "([^"]*)"$/) do |name, selector|
|
||||
with_scope(selector) do
|
||||
find(".author", text: name).hover
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue