capybara-typhoeus 0.6.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/lib/capybara/typhoeus/browser.rb +6 -2
- data/lib/capybara/typhoeus/driver.rb +3 -2
- data/spec/session/typhoeus_spec.rb +5 -0
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79c686b80b10b16efe7c9cd2a2939ac2ba3b484e0b89d14047e66d54bd287647
|
4
|
+
data.tar.gz: 9627436bb7a9d8547560b53088d913e1faaf8d4a7328388502b970bf49e4bdc4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae39c3d9f79bf1900e6d971168efbb1c62df6e9770eeec7f1450355c98606a3c99b172c9249dbbcaf29e3b931d8319e29bd124ef31bb5b9152e8b8c2d499f327
|
7
|
+
data.tar.gz: 4c4dfee02e0481d08886ad98c7bce772d1c4f1030304e0f451043d79493b60772f282618e7e3b031c18dde86bf6254cd298688cf4f1de5ae1d9ad960b260741b
|
data/README.md
CHANGED
@@ -31,7 +31,7 @@ The following scenario will then be using the Typhoeus driver
|
|
31
31
|
When you want to use this driver to test a remote application. You have to set the app_host:
|
32
32
|
|
33
33
|
Capybara.app_host = "http://www.yourapp.com"
|
34
|
-
|
34
|
+
|
35
35
|
Note that I haven't tested this case for my self yet. The Capybara tests pass for this situation though so it should work! Please provide me with feedback if it doesn't.
|
36
36
|
|
37
37
|
## Running tests
|
@@ -58,11 +58,11 @@ Everything related to submitting forms, clicking buttons, clicking checkboxes or
|
|
58
58
|
Build Status
|
59
59
|
---------
|
60
60
|
|
61
|
-
|
61
|
+
![Build Status](https://github.com/TalentBox/capybara-typhoeus/actions/workflows/ci.yml/badge.svg)
|
62
62
|
|
63
63
|
Note on Patches/Pull Requests
|
64
64
|
-----------------------------
|
65
|
-
|
65
|
+
|
66
66
|
* Fork the project.
|
67
67
|
* Make your feature addition or bug fix.
|
68
68
|
* Add tests for it. This is important so I don't break it in a
|
@@ -73,4 +73,4 @@ Note on Patches/Pull Requests
|
|
73
73
|
|
74
74
|
Copyright
|
75
75
|
---------
|
76
|
-
Copyright (c) 2010 Tron Jonathan and HALTER Joseph. See LICENSE for details.
|
76
|
+
Copyright (c) 2010 Tron Jonathan and HALTER Joseph. See LICENSE for details.
|
@@ -36,13 +36,17 @@ class Capybara::Typhoeus::Browser < Capybara::RackTest::Browser
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def current_url
|
39
|
-
|
39
|
+
return "" unless last_response
|
40
|
+
|
41
|
+
uri = build_uri(last_response.effective_url)
|
42
|
+
uri.fragment = @current_fragment if @current_fragment
|
43
|
+
uri.to_s
|
40
44
|
end
|
41
45
|
|
42
46
|
def dom
|
43
47
|
@dom ||= begin
|
44
48
|
content_type = if last_response
|
45
|
-
last_response.headers["Content-Type"].to_s[/\A[^;]+/]
|
49
|
+
last_response.headers["Content-Type"].to_s[/\A[^;]+/] || ""
|
46
50
|
else
|
47
51
|
""
|
48
52
|
end
|
@@ -3,9 +3,10 @@ class Capybara::Typhoeus::Driver < Capybara::RackTest::Driver
|
|
3
3
|
attr_writer :as, :with_headers, :with_params, :with_options
|
4
4
|
attr_reader :login, :password, :params_encoding
|
5
5
|
|
6
|
-
def initialize(app, options
|
6
|
+
def initialize(app, **options)
|
7
7
|
raise ArgumentError, "typhoeus requires a rack application, but none was given" unless app
|
8
|
-
|
8
|
+
option_with_default = {timeout: 3, forbid_reuse: true}.merge(options)
|
9
|
+
super app, **option_with_default
|
9
10
|
@params_encoding = :typhoeus
|
10
11
|
end
|
11
12
|
|
@@ -22,6 +22,9 @@ skipped_tests = %i[
|
|
22
22
|
download
|
23
23
|
css
|
24
24
|
scroll
|
25
|
+
active_element
|
26
|
+
html_validation
|
27
|
+
shadow_dom
|
25
28
|
]
|
26
29
|
Capybara::SpecHelper.run_specs TestSessions::TyphoeusTest, 'Typhoeus', capybara_skip: skipped_tests do |example|
|
27
30
|
case example.metadata[:full_description]
|
@@ -41,6 +44,8 @@ Capybara::SpecHelper.run_specs TestSessions::TyphoeusTest, 'Typhoeus', capybara_
|
|
41
44
|
skip "Typhoeus driver doesn't support #has_css? with spatial requirements"
|
42
45
|
when /#find with spatial filters/
|
43
46
|
skip "Typhoeus driver doesn't support #find with spatial filters"
|
47
|
+
when /can set cookie if a blank path is specified/
|
48
|
+
skip "Typhoeus driver doesn't support cookie"
|
44
49
|
when /has_css\? should support case insensitive :class and :id options/
|
45
50
|
skip "Nokogiri doesn't support case insensitive CSS attribute matchers"
|
46
51
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara-typhoeus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joseph HALTER
|
8
8
|
- Jonathan TRON
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-12-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capybara
|
@@ -130,7 +130,7 @@ files:
|
|
130
130
|
homepage: https://github.com/TalentBox/capybara-typhoeus
|
131
131
|
licenses: []
|
132
132
|
metadata: {}
|
133
|
-
post_install_message:
|
133
|
+
post_install_message:
|
134
134
|
rdoc_options:
|
135
135
|
- "--main"
|
136
136
|
- README.md
|
@@ -149,10 +149,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
149
|
- !ruby/object:Gem::Version
|
150
150
|
version: '0'
|
151
151
|
requirements: []
|
152
|
-
rubygems_version: 3.
|
153
|
-
signing_key:
|
152
|
+
rubygems_version: 3.3.7
|
153
|
+
signing_key:
|
154
154
|
specification_version: 4
|
155
155
|
summary: Typhoeus driver for Capybara
|
156
156
|
test_files:
|
157
|
-
- spec/spec_helper.rb
|
158
157
|
- spec/session/typhoeus_spec.rb
|
158
|
+
- spec/spec_helper.rb
|