fix and stablize some cukes

This commit is contained in:
Jonne Haß 2014-08-24 01:01:38 +02:00
parent 2c6e9a9786
commit 01c4fa18d3
7 changed files with 20 additions and 12 deletions

View file

@ -124,7 +124,7 @@ gem 'typhoeus', '0.6.8'
gem 'gon', '5.0.4' gem 'gon', '5.0.4'
gem 'haml', '4.0.5' gem 'haml', '4.0.5'
gem 'mobile-fu', '1.2.2' gem 'mobile-fu', '1.3.1'
gem 'will_paginate', '3.0.5' gem 'will_paginate', '3.0.5'
gem 'rails-timeago', '2.4.0' gem 'rails-timeago', '2.4.0'

View file

@ -93,12 +93,12 @@ GEM
connection_pool (1.2.0) connection_pool (1.2.0)
crack (0.4.2) crack (0.4.2)
safe_yaml (~> 1.0.0) safe_yaml (~> 1.0.0)
cucumber (1.3.15) cucumber (1.3.16)
builder (>= 2.1.2) builder (>= 2.1.2)
diff-lcs (>= 1.1.3) diff-lcs (>= 1.1.3)
gherkin (~> 2.12) gherkin (~> 2.12)
multi_json (>= 1.7.5, < 2.0) multi_json (>= 1.7.5, < 2.0)
multi_test (>= 0.0.2) multi_test (>= 0.1.1)
cucumber-rails (1.4.1) cucumber-rails (1.4.1)
capybara (>= 1.1.2, < 3) capybara (>= 1.1.2, < 3)
cucumber (>= 1.3.8, < 2) cucumber (>= 1.3.8, < 2)
@ -255,11 +255,11 @@ GEM
subexec (~> 0.2.1) subexec (~> 0.2.1)
mini_portile (0.5.3) mini_portile (0.5.3)
minitest (4.7.5) minitest (4.7.5)
mobile-fu (1.2.2) mobile-fu (1.3.1)
rack-mobile-detect rack-mobile-detect
rails rails
multi_json (1.10.1) multi_json (1.10.1)
multi_test (0.0.3) multi_test (0.1.1)
multipart-post (1.2.0) multipart-post (1.2.0)
mysql2 (0.3.16) mysql2 (0.3.16)
nested_form (0.3.2) nested_form (0.3.2)
@ -513,7 +513,7 @@ DEPENDENCIES
markerb (= 1.0.2) markerb (= 1.0.2)
messagebus_ruby_api (= 1.0.3) messagebus_ruby_api (= 1.0.3)
mini_magick (= 3.7.0) mini_magick (= 3.7.0)
mobile-fu (= 1.2.2) mobile-fu (= 1.3.1)
mysql2 (= 0.3.16) mysql2 (= 0.3.16)
nokogiri (= 1.6.1) nokogiri (= 1.6.1)
omniauth (= 1.2.1) omniauth (= 1.2.1)

View file

@ -47,7 +47,9 @@ class CommentsController < ApplicationController
end end
def new def new
render :layout => false respond_to do |format|
format.mobile { render :layout => false }
end
end end
def index def index

View file

@ -42,7 +42,7 @@ module MobileHelper
def additional_photos def additional_photos
if photo.status_message_guid? if photo.status_message_guid?
@additional_photos ||= photo.status_message.photos @additional_photos ||= photo.status_message.photos.order(:created_at)
end end
end end

View file

@ -18,17 +18,19 @@ Feature: reactions mobile post
When I should see "0 reactions" within ".show_comments" When I should see "0 reactions" within ".show_comments"
And I click on selector "span.show_comments" And I click on selector "span.show_comments"
And I click on selector "a.image_link.like_action.inactive" 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 should see "1 reaction" within ".show_comments"
And I click on selector "a.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 Scenario: comment and delete a mobile post
When I click on selector "a.image_link.comment_action.inactive" When I click on selector "a.image_link.comment_action.inactive"
And I fill in the following: And I fill in the following:
| text | is that a poodle? | | text | is that a poodle? |
And I press "Comment" 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 should see "1 reaction" within ".show_comments"
And I click on selector "a.show_comments" And I click on selector "a.show_comments"
And I should see "1" within ".comment_count" And I should see "1" within ".comment_count"

View file

@ -121,7 +121,10 @@ end
When /^I (?:add|remove) the person (?:to|from) my "([^\"]*)" aspect$/ do |aspect_name| When /^I (?:add|remove) the person (?:to|from) my "([^\"]*)" aspect$/ do |aspect_name|
aspects_dropdown = find(".aspect_membership .toggle.button", match: :first) aspects_dropdown = find(".aspect_membership .toggle.button", match: :first)
aspects_dropdown.click 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 aspects_dropdown.click
end end

View file

@ -74,6 +74,7 @@ module PublishingCukeHelpers
end end
def find_post_by_text(text) def find_post_by_text(text)
page.should have_text(text)
find(".stream_element", text: text) find(".stream_element", text: text)
end end