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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 75b88eb52e8a954c774264cd033b8a9c65b62de0
4
- data.tar.gz: 960e215f8c4cdba3a3f83a4e6b5cba92aab7b609
3
+ metadata.gz: ec522378c86bc442a0894f7f9e34c7cad077dc83
4
+ data.tar.gz: 33d7e9d5640cb3090d66e57a0268815a59a1709d
5
5
  SHA512:
6
- metadata.gz: 8a0fd9c05af9f7501304a813c47bd5e11ec4fcad796e83ee2ccd561bd4cf51ea17e13604baea659f2cf4367d00373dce599b75ee2dae4d53d83f5f3acd385ded
7
- data.tar.gz: a33bd9cac462ebbea97adf7a09b8d4eecd6d0d642ea9ba5d73244755916f15d2990ff3b98d41de0bbcc335527a32c9db4e699d6f54c43ee4dfadecb2ff78d2c2
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 "Diff > ThresholdFailed: see #{diff_file}"
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
@@ -1,3 +1,3 @@
1
1
  module Compatriot
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
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.6
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-09 00:00:00.000000000 Z
12
+ date: 2016-05-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest