lib/capybara/screenshot/diff/test_methods.rb in capybara-screenshot-diff-1.2.1 vs lib/capybara/screenshot/diff/test_methods.rb in capybara-screenshot-diff-1.3.0
- old
+ new
@@ -69,11 +69,12 @@
# @return [Boolean] wether a screenshot was taken
def screenshot(name, area_size_limit: Diff.area_size_limit,
color_distance_limit: Diff.color_distance_limit,
shift_distance_limit: Diff.shift_distance_limit, skip_area: Diff.skip_area,
- stability_time_limit: Screenshot.stability_time_limit)
+ stability_time_limit: Screenshot.stability_time_limit,
+ wait: Capybara.default_max_wait_time)
return unless Screenshot.active?
return if window_size_is_wrong?
skip_area = skip_area&.flatten&.each_cons(4)&.to_a # Allow nil or single or multiple areas
@@ -92,10 +93,11 @@
checkout_vcs(name, comparison)
take_stable_screenshot(comparison, color_distance_limit: color_distance_limit,
shift_distance_limit: shift_distance_limit,
area_size_limit: area_size_limit,
skip_area: skip_area,
- stability_time_limit: stability_time_limit)
+ stability_time_limit: stability_time_limit,
+ wait: wait)
return unless comparison.old_file_exists?
(@test_screenshots ||= []) << [caller(1..1).first, name, comparison]
true
end