Commit 1743cbf1 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Update capybara to 2.1, poltergeist to master

parent c351b8a3
......@@ -167,7 +167,7 @@ group :development, :test do
gem 'rb-inotify', require: linux_only('rb-inotify')
# PhantomJS driver for Capybara
gem 'poltergeist', '1.1.0'
gem 'poltergeist', git: 'https://github.com/jonleighton/poltergeist.git', ref: '9645b52009e258921b860d3b7601d00008b22c45'
gem 'spork', '~> 1.0rc'
end
......
......@@ -39,6 +39,16 @@ GIT
stringex (~> 1.5.1)
useragent (~> 0.4.16)
GIT
remote: https://github.com/jonleighton/poltergeist.git
revision: 9645b52009e258921b860d3b7601d00008b22c45
ref: 9645b52009e258921b860d3b7601d00008b22c45
specs:
poltergeist (1.1.0)
capybara (~> 2.0, >= 2.0.1)
faye-websocket (~> 0.4, >= 0.4.4)
http_parser.rb (~> 0.5.3)
GEM
remote: https://rubygems.org/
specs:
......@@ -84,13 +94,12 @@ GEM
bootstrap-sass (2.2.1.1)
sass (~> 3.2)
builder (3.0.4)
capybara (2.0.2)
capybara (2.1.0)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0)
xpath (~> 1.0.0)
xpath (~> 2.0)
carrierwave (0.8.0)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
......@@ -98,8 +107,6 @@ GEM
facter (>= 1.6.12)
timers (>= 1.0.0)
charlock_holmes (0.6.9)
childprocess (0.3.8)
ffi (~> 1.0, >= 1.0.11)
chosen-rails (0.9.8)
railties (~> 3.0)
thor (~> 0.14)
......@@ -154,7 +161,7 @@ GEM
faye-websocket (0.4.7)
eventmachine (>= 0.12.0)
ffaker (1.15.0)
ffi (1.4.0)
ffi (1.6.0)
font-awesome-sass-rails (3.0.0.1)
railties (>= 3.1.1)
sass-rails (>= 3.1.1)
......@@ -218,7 +225,7 @@ GEM
haml (>= 3.1, < 4.1)
railties (>= 3.1, < 4.1)
hashie (1.2.0)
hike (1.2.1)
hike (1.2.2)
http_parser.rb (0.5.3)
httparty (0.10.2)
multi_json (~> 1.0)
......@@ -251,7 +258,7 @@ GEM
mime-types (~> 1.16)
treetop (~> 1.4.8)
method_source (0.8.1)
mime-types (1.21)
mime-types (1.22)
modernizr (2.6.2)
sprockets (~> 2.0)
multi_json (1.7.2)
......@@ -260,7 +267,7 @@ GEM
mustache (0.99.4)
mysql2 (0.3.11)
net-ldap (0.2.2)
nokogiri (1.5.6)
nokogiri (1.5.9)
oauth (0.4.7)
oauth2 (0.8.1)
faraday (~> 0.8)
......@@ -288,10 +295,6 @@ GEM
omniauth-oauth (~> 1.0)
orm_adapter (0.4.0)
pg (0.14.1)
poltergeist (1.1.0)
capybara (~> 2.0, >= 2.0.1)
faye-websocket (~> 0.4, >= 0.4.4)
http_parser.rb (~> 0.5.3)
polyglot (0.3.3)
posix-spawn (0.3.6)
pry (0.9.12)
......@@ -393,7 +396,6 @@ GEM
rspec-mocks (~> 2.13.0)
ruby-progressbar (1.0.2)
rubyntlm (0.1.1)
rubyzip (0.9.9)
sanitize (2.0.3)
nokogiri (>= 1.4.4, < 1.6)
sass (3.2.7)
......@@ -410,11 +412,6 @@ GEM
select2-rails (3.3.1)
sass-rails (>= 3.2)
thor (~> 0.14)
selenium-webdriver (2.30.0)
childprocess (>= 0.2.5)
multi_json (~> 1.0)
rubyzip
websocket (~> 1.0.4)
settingslogic (2.0.9)
sexp_processor (4.2.0)
shoulda-matchers (1.3.0)
......@@ -438,11 +435,11 @@ GEM
temple (~> 0.5.5)
tilt (~> 1.3.3)
slop (3.4.4)
spinach (0.7.0)
colorize
gherkin-ruby (~> 0.2.0)
spinach-rails (0.2.0)
capybara (~> 2.0.0)
spinach (0.8.1)
colorize (= 0.5.8)
gherkin-ruby (~> 0.2.1)
spinach-rails (0.1.7)
capybara (>= 1.0)
railties (>= 3)
spinach (>= 0.4)
spork (1.0.0rc3)
......@@ -464,8 +461,8 @@ GEM
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
rack (>= 1.0.0)
thor (0.18.0)
tilt (1.3.6)
thor (0.18.1)
tilt (1.3.7)
timers (1.1.0)
treetop (1.4.12)
polyglot
......@@ -483,8 +480,7 @@ GEM
webmock (1.9.0)
addressable (>= 2.2.7)
crack (>= 0.1.7)
websocket (1.0.7)
xpath (1.0.0)
xpath (2.0.0)
nokogiri (~> 1.3)
yajl-ruby (1.1.0)
......@@ -544,7 +540,7 @@ DEPENDENCIES
omniauth-google-oauth2
omniauth-twitter
pg
poltergeist (= 1.1.0)
poltergeist!
pry
puma (~> 2.0.0.b7)
quiet_assets (~> 1.0.1)
......
......@@ -97,7 +97,7 @@ class ProjectMergeRequests < Spinach::FeatureSteps
end
And 'I leave a comment on the diff page' do
find("#4735dfc552ad7bf15ca468adc3cad9d05b624490_185_185 .add-diff-note").click
init_diff_note
within('.js-temp-notes-holder') do
fill_in "note_note", with: "One comment to rule them all"
......@@ -106,7 +106,7 @@ class ProjectMergeRequests < Spinach::FeatureSteps
end
And 'I leave a comment like "Line is wrong" on line 185 of the first file' do
find("#4735dfc552ad7bf15ca468adc3cad9d05b624490_185_185 .add-diff-note").click
init_diff_note
within(".js-temp-notes-holder") do
fill_in "note_note", with: "Line is wrong"
......@@ -140,4 +140,8 @@ class ProjectMergeRequests < Spinach::FeatureSteps
def merge_request
@merge_request ||= MergeRequest.find_by_title!("Bug NS-05")
end
def init_diff_note
find('a[data-line-code="4735dfc552ad7bf15ca468adc3cad9d05b624490_185_185"]').click
end
end
......@@ -3,15 +3,13 @@ module SharedDiffNote
Given 'I cancel the diff comment' do
within(".file") do
find(".js-close-discussion-note-form").trigger("click")
find(".js-close-discussion-note-form").click
end
end
Given 'I delete a diff comment' do
sleep 1
within(".file") do
first(".js-note-delete").trigger("click")
end
find('.note').hover
find(".js-note-delete").click
end
Given 'I haven\'t written any diff comment text' do
......@@ -21,17 +19,16 @@ module SharedDiffNote
end
Given 'I leave a diff comment like "Typo, please fix"' do
find("#586fb7c4e1add2d4d24e27566ed7064680098646_29_14.line_holder .js-add-diff-note-button").trigger("click")
find('a[data-line-code="586fb7c4e1add2d4d24e27566ed7064680098646_29_14"]').click
within(".file form[rel$='586fb7c4e1add2d4d24e27566ed7064680098646_29_14']") do
fill_in "note[note]", with: "Typo, please fix"
#click_button("Add Comment")
find(".js-comment-button").trigger("click")
sleep 0.05
end
end
Given 'I preview a diff comment text like "Should fix it :smile:"' do
find("#586fb7c4e1add2d4d24e27566ed7064680098646_29_14.line_holder .js-add-diff-note-button").trigger("click")
find('a[data-line-code="586fb7c4e1add2d4d24e27566ed7064680098646_29_14"]').click
within(".file form[rel$='586fb7c4e1add2d4d24e27566ed7064680098646_29_14']") do
fill_in "note[note]", with: "Should fix it :smile:"
find(".js-note-preview-button").trigger("click")
......@@ -39,7 +36,8 @@ module SharedDiffNote
end
Given 'I preview another diff comment text like "DRY this up"' do
find("#586fb7c4e1add2d4d24e27566ed7064680098646_57_41.line_holder .js-add-diff-note-button").trigger("click")
find('a[data-line-code="586fb7c4e1add2d4d24e27566ed7064680098646_57_41"]').click
within(".file form[rel$='586fb7c4e1add2d4d24e27566ed7064680098646_57_41']") do
fill_in "note[note]", with: "DRY this up"
find(".js-note-preview-button").trigger("click")
......@@ -47,11 +45,11 @@ module SharedDiffNote
end
Given 'I open a diff comment form' do
find("#586fb7c4e1add2d4d24e27566ed7064680098646_29_14.line_holder .js-add-diff-note-button").trigger("click")
find('a[data-line-code="586fb7c4e1add2d4d24e27566ed7064680098646_29_14"]').click
end
Given 'I open another diff comment form' do
find("#586fb7c4e1add2d4d24e27566ed7064680098646_57_41.line_holder .js-add-diff-note-button").trigger("click")
find('a[data-line-code="586fb7c4e1add2d4d24e27566ed7064680098646_57_41"]').click
end
Given 'I write a diff comment like ":-1: I don\'t like this"' do
......
......@@ -2,8 +2,8 @@ module SharedNote
include Spinach::DSL
Given 'I delete a comment' do
sleep 1
first(".js-note-delete").trigger("click")
find('.note').hover
find(".js-note-delete").click
end
Given 'I haven\'t written any comment text' do
......
......@@ -308,6 +308,7 @@ end
# DELETE /:project_id/team_members/:id(.:format) team_members#destroy
describe TeamMembersController, "routing" do
it_behaves_like "RESTful project resources" do
let(:actions) { [:new, :create, :update, :destroy] }
let(:controller) { 'team_members' }
end
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