mirror of
https://github.com/diaspora/diaspora.git
synced 2026-01-09 15:18:11 -05:00
Refacor files namespaces
This commit is contained in:
committed by
Benjamin Neff
parent
9b19be18f2
commit
67f8ba5d57
@@ -86,3 +86,14 @@ Feature: commenting
|
||||
|
||||
When I click on selector ".toggle_post_comments"
|
||||
Then I should see "Comment 2"
|
||||
|
||||
Scenario: Like a comment in stream view
|
||||
When "alice@alice.alice" has commented "That's cool" on "Look at this dog"
|
||||
And I am on "alice@alice.alice"'s page
|
||||
And I like the comment "That's cool"
|
||||
Then I should see a heart within comment "That's cool"
|
||||
|
||||
When I expand likes within comment "That's cool"
|
||||
Then I should see a micro avatar within comment "That's cool"
|
||||
When I unlike comment "That's cool"
|
||||
Then I should not see a micro avatar within comment "That's cool"
|
||||
|
||||
@@ -43,3 +43,14 @@ Feature: reactions mobile post
|
||||
And I click on selector "a.comment-action"
|
||||
And I confirm the alert after I click on selector "a.remove"
|
||||
Then I should see "0 comments" within ".show-comments"
|
||||
|
||||
Scenario: liking and unliking a comment
|
||||
When I click on selector "a.comment-action.inactive"
|
||||
And I fill in the following:
|
||||
| text | is that a poodle? |
|
||||
And I press "Comment"
|
||||
Then I should see "is that a poodle?" within ".comment-container"
|
||||
When I toggle like on comment with text "is that a poodle?"
|
||||
Then I should see a like on comment with text "is that a poodle?"
|
||||
When I toggle like on comment with text "is that a poodle?"
|
||||
Then I should see an unliked comment with text "is that a poodle?"
|
||||
|
||||
@@ -44,3 +44,38 @@ end
|
||||
When /^I enter "([^"]*)" in the comment field$/ do |comment_text|
|
||||
find("textarea.comment-box.mention-textarea").native.send_keys(comment_text)
|
||||
end
|
||||
|
||||
Then /^I like the comment "([^"]*)"$/ do |comment_text|
|
||||
comment_guid = Comment.find_by(text: comment_text).guid
|
||||
# Find like like-link within comment-block
|
||||
find(id: comment_guid).click_link("Like")
|
||||
end
|
||||
|
||||
Then /^I should see a heart within comment "([^"]*)"$/ do |comment_text|
|
||||
comment_guid = Comment.find_by(text: comment_text).guid
|
||||
block = find(id: comment_guid)
|
||||
expect(block).to have_css(".entypo-heart")
|
||||
end
|
||||
|
||||
When /^I expand likes within comment "([^"]*)"$/ do |comment_text|
|
||||
comment_guid = Comment.find_by(text: comment_text).guid
|
||||
find(id: comment_guid).click_link("1 Like")
|
||||
find(id: comment_guid).find(".entypo-heart").hover # unfocus avatar to get rid of tooltip
|
||||
end
|
||||
|
||||
When /^I unlike comment "([^"]*)"$/ do |comment_text|
|
||||
comment_guid = Comment.find_by(text: comment_text).guid
|
||||
find(id: comment_guid).click_link("Unlike")
|
||||
end
|
||||
|
||||
Then /^I should see a micro avatar within comment "([^"]*)"$/ do |comment_text|
|
||||
comment_guid = Comment.find_by(text: comment_text).guid
|
||||
block = find(id: comment_guid)
|
||||
expect(block).to have_css(".micro.avatar")
|
||||
end
|
||||
|
||||
Then /^I should not see a micro avatar within comment "([^"]*)"$/ do |comment_text|
|
||||
comment_guid = Comment.find_by(text: comment_text).guid
|
||||
block = find(id: comment_guid)
|
||||
expect(block).not_to have_css(".micro.avatar")
|
||||
end
|
||||
|
||||
@@ -23,3 +23,26 @@ Then /^the aspect dropdown within "([^"]*)" should be labeled "([^"]*)"/ do |sel
|
||||
current_scope.should have_css("option.list_cover", text: label)
|
||||
end
|
||||
end
|
||||
|
||||
When /^I toggle like on comment with text "([^"]*)"$/ do |comment_text|
|
||||
comment_guid = Comment.find_by(text: comment_text).guid
|
||||
within(id: comment_guid) do
|
||||
find(".entypo-heart.like-action").click
|
||||
end
|
||||
end
|
||||
|
||||
Then /^I should see a like on comment with text "([^"]*)"$/ do |comment_text|
|
||||
comment_guid = Comment.find_by(text: comment_text).guid
|
||||
within(id: comment_guid) do
|
||||
find(".entypo-heart.like-action.active")
|
||||
expect(find(".count.like-count")).to have_text "1"
|
||||
end
|
||||
end
|
||||
|
||||
Then /^I should see an unliked comment with text "([^"]*)"$/ do |comment_text|
|
||||
comment_guid = Comment.find_by(text: comment_text).guid
|
||||
within(id: comment_guid) do
|
||||
find(".entypo-heart.like-action.inactive")
|
||||
expect(find(".count.like-count")).to have_text "0"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user