capybara 3.19.0 → 3.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/History.md +9 -2
- data/lib/capybara/selenium/driver.rb +1 -1
- data/lib/capybara/version.rb +1 -1
- data/spec/selenium_spec_chrome.rb +13 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 729c366399588a2a21c59d6b50a20a8a175130ad9c0d08dcea1b09c12cda560a
|
4
|
+
data.tar.gz: 5754b7164ea9b3633294653efe0a26ef8afda9bfd290d6b582e056dcdb3f0647
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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`, `#
|
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
|
-
|
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
|
data/lib/capybara/version.rb
CHANGED
@@ -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.
|
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-
|
13
|
+
date: 2019-05-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: addressable
|