capybara-rack_test-screenshot 0.1.0 → 0.1.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/CHANGELOG.md +4 -0
- data/README.md +9 -8
- data/lib/capybara/rack_test/screenshot/version.rb +1 -1
- data/lib/capybara/rack_test/screenshot.rb +6 -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: 8165f761bf47281da1979d31ff8c358d54431bae76b7836076ba243fc3379ed5
|
4
|
+
data.tar.gz: 4e0527e42e2e8f73ca2f510d62eeb2e0550f79b81214b62e7e99e59c3e3aa87e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95fb74ed5744e8902cf216c1b26e004e18aca69efc5e9e6269b5830820e78ac29e14524904efcc045d31380f93d2bb793021b894aba0d3b7d7593113862db340
|
7
|
+
data.tar.gz: dd6bc0da76d16db6b244fff65b597661185647d13ceadc37bcf200705502052d06c66cc4bf3acf99147385097d5679c831aa818538d3496bd745653fa35e302c
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
[](https://rubygems.org/gems/capybara-rack_test-screenshot)
|
2
|
+
|
1
3
|
# Generate screenshots with RackTest
|
2
4
|
|
3
5
|
Makes `save_screenshot` behave as if you were using a regular browser when using `rack` as your Capybara driver.
|
@@ -16,16 +18,11 @@ RSpec.configure do |config|
|
|
16
18
|
puts "Screenshot at #{path}"
|
17
19
|
end
|
18
20
|
end
|
19
|
-
|
20
|
-
# Or for Rails projects
|
21
|
-
config.after(:each) do |example|
|
22
|
-
if example.exception
|
23
|
-
take_screenshot(screenshot: 'inline')
|
24
|
-
end
|
25
|
-
end
|
26
21
|
end
|
27
22
|
```
|
28
23
|
|
24
|
+
Also makes failing Rails System tests behave the same between `rack` and JS drivers.
|
25
|
+
|
29
26
|
## Installation
|
30
27
|
|
31
28
|
Install the gem and add to the application's Gemfile by executing:
|
@@ -41,7 +38,7 @@ If bundler is not being used to manage dependencies, install the gem by executin
|
|
41
38
|
You'll need to configure `Capybara.asset_host` in order for Playwright to render the page properly. This should point to a running development server of your application.
|
42
39
|
|
43
40
|
```rb
|
44
|
-
Capybara.asset_host = "http://localhost:3000
|
41
|
+
Capybara.asset_host = "http://localhost:3000"
|
45
42
|
```
|
46
43
|
|
47
44
|
Optional settings:
|
@@ -93,6 +90,10 @@ RSpec.configure do |config|
|
|
93
90
|
end
|
94
91
|
```
|
95
92
|
|
93
|
+
## capybara-screenshot
|
94
|
+
|
95
|
+
This gem is compatible with `capybara-screenshot`. You'll need to list `capybara-screenshot` before this gem in your Gemfile.
|
96
|
+
|
96
97
|
## Development
|
97
98
|
|
98
99
|
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara-rack_test-screenshot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Theodor Tonum
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|