capybara-screenshot 1.0.18 → 1.0.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -3
- data/CHANGELOG.md +4 -0
- data/README.md +11 -0
- data/capybara-screenshot.gemspec +1 -1
- data/lib/capybara-screenshot/version.rb +1 -1
- data/spec/cucumber/cucumber_spec.rb +3 -3
- data/spec/feature/minitest_spec.rb +1 -1
- data/spec/feature/testunit_spec.rb +2 -2
- data/spec/rspec/rspec_spec.rb +2 -2
- data/spec/spinach/spinach_spec.rb +3 -3
- data/spec/support/common_setup.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 081d352f2f3df5f810978f0784f83ec953462160
|
4
|
+
data.tar.gz: eee03698c34b8a5dcf642fe19188196f9be0d34b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 421a51cbc4246f926e68fef664679a7127320fb365fd418259e073b39167e88dfee21455a331c6de84b66bca3a739281e1c6aa1153b09ff007e5edd00858279a
|
7
|
+
data.tar.gz: 2505c9923b0a39420886235828115a50bebdb86430d43d4bf2e22cce5d24bd0e3b5e8c7835ed799931458f7e213846173fe5cac586f181e47990bd03379e381a
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
10 April 2018 - 1.0.18 -> 1.0.19
|
2
|
+
|
3
|
+
* Big thanks for [Geremia Taglialatela](https://github.com/tagliala) for [padding Capybara 3 support and fixing the builds](https://github.com/mattheworiordan/capybara-screenshot/pull/230)
|
4
|
+
|
1
5
|
2 November 2017 - 1.0.17 -> 1.0.18
|
2
6
|
|
3
7
|
* [RSpec 3.3 support](https://github.com/mattheworiordan/capybara-screenshot/pull/213)
|
data/README.md
CHANGED
@@ -189,6 +189,17 @@ If you want to customize the location, override the file path as:
|
|
189
189
|
Capybara.save_path = "/file/path"
|
190
190
|
```
|
191
191
|
|
192
|
+
Usage with multiple Capybara sessions
|
193
|
+
-------------------------------------
|
194
|
+
|
195
|
+
To make screenshots work with multiple Capybara sessions, replace `Capybara.using_session` with `Capybara.using_session_with_screenshot`:
|
196
|
+
|
197
|
+
```ruby
|
198
|
+
Cabybara.using_session_with_screenshot('User 1') do
|
199
|
+
# screenshots will work and use the correct session
|
200
|
+
end
|
201
|
+
```
|
202
|
+
|
192
203
|
|
193
204
|
Uploading screenshots to S3
|
194
205
|
--------------------------
|
data/capybara-screenshot.gemspec
CHANGED
@@ -32,7 +32,7 @@ describe "Using Capybara::Screenshot with Cucumber" do
|
|
32
32
|
end
|
33
33
|
|
34
34
|
it 'saves a screenshot on failure' do
|
35
|
-
run_failing_case %q{Unable to find link or button "you'll never find me"}, <<-CUCUMBER
|
35
|
+
run_failing_case %q{Unable to find visible link or button "you'll never find me"}, <<-CUCUMBER
|
36
36
|
Feature: Failure
|
37
37
|
Scenario: Failure
|
38
38
|
Given I visit "/"
|
@@ -52,7 +52,7 @@ describe "Using Capybara::Screenshot with Cucumber" do
|
|
52
52
|
end
|
53
53
|
|
54
54
|
it 'saves a screenshot for the correct session for failures using_session' do
|
55
|
-
run_failing_case(%q{Unable to find link or button "you'll never find me"}, <<-CUCUMBER)
|
55
|
+
run_failing_case(%q{Unable to find visible link or button "you'll never find me"}, <<-CUCUMBER)
|
56
56
|
Feature: Failure
|
57
57
|
Scenario: Failure in different session
|
58
58
|
Given I visit "/"
|
@@ -68,7 +68,7 @@ describe "Using Capybara::Screenshot with Cucumber" do
|
|
68
68
|
end
|
69
69
|
|
70
70
|
it 'on failure it prunes previous screenshots when strategy is set' do
|
71
|
-
run_failing_case %q{Unable to find link or button "you'll never find me"}, <<-CUCUMBER
|
71
|
+
run_failing_case %q{Unable to find visible link or button "you'll never find me"}, <<-CUCUMBER
|
72
72
|
Feature: Prune
|
73
73
|
Scenario: Screenshots are pruned if strategy is set
|
74
74
|
Given I visit "/"
|
@@ -23,7 +23,7 @@ describe "Using Capybara::Screenshot with MiniTest" do
|
|
23
23
|
|
24
24
|
cmd = 'bundle exec ruby test_failure.rb'
|
25
25
|
run_simple_with_retry cmd, false
|
26
|
-
expect(last_command_started.output).to include %q{Unable to find link or button "you'll never find me"}
|
26
|
+
expect(last_command_started.output).to include %q{Unable to find visible link or button "you'll never find me"}
|
27
27
|
end
|
28
28
|
|
29
29
|
it 'saves a screenshot on failure' do
|
@@ -14,7 +14,7 @@ describe "Using Capybara::Screenshot with Test::Unit" do
|
|
14
14
|
|
15
15
|
#{setup_test_app}
|
16
16
|
Capybara::Screenshot.register_filename_prefix_formatter(:testunit) do | fault |
|
17
|
-
raise "expected fault" unless fault.exception.message.include? %q{Unable to find link or button "you'll never find me"}
|
17
|
+
raise "expected fault" unless fault.exception.message.include? %q{Unable to find visible link or button "you'll never find me"}
|
18
18
|
'my_screenshot'
|
19
19
|
end
|
20
20
|
|
@@ -29,7 +29,7 @@ describe "Using Capybara::Screenshot with Test::Unit" do
|
|
29
29
|
|
30
30
|
cmd = "bundle exec ruby #{integration_path}/test_failure.rb"
|
31
31
|
run_simple_with_retry cmd, false
|
32
|
-
expect(last_command_started.output).to include %q{Unable to find link or button "you'll never find me"}
|
32
|
+
expect(last_command_started.output).to include %q{Unable to find visible link or button "you'll never find me"}
|
33
33
|
end
|
34
34
|
|
35
35
|
it "saves a screenshot on failure for any test in path 'test/integration'" do
|
data/spec/rspec/rspec_spec.rb
CHANGED
@@ -41,7 +41,7 @@ describe Capybara::Screenshot::RSpec, :type => :aruba do
|
|
41
41
|
end
|
42
42
|
|
43
43
|
it 'saves a screenshot when browser action fails' do
|
44
|
-
run_failing_case <<-RUBY, %q{Unable to find link or button "you'll never find me"}
|
44
|
+
run_failing_case <<-RUBY, %q{Unable to find visible link or button "you'll never find me"}
|
45
45
|
feature 'screenshot with failure' do
|
46
46
|
scenario 'click on a missing link' do
|
47
47
|
visit '/'
|
@@ -103,7 +103,7 @@ describe Capybara::Screenshot::RSpec, :type => :aruba do
|
|
103
103
|
end
|
104
104
|
|
105
105
|
it 'saves a screenshot for the correct session for failures using_session' do
|
106
|
-
run_failing_case <<-RUBY, %q{Unable to find link or button "you'll never find me"}
|
106
|
+
run_failing_case <<-RUBY, %q{Unable to find visible link or button "you'll never find me"}
|
107
107
|
feature 'screenshot with failure' do
|
108
108
|
scenario 'click on a missing link' do
|
109
109
|
visit '/'
|
@@ -17,7 +17,7 @@ describe "Using Capybara::Screenshot with Spinach" do
|
|
17
17
|
end
|
18
18
|
|
19
19
|
it "saves a screenshot on failure" do
|
20
|
-
run_failing_case(%q{Unable to find link or button "you'll never find me"}, <<-GHERKIN)
|
20
|
+
run_failing_case(%q{Unable to find visible link or button "you'll never find me"}, <<-GHERKIN)
|
21
21
|
Feature: Failure
|
22
22
|
Scenario: Failure
|
23
23
|
Given I visit "/"
|
@@ -37,7 +37,7 @@ describe "Using Capybara::Screenshot with Spinach" do
|
|
37
37
|
end
|
38
38
|
|
39
39
|
it "saves a screenshot for the correct session for failures using_session" do
|
40
|
-
run_failing_case(%q{Unable to find link or button "you'll never find me"}, <<-GHERKIN)
|
40
|
+
run_failing_case(%q{Unable to find visible link or button "you'll never find me"}, <<-GHERKIN)
|
41
41
|
Feature: Failure
|
42
42
|
Scenario: Failure in different session
|
43
43
|
Given I visit "/"
|
@@ -49,7 +49,7 @@ describe "Using Capybara::Screenshot with Spinach" do
|
|
49
49
|
it 'on failure it prunes previous screenshots when strategy is set' do
|
50
50
|
create_screenshot_for_pruning
|
51
51
|
configure_prune_strategy :last_run
|
52
|
-
run_failing_case(%q{Unable to find link or button "you'll never find me"}, <<-GHERKIN)
|
52
|
+
run_failing_case(%q{Unable to find visible link or button "you'll never find me"}, <<-GHERKIN)
|
53
53
|
Feature: Failure
|
54
54
|
Scenario: Failure
|
55
55
|
Given I visit "/"
|
@@ -36,7 +36,7 @@ module CommonSetup
|
|
36
36
|
target.after(:each) do |example|
|
37
37
|
if example.exception
|
38
38
|
puts "Output from failed Aruba test:"
|
39
|
-
puts
|
39
|
+
puts all_commands.map { |c| c.output }.map { |line| " #{line}"}
|
40
40
|
puts ""
|
41
41
|
end
|
42
42
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara-screenshot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew O'Riordan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '1.0'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '4'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '1.0'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '4'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: launchy
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|