parent
554faa4116
commit
83a9877def
5 changed files with 41 additions and 8 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
## Refactor
|
## Refactor
|
||||||
* Enable paranoid mode for devise [#8003](https://github.com/diaspora/diaspora/pull/8003)
|
* Enable paranoid mode for devise [#8003](https://github.com/diaspora/diaspora/pull/8003)
|
||||||
|
* Refactor likes cucumber test [#8002](https://github.com/diaspora/diaspora/pull/8002)
|
||||||
## Bug fixes
|
## Bug fixes
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
|
||||||
|
|
@ -16,13 +16,14 @@ Feature: Liking posts
|
||||||
Scenario: Liking and unliking a post from the stream
|
Scenario: Liking and unliking a post from the stream
|
||||||
Then I should not have activated notifications for the post
|
Then I should not have activated notifications for the post
|
||||||
When I like the post "I like unicorns" in the stream
|
When I like the post "I like unicorns" in the stream
|
||||||
Then I should see "Unlike" within ".stream-element .feedback"
|
Then the post "I like unicorns" should have the "Unlike" action available
|
||||||
And I should see a ".likes .media" within "#main-stream .stream-element"
|
And the post "I like unicorns" should have 1 like
|
||||||
|
And the post "I like unicorns" should have a like from "Alice Smith"
|
||||||
And I should have activated notifications for the post
|
And I should have activated notifications for the post
|
||||||
|
|
||||||
When I unlike the post "I like unicorns" in the stream
|
When I unlike the post "I like unicorns" in the stream
|
||||||
Then I should see "Like" within ".stream-element .feedback"
|
Then the post "I like unicorns" should have the "Like" action available
|
||||||
And I should not see a ".likes .media" within "#main-stream .stream-element"
|
And the post "I like unicorns" shouldn't have any likes
|
||||||
|
|
||||||
|
|
||||||
Scenario: Liking and unliking a post from a single post page
|
Scenario: Liking and unliking a post from a single post page
|
||||||
|
|
@ -39,4 +40,6 @@ Feature: Liking posts
|
||||||
When I like the post "I like unicorns" in the stream
|
When I like the post "I like unicorns" in the stream
|
||||||
And I sign out
|
And I sign out
|
||||||
And I sign in as "bob@bob.bob"
|
And I sign in as "bob@bob.bob"
|
||||||
Then I should see a ".likes" within "#main-stream .stream-element"
|
Then the post "I like unicorns" should have the "Like" action available
|
||||||
|
And the post "I like unicorns" should have 1 like
|
||||||
|
And the post "I like unicorns" should have a like from "Alice Smith"
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ Given /^I have configured a Bitcoin address$/ do
|
||||||
end
|
end
|
||||||
|
|
||||||
Then /^I should see the Bitcoin address$/ do
|
Then /^I should see the Bitcoin address$/ do
|
||||||
find("#bitcoin_address")['value'].should == "AAAAAA"
|
find("#bitcoin_address")["value"].should == "AAAAAA"
|
||||||
end
|
end
|
||||||
|
|
||||||
Given /^I have configured a Liberapay username$/ do
|
Given /^I have configured a Liberapay username$/ do
|
||||||
|
|
|
||||||
|
|
@ -70,5 +70,6 @@ When /^I select "([^"]*)" on the aspect dropdown$/ do |text|
|
||||||
var elem = $(el);
|
var elem = $(el);
|
||||||
if ('" + text + "' == $.trim(elem.text()) ) {
|
if ('" + text + "' == $.trim(elem.text()) ) {
|
||||||
elem.click();
|
elem.click();
|
||||||
}});")
|
}});"
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,35 @@ When /^I (?:like|unlike) the post "([^"]*)" in the stream$/ do |post_text|
|
||||||
like_stream_post(post_text)
|
like_stream_post(post_text)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Then /^the post "([^"]*)" should have the "([^"]*)" action available$/ do |post_text, action_text|
|
||||||
|
within_post(post_text) do
|
||||||
|
find(".feedback").should have_content(action_text)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
Then /^the post "([^"]*)" shouldn't have any likes$/ do |post_text|
|
||||||
|
within_post(post_text) do
|
||||||
|
find(".likes").should have_no_css(".avatar", visible: true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
Then /^the post "([^"]*)" should have (\d+) like(?:s|)$/ do |post_text, likes_number|
|
||||||
|
within_post(post_text) do
|
||||||
|
find(".expand-likes").should have_content(likes_number)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
Then /^the post "([^"]*)" should have a like from "([^"]*)"$/ do |post_text, username|
|
||||||
|
within_post(post_text) do
|
||||||
|
find(".expand-likes").click
|
||||||
|
find(".likes .avatar")["data-original-title"].should have_content(username)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
Then /^I should see an image in the publisher$/ do
|
||||||
|
photo_in_publisher.should be_present
|
||||||
|
end
|
||||||
|
|
||||||
Then /^"([^"]*)" should be post (\d+)$/ do |post_text, position|
|
Then /^"([^"]*)" should be post (\d+)$/ do |post_text, position|
|
||||||
stream_element_numbers_content(position).should have_content(post_text)
|
stream_element_numbers_content(position).should have_content(post_text)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue