compatriot 0.1.6 → 0.1.7
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/compatriot/assertions.rb +13 -3
- data/lib/compatriot/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: ec522378c86bc442a0894f7f9e34c7cad077dc83
|
|
4
|
+
data.tar.gz: 33d7e9d5640cb3090d66e57a0268815a59a1709d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4ac2c45a29c6cf68779f6f49aafef0e699e17d7aba7b533b4c656a0fba994307ee7a7db6312bc391de8a53efce9076fdb2b368251c40297d4dacff49bb6f2605
|
|
7
|
+
data.tar.gz: 45ce24bb91b260212ef70b95c89297f708f7b393ece7b2ec42f9f9bc67a961e0c9d95de556d8b6c29c0bc34be71c931fe0ba07e48feac7d204af2e0a4944f46d
|
|
@@ -10,16 +10,26 @@ module Compatriot
|
|
|
10
10
|
self.compatriot_assertion_titles ||= []
|
|
11
11
|
self.compatriot_assertion_titles << title
|
|
12
12
|
self.compatriot_percentages_changed ||= []
|
|
13
|
-
diff = Compatriot.percentage_changed(self, title)
|
|
14
|
-
self.compatriot_percentages_changed << diff
|
|
15
13
|
diff_file = Compatriot.filepath_for_screenshot('diffs', Compatriot.filename_for_test(self, title))
|
|
14
|
+
|
|
15
|
+
diff = Compatriot.percentage_changed(self, title)
|
|
16
16
|
puts "% diff is #{diff}. #{diff_file}" if Compatriot.show_diffs
|
|
17
17
|
pass = diff <= Compatriot.ui_difference_threshold
|
|
18
18
|
|
|
19
|
+
# We are going to allow 1 retry after failure
|
|
20
|
+
# because there is a weird case that keeps
|
|
21
|
+
# reoccurring that seems like the page
|
|
22
|
+
# might still be rendering. It looks like
|
|
23
|
+
# the font spacing is still adjusting slightly
|
|
19
24
|
unless pass
|
|
20
|
-
puts "
|
|
25
|
+
puts "Found a difference, retrying once"
|
|
26
|
+
sleep 1
|
|
27
|
+
diff = Compatriot.percentage_changed(self, title)
|
|
28
|
+
puts "% diff is #{diff}. #{diff_file}" if Compatriot.show_diffs
|
|
29
|
+
pass = diff <= Compatriot.ui_difference_threshold
|
|
21
30
|
end
|
|
22
31
|
|
|
32
|
+
self.compatriot_percentages_changed << diff
|
|
23
33
|
assert pass, "The difference in the page (#{diff}%) is greater then the threshold #{Compatriot.ui_difference_threshold}"
|
|
24
34
|
end
|
|
25
35
|
end
|
data/lib/compatriot/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: compatriot
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Carol (Nichols || Goulding)
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2016-05-
|
|
12
|
+
date: 2016-05-19 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: minitest
|