cornucopia 0.1.22 → 0.1.23
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/lib/cornucopia/cucumber_hooks.rb +24 -0
- data/lib/cornucopia/rspec_hooks.rb +23 -0
- data/lib/cornucopia/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 76788fa97e0d1e9c4de34e88eb5e3c3bd8e93293
|
|
4
|
+
data.tar.gz: 40d21fc62841e231cdd77ce5185ce23b57643965
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 13c81b9b97741f4a4e7df53fee7a5a6c1a284819e67538e57403acda76d9e4164b74e43f70622c220cfd67dfd16049b40934b80a3f561ca9dfc3f83d0e28aa52
|
|
7
|
+
data.tar.gz: 73344937b347e01c872f3dac6f91681082a3f0ae03b16c8b94e99379f9a6f4be05e7250edb772010102785d0bc21265ced89dc5a00e26b995cfd7d87e39075b0
|
|
@@ -3,6 +3,30 @@ load ::File.expand_path("capybara/install_finder_extensions.rb", File.dirname(__
|
|
|
3
3
|
load ::File.expand_path("site_prism/install_element_extensions.rb", File.dirname(__FILE__))
|
|
4
4
|
|
|
5
5
|
if Cucumber::VERSION.split[0].to_i >= 2
|
|
6
|
+
After do |scenario, block|
|
|
7
|
+
if scenario.failed?
|
|
8
|
+
report_name = "Page Dump for: Unknown"
|
|
9
|
+
if scenario.respond_to?(:feature)
|
|
10
|
+
report_name = "Page Dump for: #{scenario.feature.title}:#{scenario.title}"
|
|
11
|
+
else
|
|
12
|
+
report_name = "Page Dump for: Line - #{scenario.line}"
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
report = Cornucopia::Util::ReportBuilder.current_report
|
|
16
|
+
|
|
17
|
+
report.within_section(report_name) do |report|
|
|
18
|
+
report.within_hidden_table do |table|
|
|
19
|
+
Cornucopia::Util::ReportTable.new(
|
|
20
|
+
report_table: nil,
|
|
21
|
+
nested_table: table,
|
|
22
|
+
suppress_blank_table: true) do |sub_tables|
|
|
23
|
+
Cornucopia::Capybara::PageDiagnostics.dump_details_in_table(report, sub_tables)
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
6
30
|
Around do |scenario, block|
|
|
7
31
|
seed_value = Cornucopia::Util::Configuration.seed ||
|
|
8
32
|
100000000000000000000000000000000000000 + rand(899999999999999999999999999999999999999)
|
|
@@ -21,6 +21,29 @@ RSpec.configure do |config|
|
|
|
21
21
|
srand(@context_seed_value)
|
|
22
22
|
end
|
|
23
23
|
|
|
24
|
+
# Capybara resets the page in an after or around block before the around diagnostics can get around to dumping it
|
|
25
|
+
# so by adding an after block here, we can dump the Capybara results if there is a problem.
|
|
26
|
+
config.after(:each) do |example|
|
|
27
|
+
test_example = example
|
|
28
|
+
test_example ||= example.example if example.respond_to?(:example)
|
|
29
|
+
test_example ||= self.example if self.respond_to?(:example)
|
|
30
|
+
|
|
31
|
+
if (test_example.exception)
|
|
32
|
+
report = Cornucopia::Util::ReportBuilder.current_report
|
|
33
|
+
|
|
34
|
+
report.within_section("Page Dump for: #{test_example.full_description}") do |report|
|
|
35
|
+
report.within_hidden_table do |table|
|
|
36
|
+
Cornucopia::Util::ReportTable.new(
|
|
37
|
+
report_table: nil,
|
|
38
|
+
nested_table: table,
|
|
39
|
+
suppress_blank_table: true) do |sub_tables|
|
|
40
|
+
Cornucopia::Capybara::PageDiagnostics.dump_details_in_table(report, sub_tables)
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
24
47
|
config.around(:each) do |example|
|
|
25
48
|
@seed_value = Cornucopia::Util::Configuration.seed ||
|
|
26
49
|
100000000000000000000000000000000000000 + rand(899999999999999999999999999999999999999)
|
data/lib/cornucopia/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cornucopia
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.23
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- RealNobody
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-05-
|
|
11
|
+
date: 2015-05-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|