fix and stablize some cukes
This commit is contained in:
parent
2c6e9a9786
commit
01c4fa18d3
7 changed files with 20 additions and 12 deletions
2
Gemfile
2
Gemfile
|
|
@ -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'
|
||||
|
||||
|
|
|
|||
10
Gemfile.lock
10
Gemfile.lock
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue