cuprite 0.16 → 0.17
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/README.md +2 -12
- data/lib/capybara/cuprite/driver.rb +2 -30
- data/lib/capybara/cuprite/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96a5c4e78aa8ea75902caef045651f816880702db158b41d0b4ef3e916bf3611
|
4
|
+
data.tar.gz: 0f9f1ead810f03c6ee4fbe2053ad0e6476c26a4baeb53e2315b7110e47120243
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f2ec852f926cb0e013152c227f0b49973668eb800a7c9dd4192c25d08fb31a3e477218fa5593742229de236bb80f694245648b22ba430fbf6ffa7f54680e1e9
|
7
|
+
data.tar.gz: 2af0ca1ec6e7f83ef1c844fd49340f26716b96cea3cedfffbb1f4cf6744b3825905a44a8f0b33607ce3a588b52046a585a61c349188ec6d0c4c976b0ef76be49
|
data/README.md
CHANGED
@@ -67,18 +67,8 @@ end
|
|
67
67
|
|
68
68
|
## Debugging
|
69
69
|
|
70
|
-
|
71
|
-
|
72
|
-
`page.driver.debug(binding)` in your test to pause it. This will launch the
|
73
|
-
browser where you can inspect the content.
|
74
|
-
|
75
|
-
```ruby
|
76
|
-
Capybara.register_driver :cuprite do |app|
|
77
|
-
Capybara::Cuprite::Driver.new(app, inspector: ENV['INSPECTOR'])
|
78
|
-
end
|
79
|
-
```
|
80
|
-
|
81
|
-
then somewhere in the test:
|
70
|
+
You can put `page.driver.debug` or `page.driver.debug(binding)` in your test to pause it.
|
71
|
+
This will launch the browser where you can inspect the content.
|
82
72
|
|
83
73
|
```ruby
|
84
74
|
it "does something useful" do
|
@@ -274,32 +274,8 @@ module Capybara
|
|
274
274
|
end
|
275
275
|
alias authorize basic_authorize
|
276
276
|
|
277
|
-
def
|
278
|
-
|
279
|
-
|
280
|
-
devtools_frontend_path = response[0]&.[]("devtoolsFrontendUrl")
|
281
|
-
raise "Could not generate debug url for remote debugging session" unless devtools_frontend_path
|
282
|
-
|
283
|
-
build_remote_debug_url(path: devtools_frontend_path)
|
284
|
-
end
|
285
|
-
|
286
|
-
def debug(binding = nil)
|
287
|
-
if @options[:inspector]
|
288
|
-
Process.spawn(browser.process.path, debug_url)
|
289
|
-
|
290
|
-
if binding.respond_to?(:pry)
|
291
|
-
Pry.start(binding)
|
292
|
-
elsif binding.respond_to?(:irb)
|
293
|
-
binding.irb
|
294
|
-
else
|
295
|
-
pause
|
296
|
-
end
|
297
|
-
else
|
298
|
-
raise Error, "To use the remote debugging, you have to launch " \
|
299
|
-
"the driver with `inspector: ENV['INSPECTOR']` " \
|
300
|
-
"configuration option and run your test suite passing " \
|
301
|
-
"env variable"
|
302
|
-
end
|
277
|
+
def debug(...)
|
278
|
+
browser.debug(...)
|
303
279
|
end
|
304
280
|
|
305
281
|
def pause
|
@@ -378,10 +354,6 @@ module Capybara
|
|
378
354
|
|
379
355
|
private
|
380
356
|
|
381
|
-
def build_remote_debug_url(path:)
|
382
|
-
"http://#{browser.process.host}:#{browser.process.port}#{path}"
|
383
|
-
end
|
384
|
-
|
385
357
|
def default_domain
|
386
358
|
if @started
|
387
359
|
URI.parse(browser.current_url).host
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cuprite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.17'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Vorotilin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-05-
|
11
|
+
date: 2025-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.17.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.17.0
|
41
41
|
description: Cuprite is a driver for Capybara that allows you to run your tests on
|
42
42
|
a headless Chrome browser
|
43
43
|
email:
|