Commit 1743cbf1d8f7fde1595c6b95a417f8a5e2f4d62c
1 parent
c351b8a3
Exists in
master
and in
4 other branches
Update capybara to 2.1, poltergeist to master
Showing
6 changed files
with
44 additions
and
45 deletions
Show diff stats
Gemfile
| ... | ... | @@ -167,7 +167,7 @@ group :development, :test do |
| 167 | 167 | gem 'rb-inotify', require: linux_only('rb-inotify') |
| 168 | 168 | |
| 169 | 169 | # PhantomJS driver for Capybara |
| 170 | - gem 'poltergeist', '1.1.0' | |
| 170 | + gem 'poltergeist', git: 'https://github.com/jonleighton/poltergeist.git', ref: '9645b52009e258921b860d3b7601d00008b22c45' | |
| 171 | 171 | |
| 172 | 172 | gem 'spork', '~> 1.0rc' |
| 173 | 173 | end | ... | ... |
Gemfile.lock
| ... | ... | @@ -39,6 +39,16 @@ GIT |
| 39 | 39 | stringex (~> 1.5.1) |
| 40 | 40 | useragent (~> 0.4.16) |
| 41 | 41 | |
| 42 | +GIT | |
| 43 | + remote: https://github.com/jonleighton/poltergeist.git | |
| 44 | + revision: 9645b52009e258921b860d3b7601d00008b22c45 | |
| 45 | + ref: 9645b52009e258921b860d3b7601d00008b22c45 | |
| 46 | + specs: | |
| 47 | + poltergeist (1.1.0) | |
| 48 | + capybara (~> 2.0, >= 2.0.1) | |
| 49 | + faye-websocket (~> 0.4, >= 0.4.4) | |
| 50 | + http_parser.rb (~> 0.5.3) | |
| 51 | + | |
| 42 | 52 | GEM |
| 43 | 53 | remote: https://rubygems.org/ |
| 44 | 54 | specs: |
| ... | ... | @@ -84,13 +94,12 @@ GEM |
| 84 | 94 | bootstrap-sass (2.2.1.1) |
| 85 | 95 | sass (~> 3.2) |
| 86 | 96 | builder (3.0.4) |
| 87 | - capybara (2.0.2) | |
| 97 | + capybara (2.1.0) | |
| 88 | 98 | mime-types (>= 1.16) |
| 89 | 99 | nokogiri (>= 1.3.3) |
| 90 | 100 | rack (>= 1.0.0) |
| 91 | 101 | rack-test (>= 0.5.4) |
| 92 | - selenium-webdriver (~> 2.0) | |
| 93 | - xpath (~> 1.0.0) | |
| 102 | + xpath (~> 2.0) | |
| 94 | 103 | carrierwave (0.8.0) |
| 95 | 104 | activemodel (>= 3.2.0) |
| 96 | 105 | activesupport (>= 3.2.0) |
| ... | ... | @@ -98,8 +107,6 @@ GEM |
| 98 | 107 | facter (>= 1.6.12) |
| 99 | 108 | timers (>= 1.0.0) |
| 100 | 109 | charlock_holmes (0.6.9) |
| 101 | - childprocess (0.3.8) | |
| 102 | - ffi (~> 1.0, >= 1.0.11) | |
| 103 | 110 | chosen-rails (0.9.8) |
| 104 | 111 | railties (~> 3.0) |
| 105 | 112 | thor (~> 0.14) |
| ... | ... | @@ -154,7 +161,7 @@ GEM |
| 154 | 161 | faye-websocket (0.4.7) |
| 155 | 162 | eventmachine (>= 0.12.0) |
| 156 | 163 | ffaker (1.15.0) |
| 157 | - ffi (1.4.0) | |
| 164 | + ffi (1.6.0) | |
| 158 | 165 | font-awesome-sass-rails (3.0.0.1) |
| 159 | 166 | railties (>= 3.1.1) |
| 160 | 167 | sass-rails (>= 3.1.1) |
| ... | ... | @@ -218,7 +225,7 @@ GEM |
| 218 | 225 | haml (>= 3.1, < 4.1) |
| 219 | 226 | railties (>= 3.1, < 4.1) |
| 220 | 227 | hashie (1.2.0) |
| 221 | - hike (1.2.1) | |
| 228 | + hike (1.2.2) | |
| 222 | 229 | http_parser.rb (0.5.3) |
| 223 | 230 | httparty (0.10.2) |
| 224 | 231 | multi_json (~> 1.0) |
| ... | ... | @@ -251,7 +258,7 @@ GEM |
| 251 | 258 | mime-types (~> 1.16) |
| 252 | 259 | treetop (~> 1.4.8) |
| 253 | 260 | method_source (0.8.1) |
| 254 | - mime-types (1.21) | |
| 261 | + mime-types (1.22) | |
| 255 | 262 | modernizr (2.6.2) |
| 256 | 263 | sprockets (~> 2.0) |
| 257 | 264 | multi_json (1.7.2) |
| ... | ... | @@ -260,7 +267,7 @@ GEM |
| 260 | 267 | mustache (0.99.4) |
| 261 | 268 | mysql2 (0.3.11) |
| 262 | 269 | net-ldap (0.2.2) |
| 263 | - nokogiri (1.5.6) | |
| 270 | + nokogiri (1.5.9) | |
| 264 | 271 | oauth (0.4.7) |
| 265 | 272 | oauth2 (0.8.1) |
| 266 | 273 | faraday (~> 0.8) |
| ... | ... | @@ -288,10 +295,6 @@ GEM |
| 288 | 295 | omniauth-oauth (~> 1.0) |
| 289 | 296 | orm_adapter (0.4.0) |
| 290 | 297 | pg (0.14.1) |
| 291 | - poltergeist (1.1.0) | |
| 292 | - capybara (~> 2.0, >= 2.0.1) | |
| 293 | - faye-websocket (~> 0.4, >= 0.4.4) | |
| 294 | - http_parser.rb (~> 0.5.3) | |
| 295 | 298 | polyglot (0.3.3) |
| 296 | 299 | posix-spawn (0.3.6) |
| 297 | 300 | pry (0.9.12) |
| ... | ... | @@ -393,7 +396,6 @@ GEM |
| 393 | 396 | rspec-mocks (~> 2.13.0) |
| 394 | 397 | ruby-progressbar (1.0.2) |
| 395 | 398 | rubyntlm (0.1.1) |
| 396 | - rubyzip (0.9.9) | |
| 397 | 399 | sanitize (2.0.3) |
| 398 | 400 | nokogiri (>= 1.4.4, < 1.6) |
| 399 | 401 | sass (3.2.7) |
| ... | ... | @@ -410,11 +412,6 @@ GEM |
| 410 | 412 | select2-rails (3.3.1) |
| 411 | 413 | sass-rails (>= 3.2) |
| 412 | 414 | thor (~> 0.14) |
| 413 | - selenium-webdriver (2.30.0) | |
| 414 | - childprocess (>= 0.2.5) | |
| 415 | - multi_json (~> 1.0) | |
| 416 | - rubyzip | |
| 417 | - websocket (~> 1.0.4) | |
| 418 | 415 | settingslogic (2.0.9) |
| 419 | 416 | sexp_processor (4.2.0) |
| 420 | 417 | shoulda-matchers (1.3.0) |
| ... | ... | @@ -438,11 +435,11 @@ GEM |
| 438 | 435 | temple (~> 0.5.5) |
| 439 | 436 | tilt (~> 1.3.3) |
| 440 | 437 | slop (3.4.4) |
| 441 | - spinach (0.7.0) | |
| 442 | - colorize | |
| 443 | - gherkin-ruby (~> 0.2.0) | |
| 444 | - spinach-rails (0.2.0) | |
| 445 | - capybara (~> 2.0.0) | |
| 438 | + spinach (0.8.1) | |
| 439 | + colorize (= 0.5.8) | |
| 440 | + gherkin-ruby (~> 0.2.1) | |
| 441 | + spinach-rails (0.1.7) | |
| 442 | + capybara (>= 1.0) | |
| 446 | 443 | railties (>= 3) |
| 447 | 444 | spinach (>= 0.4) |
| 448 | 445 | spork (1.0.0rc3) |
| ... | ... | @@ -464,8 +461,8 @@ GEM |
| 464 | 461 | daemons (>= 1.0.9) |
| 465 | 462 | eventmachine (>= 0.12.6) |
| 466 | 463 | rack (>= 1.0.0) |
| 467 | - thor (0.18.0) | |
| 468 | - tilt (1.3.6) | |
| 464 | + thor (0.18.1) | |
| 465 | + tilt (1.3.7) | |
| 469 | 466 | timers (1.1.0) |
| 470 | 467 | treetop (1.4.12) |
| 471 | 468 | polyglot |
| ... | ... | @@ -483,8 +480,7 @@ GEM |
| 483 | 480 | webmock (1.9.0) |
| 484 | 481 | addressable (>= 2.2.7) |
| 485 | 482 | crack (>= 0.1.7) |
| 486 | - websocket (1.0.7) | |
| 487 | - xpath (1.0.0) | |
| 483 | + xpath (2.0.0) | |
| 488 | 484 | nokogiri (~> 1.3) |
| 489 | 485 | yajl-ruby (1.1.0) |
| 490 | 486 | |
| ... | ... | @@ -544,7 +540,7 @@ DEPENDENCIES |
| 544 | 540 | omniauth-google-oauth2 |
| 545 | 541 | omniauth-twitter |
| 546 | 542 | pg |
| 547 | - poltergeist (= 1.1.0) | |
| 543 | + poltergeist! | |
| 548 | 544 | pry |
| 549 | 545 | puma (~> 2.0.0.b7) |
| 550 | 546 | quiet_assets (~> 1.0.1) | ... | ... |
features/steps/project/project_merge_requests.rb
| ... | ... | @@ -97,7 +97,7 @@ class ProjectMergeRequests < Spinach::FeatureSteps |
| 97 | 97 | end |
| 98 | 98 | |
| 99 | 99 | And 'I leave a comment on the diff page' do |
| 100 | - find("#4735dfc552ad7bf15ca468adc3cad9d05b624490_185_185 .add-diff-note").click | |
| 100 | + init_diff_note | |
| 101 | 101 | |
| 102 | 102 | within('.js-temp-notes-holder') do |
| 103 | 103 | fill_in "note_note", with: "One comment to rule them all" |
| ... | ... | @@ -106,7 +106,7 @@ class ProjectMergeRequests < Spinach::FeatureSteps |
| 106 | 106 | end |
| 107 | 107 | |
| 108 | 108 | And 'I leave a comment like "Line is wrong" on line 185 of the first file' do |
| 109 | - find("#4735dfc552ad7bf15ca468adc3cad9d05b624490_185_185 .add-diff-note").click | |
| 109 | + init_diff_note | |
| 110 | 110 | |
| 111 | 111 | within(".js-temp-notes-holder") do |
| 112 | 112 | fill_in "note_note", with: "Line is wrong" |
| ... | ... | @@ -140,4 +140,8 @@ class ProjectMergeRequests < Spinach::FeatureSteps |
| 140 | 140 | def merge_request |
| 141 | 141 | @merge_request ||= MergeRequest.find_by_title!("Bug NS-05") |
| 142 | 142 | end |
| 143 | + | |
| 144 | + def init_diff_note | |
| 145 | + find('a[data-line-code="4735dfc552ad7bf15ca468adc3cad9d05b624490_185_185"]').click | |
| 146 | + end | |
| 143 | 147 | end | ... | ... |
features/steps/shared/diff_note.rb
| ... | ... | @@ -3,15 +3,13 @@ module SharedDiffNote |
| 3 | 3 | |
| 4 | 4 | Given 'I cancel the diff comment' do |
| 5 | 5 | within(".file") do |
| 6 | - find(".js-close-discussion-note-form").trigger("click") | |
| 6 | + find(".js-close-discussion-note-form").click | |
| 7 | 7 | end |
| 8 | 8 | end |
| 9 | 9 | |
| 10 | 10 | Given 'I delete a diff comment' do |
| 11 | - sleep 1 | |
| 12 | - within(".file") do | |
| 13 | - first(".js-note-delete").trigger("click") | |
| 14 | - end | |
| 11 | + find('.note').hover | |
| 12 | + find(".js-note-delete").click | |
| 15 | 13 | end |
| 16 | 14 | |
| 17 | 15 | Given 'I haven\'t written any diff comment text' do |
| ... | ... | @@ -21,17 +19,16 @@ module SharedDiffNote |
| 21 | 19 | end |
| 22 | 20 | |
| 23 | 21 | Given 'I leave a diff comment like "Typo, please fix"' do |
| 24 | - find("#586fb7c4e1add2d4d24e27566ed7064680098646_29_14.line_holder .js-add-diff-note-button").trigger("click") | |
| 22 | + find('a[data-line-code="586fb7c4e1add2d4d24e27566ed7064680098646_29_14"]').click | |
| 25 | 23 | within(".file form[rel$='586fb7c4e1add2d4d24e27566ed7064680098646_29_14']") do |
| 26 | 24 | fill_in "note[note]", with: "Typo, please fix" |
| 27 | - #click_button("Add Comment") | |
| 28 | 25 | find(".js-comment-button").trigger("click") |
| 29 | 26 | sleep 0.05 |
| 30 | 27 | end |
| 31 | 28 | end |
| 32 | 29 | |
| 33 | 30 | Given 'I preview a diff comment text like "Should fix it :smile:"' do |
| 34 | - find("#586fb7c4e1add2d4d24e27566ed7064680098646_29_14.line_holder .js-add-diff-note-button").trigger("click") | |
| 31 | + find('a[data-line-code="586fb7c4e1add2d4d24e27566ed7064680098646_29_14"]').click | |
| 35 | 32 | within(".file form[rel$='586fb7c4e1add2d4d24e27566ed7064680098646_29_14']") do |
| 36 | 33 | fill_in "note[note]", with: "Should fix it :smile:" |
| 37 | 34 | find(".js-note-preview-button").trigger("click") |
| ... | ... | @@ -39,7 +36,8 @@ module SharedDiffNote |
| 39 | 36 | end |
| 40 | 37 | |
| 41 | 38 | Given 'I preview another diff comment text like "DRY this up"' do |
| 42 | - find("#586fb7c4e1add2d4d24e27566ed7064680098646_57_41.line_holder .js-add-diff-note-button").trigger("click") | |
| 39 | + find('a[data-line-code="586fb7c4e1add2d4d24e27566ed7064680098646_57_41"]').click | |
| 40 | + | |
| 43 | 41 | within(".file form[rel$='586fb7c4e1add2d4d24e27566ed7064680098646_57_41']") do |
| 44 | 42 | fill_in "note[note]", with: "DRY this up" |
| 45 | 43 | find(".js-note-preview-button").trigger("click") |
| ... | ... | @@ -47,11 +45,11 @@ module SharedDiffNote |
| 47 | 45 | end |
| 48 | 46 | |
| 49 | 47 | Given 'I open a diff comment form' do |
| 50 | - find("#586fb7c4e1add2d4d24e27566ed7064680098646_29_14.line_holder .js-add-diff-note-button").trigger("click") | |
| 48 | + find('a[data-line-code="586fb7c4e1add2d4d24e27566ed7064680098646_29_14"]').click | |
| 51 | 49 | end |
| 52 | 50 | |
| 53 | 51 | Given 'I open another diff comment form' do |
| 54 | - find("#586fb7c4e1add2d4d24e27566ed7064680098646_57_41.line_holder .js-add-diff-note-button").trigger("click") | |
| 52 | + find('a[data-line-code="586fb7c4e1add2d4d24e27566ed7064680098646_57_41"]').click | |
| 55 | 53 | end |
| 56 | 54 | |
| 57 | 55 | Given 'I write a diff comment like ":-1: I don\'t like this"' do | ... | ... |
features/steps/shared/note.rb
spec/routing/project_routing_spec.rb
| ... | ... | @@ -308,6 +308,7 @@ end |
| 308 | 308 | # DELETE /:project_id/team_members/:id(.:format) team_members#destroy |
| 309 | 309 | describe TeamMembersController, "routing" do |
| 310 | 310 | it_behaves_like "RESTful project resources" do |
| 311 | + let(:actions) { [:new, :create, :update, :destroy] } | |
| 311 | 312 | let(:controller) { 'team_members' } |
| 312 | 313 | end |
| 313 | 314 | end | ... | ... |