Commit 01c4fa18 authored by Jonne Haß's avatar Jonne Haß
Browse files

fix and stablize some cukes

parent 2c6e9a97
......@@ -124,7 +124,7 @@ gem 'typhoeus', '0.6.8'
gem 'gon', '5.0.4'
gem 'haml', '4.0.5'
gem 'mobile-fu', '1.2.2'
gem 'mobile-fu', '1.3.1'
gem 'will_paginate', '3.0.5'
gem 'rails-timeago', '2.4.0'
......
......@@ -93,12 +93,12 @@ GEM
connection_pool (1.2.0)
crack (0.4.2)
safe_yaml (~> 1.0.0)
cucumber (1.3.15)
cucumber (1.3.16)
builder (>= 2.1.2)
diff-lcs (>= 1.1.3)
gherkin (~> 2.12)
multi_json (>= 1.7.5, < 2.0)
multi_test (>= 0.0.2)
multi_test (>= 0.1.1)
cucumber-rails (1.4.1)
capybara (>= 1.1.2, < 3)
cucumber (>= 1.3.8, < 2)
......@@ -255,11 +255,11 @@ GEM
subexec (~> 0.2.1)
mini_portile (0.5.3)
minitest (4.7.5)
mobile-fu (1.2.2)
mobile-fu (1.3.1)
rack-mobile-detect
rails
multi_json (1.10.1)
multi_test (0.0.3)
multi_test (0.1.1)
multipart-post (1.2.0)
mysql2 (0.3.16)
nested_form (0.3.2)
......@@ -513,7 +513,7 @@ DEPENDENCIES
markerb (= 1.0.2)
messagebus_ruby_api (= 1.0.3)
mini_magick (= 3.7.0)
mobile-fu (= 1.2.2)
mobile-fu (= 1.3.1)
mysql2 (= 0.3.16)
nokogiri (= 1.6.1)
omniauth (= 1.2.1)
......
......@@ -47,7 +47,9 @@ class CommentsController < ApplicationController
end
def new
render :layout => false
respond_to do |format|
format.mobile { render :layout => false }
end
end
def index
......
......@@ -42,7 +42,7 @@ module MobileHelper
def additional_photos
if photo.status_message_guid?
@additional_photos ||= photo.status_message.photos
@additional_photos ||= photo.status_message.photos.order(:created_at)
end
end
......
......@@ -18,17 +18,19 @@ Feature: reactions mobile post
When I should see "0 reactions" within ".show_comments"
And I click on selector "span.show_comments"
And I click on selector "a.image_link.like_action.inactive"
Then I go to the stream page
Then I should see a "a.image_link.like_action.active"
When I go to the stream page
And I should see "1 reaction" within ".show_comments"
And I click on selector "a.show_comments"
And I should see "1" within ".like_count"
Then I should see "1" within ".like_count"
Scenario: comment and delete a mobile post
When I click on selector "a.image_link.comment_action.inactive"
And I fill in the following:
| text | is that a poodle? |
And I press "Comment"
Then I go to the stream page
Then I should see "is that a poodle?"
When I go to the stream page
And I should see "1 reaction" within ".show_comments"
And I click on selector "a.show_comments"
And I should see "1" within ".comment_count"
......
......@@ -121,7 +121,10 @@ end
When /^I (?:add|remove) the person (?:to|from) my "([^\"]*)" aspect$/ do |aspect_name|
aspects_dropdown = find(".aspect_membership .toggle.button", match: :first)
aspects_dropdown.click
find(".dropdown.active .dropdown_list li", text: aspect_name).click
aspect = find(".dropdown.active .dropdown_list li", text: aspect_name)
aspect.click
aspect.parent.should have_css(".loading")
aspect.parent.should_not have_css(".loading")
aspects_dropdown.click
end
......
......@@ -74,6 +74,7 @@ module PublishingCukeHelpers
end
def find_post_by_text(text)
page.should have_text(text)
find(".stream_element", text: text)
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment