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