testcentricity_web 0.4.9 → 0.5.0
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/testcentricity_web/exception_queue_helper.rb +12 -13
- data/lib/testcentricity_web/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9226c20698c532474d21fef466125ebef6ecc5bb
|
4
|
+
data.tar.gz: 679bf6084b8a6c4841adeef2b2d09ddeb3758594
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 687e65a2ab860a763a86df2918723d8bd6e788f34d719a11c6ce1c0a3847e8f58a3602ad0c1edb2dc4a85e5423b3926d71ef9e347a3edca90a9005f89e367691
|
7
|
+
data.tar.gz: 657868e8f4db8d1dc2e34c7d12896f26e612cea9d640809b82d8cb59923bc817e9dd510176cce90ead958d8b24f68a83ca431a7037987fd8c3ecb59e6e1e2730
|
@@ -7,14 +7,14 @@ module TestCentricity
|
|
7
7
|
def self.enqueue_assert_equal(expected, actual, error_message)
|
8
8
|
unless expected == actual
|
9
9
|
@error_queue = "#{@error_queue}#{error_message} to be\n #{expected}\nbut found\n #{actual}\n\n"
|
10
|
-
|
10
|
+
enqueue_screenshot
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
14
14
|
def self.enqueue_assert_not_equal(expected, actual, error_message)
|
15
15
|
unless expected != actual
|
16
16
|
@error_queue = "#{@error_queue}#{error_message} to not be equal to #{expected}\n\n"
|
17
|
-
|
17
|
+
enqueue_screenshot
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
@@ -27,18 +27,17 @@ module TestCentricity
|
|
27
27
|
ensure
|
28
28
|
@error_queue = nil
|
29
29
|
end
|
30
|
-
end
|
31
|
-
|
32
|
-
private
|
33
30
|
|
31
|
+
private
|
34
32
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
33
|
+
def self.enqueue_screenshot
|
34
|
+
timestamp = Time.now.strftime('%Y%m%d%H%M%S')
|
35
|
+
filename = "Screenshot-#{timestamp}"
|
36
|
+
path = File.join Dir.pwd, "reports/screenshots/", filename
|
37
|
+
Capybara.save_screenshot "#{path}.png"
|
38
|
+
puts "Screenshot saved at #{path}.png"
|
39
|
+
screen_shot = { :path => path, :filename => filename }
|
40
|
+
Environ.save_screen_shot(screen_shot)
|
41
|
+
end
|
43
42
|
end
|
44
43
|
end
|