module Capybara module Screenshot module Diff class ScreenshotMatcher type job_entity = Array[top] attr_reader base_screenshot_path: TestMethods::path_entity attr_reader driver_options: Drivers::BaseDriver::options_entity attr_reader screenshot_full_name: TestMethods::path_entity attr_reader screenshot_path: Pathname def build_screenshot_matches_job: -> job_entity? def cleanup: -> void def self.base_image_path_from: (TestMethods::path_entity) -> Pathname private def build_screenshoter_for: (capture_options_entity capture_options, Drivers::BaseDriver::options_entity driver_options) -> (Screenshoter | StableScreenshoter) def checkout_base_screenshot: -> void def take_comparison_screenshot: (capture_options_entity capture_options, Drivers::BaseDriver::options_entity driver_options, TestMethods::path_entity screenshot_path) -> void def create_output_directory_for: (Pathname file_name) -> void type skip_area_entity = String | Region::raw_region_entity type flex_skip_area_entity = (skip_area_entity | Array[skip_area_entity]) type flex_crop_entity = (nil | String | Region | Region::raw_region_entity) def calculate_skip_area: (flex_skip_area_entity skip_area, flex_crop_entity crop) -> Array[Region] type input_region = (Region::raw_region_entity | String | Region) type input_options = { area_size_limit: Numeric?, color_distance_limit: Numeric?, driver: (:auto | :vips | :chunky_png | ImageCompare::driver_entity)?, median_filter_window_size: Numeric?, shift_distance_limit: Numeric?, skip_area: nil | Array[input_region] | input_region, stability_time_limit: Numeric?, tolerance: Numeric?, wait: Numeric? } def calculate_crop_region: (input_options driver_options) -> Region? type capture_options_entity = { stability_time_limit: Numeric?, wait: Numeric?, crop: Region? } def build_regions_for: ((Enumerable[Region::raw_region_entity]) coordinates) -> Array[Region?] end end end end