capybara 3.19.0 → 3.19.1

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
  SHA256:
3
- metadata.gz: cdee23fb17ec93c0e1c5e8e9b61607f11211e065ff94a99084dc28e3ff0cc24c
4
- data.tar.gz: 428519d0593d850d7c355e7300ed0805637dbbd498805b70452dcb9521a78a04
3
+ metadata.gz: 729c366399588a2a21c59d6b50a20a8a175130ad9c0d08dcea1b09c12cda560a
4
+ data.tar.gz: 5754b7164ea9b3633294653efe0a26ef8afda9bfd290d6b582e056dcdb3f0647
5
5
  SHA512:
6
- metadata.gz: dd137a4698f4c9e797ecce6da32a1fb62e2011daf412b9898ecd85f1e8146447278c0fd60350b9b9baeff37ac35d1f3da62794ec7c17dd87509f767d5847cfa7
7
- data.tar.gz: 85625218afed65274c180acb2e9cf2f8e809e52855150966f07c6db8e181dd0cd28bfd908ce39a1a53b52cdbcb09af631e7a4d5d694afd9af4330cd0588122fd
6
+ metadata.gz: daf2afa61fddc09e45ce86375f86d10d101b62e00a98ab327d2fc455f5e982b865eb8982138e66700b336952c79a3457eca9726e1a8148ad31636790852b246c
7
+ data.tar.gz: c8924cfa0209e24aaa57e692d20bda06bbbfea7e5729a20462c2c325e7d81bb0f74f542cb8d8d1f8d250ca381b57715dc3937bd17c363209c11d257ba50e6035
data/History.md CHANGED
@@ -1,11 +1,18 @@
1
+ # Version 3.19.1
2
+ Release date: 2019-05-11
3
+
4
+ ### Fixed
5
+
6
+ * Fix access to specializations when Selenium::Driver is subclassed [James Mead]
7
+
1
8
  # Version 3.19.0
2
9
  Release date: 2019-05-09
3
10
 
4
11
  ### Added
5
12
 
6
13
 
7
- * Syntactic sugar `#once`, `#twice`, `#thrice`, `#excatly`, `#at_least`, `#at_most` to
8
- `have_selector`, `have_css`, `have_xpath`, and `have_text` RSpec matchers
14
+ * Syntactic sugar `#once`, `#twice`, `#thrice`, `#exactly`, `#at_least`, `#at_most`, and `#times`
15
+ added to `have_selector`, `have_css`, `have_xpath`, and `have_text` RSpec matchers
9
16
  * Support for multiple expression types in Selector definitions
10
17
  * Reduced wirecalls for common actions in Selenium driver
11
18
 
@@ -414,7 +414,7 @@ private
414
414
 
415
415
  def specialize_driver
416
416
  browser_type = browser.browser
417
- self.class.specializations.select { |k, _v| k === browser_type }.each_value do |specialization| # rubocop:disable Style/CaseEquality
417
+ Capybara::Selenium::Driver.specializations.select { |k, _v| k === browser_type }.each_value do |specialization| # rubocop:disable Style/CaseEquality
418
418
  extend specialization
419
419
  end
420
420
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Capybara
4
- VERSION = '3.19.0'
4
+ VERSION = '3.19.1'
5
5
  end
@@ -27,6 +27,11 @@ Capybara.register_driver :selenium_chrome_not_clear_storage do |app|
27
27
  Capybara::Selenium::Driver.new(app, chrome_options.merge(clear_local_storage: false, clear_session_storage: false))
28
28
  end
29
29
 
30
+ Capybara.register_driver :selenium_driver_subclass_with_chrome do |app|
31
+ subclass = Class.new(Capybara::Selenium::Driver)
32
+ subclass.new(app, browser: :chrome, options: browser_options, timeout: 30)
33
+ end
34
+
30
35
  module TestSessions
31
36
  Chrome = Capybara::Session.new(CHROME_DRIVER, TestApp)
32
37
  end
@@ -106,4 +111,12 @@ RSpec.describe 'Capybara::Session with chrome' do
106
111
  expect(Time.parse(extract_results(session)['datetime'])).to eq datetime
107
112
  end
108
113
  end
114
+
115
+ describe 'using subclass of selenium driver' do
116
+ it 'works' do
117
+ session = Capybara::Session.new(:selenium_driver_subclass_with_chrome, TestApp)
118
+ session.visit('/form')
119
+ expect(session).to have_current_path('/form')
120
+ end
121
+ end
109
122
  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: 3.19.0
4
+ version: 3.19.1
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: 2019-05-09 00:00:00.000000000 Z
13
+ date: 2019-05-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: addressable