lib/capybara/screenshot/diff/stabilization.rb in capybara-screenshot-diff-0.10.0 vs lib/capybara/screenshot/diff/stabilization.rb in capybara-screenshot-diff-0.10.1
- old
+ new
@@ -4,20 +4,20 @@
module Screenshot
module Diff
module Stabilization
include Os
- IMAGE_WAIT_SCRIPT = <<-EOF.strip_heredoc.freeze
+ IMAGE_WAIT_SCRIPT = <<-JS.strip_heredoc.freeze
function pending_image() {
var images = document.images;
for (var i = 0; i < images.length; i++) {
if (!images[i].complete) {
return images[i].src;
}
}
return false;
}()
- EOF
+ JS
def take_stable_screenshot(comparison, color_distance_limit:, area_size_limit:)
input = prepare_page_for_screenshot
previous_file_name = comparison.old_file_name
screenshot_started_at = last_image_change_at = Time.now