Class: SnapDiff::AttemptsReporter
- Inherits:
-
Object
- Object
- SnapDiff::AttemptsReporter
- Defined in:
- lib/snap_diff/attempts_reporter.rb
Instance Method Summary collapse
- #build_comparison_for(attempt_path, previous_attempt_path) ⇒ Object
- #generate ⇒ Object
-
#initialize(snapshot, comparison_options, stability_options = {}) ⇒ AttemptsReporter
constructor
A new instance of AttemptsReporter.
Constructor Details
#initialize(snapshot, comparison_options, stability_options = {}) ⇒ AttemptsReporter
Returns a new instance of AttemptsReporter.
9 10 11 12 13 |
# File 'lib/snap_diff/attempts_reporter.rb', line 9 def initialize(snapshot, , = {}) @snapshot = snapshot @comparison_options = @wait = [:wait] end |
Instance Method Details
#build_comparison_for(attempt_path, previous_attempt_path) ⇒ Object
23 24 25 |
# File 'lib/snap_diff/attempts_reporter.rb', line 23 def build_comparison_for(attempt_path, previous_attempt_path) Comparison.new(attempt_path, previous_attempt_path, @comparison_options) end |
#generate ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/snap_diff/attempts_reporter.rb', line 15 def generate attempts_screenshot_paths = @snapshot.find_attempts_paths annotate_attempts(attempts_screenshot_paths) "Could not get stable screenshot within #{@wait}s:\n#{attempts_screenshot_paths.join("\n")}" end |