diff options
author | flaburgan <flaburgan@geexxx.fr> | 2019-04-28 16:02:28 +0300 |
---|---|---|
committer | Jonne Haß <me@jhass.eu> | 2019-05-03 18:17:32 +0300 |
commit | 83a9877def158b282a9afe0d424bc81329e2b1c5 (patch) | |
tree | a4cf7b216bf732ac7e8a02f6aa588da618c91859 /features/step_definitions/stream_steps.rb | |
parent | 554faa41164d67dfc3864b6e4cdda6f55a337e18 (diff) |
Improve likes steps
closes #8002
Diffstat (limited to 'features/step_definitions/stream_steps.rb')
-rw-r--r-- | features/step_definitions/stream_steps.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/features/step_definitions/stream_steps.rb b/features/step_definitions/stream_steps.rb index eacc1668e..853df81ca 100644 --- a/features/step_definitions/stream_steps.rb +++ b/features/step_definitions/stream_steps.rb @@ -4,6 +4,35 @@ When /^I (?:like|unlike) the post "([^"]*)" in the stream$/ do |post_text| like_stream_post(post_text) 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| stream_element_numbers_content(position).should have_content(post_text) end |