capybara 2.14.2 → 2.14.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2dc6b7471732df96709e856d00f104f1e2f43aac
4
- data.tar.gz: 7c8e722e733587c8f3854e461f7e5ab168a93c26
3
+ metadata.gz: 02dc31ca457043556ca668229aa313e59b198363
4
+ data.tar.gz: 13528d46037d76c4deabfdfd57d2da09e45b7f01
5
5
  SHA512:
6
- metadata.gz: 18629cb7fd46d4d80ee6de85508ebd7349ee9544cf0653b421c4184e13a289edad3da27a5ba7eeca44a3921c7b0db24de9d7440c56955a97d8b9dfa4d7b8ac0e
7
- data.tar.gz: 81ec7b11745dfc178f4c1c9c57d7b6dbc0f56b1f5ec68bde85ed3375fee04fcd9ed7f4c6a19a040b13556400933e67a4c246bc0873e7b02370ec17ea251cf1f3
6
+ metadata.gz: 0a98665ce0452986b3f6a138b29a53fadaf3f2fc0ada1332005062845585ced403c0ea352facaf34c8b80915581e3122b51fa53b158f7348d05afef47ca4a17e
7
+ data.tar.gz: 2a24b9da7fda6168106dedc1d621ab9184fa16ec391003199c85a3468b17535de939e9a044c715ac1c42b4cc9d907f41f3db8af808ffbb1256bb3d5a06c078f6
data/History.md CHANGED
@@ -1,3 +1,12 @@
1
+ # Version 2.14.3
2
+
3
+ Release date: 2017-06-15
4
+
5
+ ### Fixed
6
+
7
+ * Minitest assertions now raise the correct error type - Issue #1879 [Thomas Walpole]
8
+ * Improve flexibility of detecting Chrome headless mode [Thomas Walpole]
9
+
1
10
  # Version 2.14.2
2
11
 
3
12
  Release date: 2017-06-09
@@ -49,7 +49,7 @@ module Capybara
49
49
  subject, *args = determine_subject(args)
50
50
  subject.#{assertion_name}(*args)
51
51
  rescue Capybara::ExpectationNotMet => e
52
- raise ::Minitest::Assertions, e.message
52
+ raise ::Minitest::Assertion, e.message
53
53
  end
54
54
  EOM
55
55
  end
@@ -88,7 +88,7 @@ module Capybara
88
88
  subject, *args = determine_subject(args)
89
89
  subject.#{assertion_name}(*args, &optional_filter_block)
90
90
  rescue Capybara::ExpectationNotMet => e
91
- raise ::Minitest::Assertions, e.message
91
+ raise ::Minitest::Assertion, e.message
92
92
  end
93
93
  EOM
94
94
  end
@@ -308,9 +308,16 @@ class Capybara::Selenium::Driver < Capybara::Driver::Base
308
308
 
309
309
  # @api private
310
310
  def headless_chrome?
311
- chrome? && ((@processed_options[:desired_capabilities][:chrome_options] || {})['args'] || []).include?("headless")
311
+ if chrome?
312
+ caps = @processed_options[:desired_capabilities]
313
+ chrome_options = caps[:chrome_options] || caps[:chromeOptions] || {}
314
+ args = chrome_options['args'] || chrome_options[:args] || []
315
+ return args.include?("headless")
316
+ end
317
+ return false
312
318
  end
313
319
 
320
+
314
321
  # @deprecated This method is being removed
315
322
  def browser_initialized?
316
323
  super && !@browser.nil?
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Capybara
3
- VERSION = '2.14.2'
3
+ VERSION = '2.14.3'
4
4
  end
@@ -102,6 +102,10 @@ class MinitestSpecTest < Minitest::Spec
102
102
  find(:select, 'form_title').must_match_xpath('.//select[@id="form_title"]')
103
103
  find(:select, 'form_title').wont_match_xpath('.//select[@id="not_on_page"]')
104
104
  end
105
+
106
+ it "handles failures" do
107
+ page.must_have_select('non_existing_form_title')
108
+ end
105
109
  end
106
110
 
107
111
  RSpec.describe 'capybara/minitest/spec' do
@@ -116,6 +120,8 @@ RSpec.describe 'capybara/minitest/spec' do
116
120
  reporter.start
117
121
  MinitestSpecTest.run reporter, {}
118
122
  reporter.report
119
- expect(output.string).to include("15 runs, 38 assertions, 0 failures, 0 errors, 0 skips")
123
+ expect(output.string).to include("16 runs, 39 assertions, 1 failures, 0 errors, 0 skips")
124
+ #Make sure error messages are displayed
125
+ expect(output.string).to include('expected to find select box "non_existing_form_title" but there were no matches')
120
126
  end
121
127
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.14.2
4
+ version: 2.14.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Walpole
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain:
12
12
  - gem-public_cert.pem
13
- date: 2017-06-09 00:00:00.000000000 Z
13
+ date: 2017-06-15 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: nokogiri
@@ -106,6 +106,9 @@ dependencies:
106
106
  - - "<"
107
107
  - !ruby/object:Gem::Version
108
108
  version: '4.0'
109
+ - - "!="
110
+ - !ruby/object:Gem::Version
111
+ version: 3.4.1
109
112
  type: :development
110
113
  prerelease: false
111
114
  version_requirements: !ruby/object:Gem::Requirement
@@ -116,6 +119,9 @@ dependencies:
116
119
  - - "<"
117
120
  - !ruby/object:Gem::Version
118
121
  version: '4.0'
122
+ - - "!="
123
+ - !ruby/object:Gem::Version
124
+ version: 3.4.1
119
125
  - !ruby/object:Gem::Dependency
120
126
  name: sinatra
121
127
  requirement: !ruby/object:Gem::Requirement