eyes_selenium 2.18.0 → 2.19.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d85062339db4c3dece205b51ab090408f459ccfd
4
- data.tar.gz: 989b0d06b6137b1da6c71bb5ab3f91da302178b8
3
+ metadata.gz: e2e26548fc33b2ea447338b4d1143d74c192d8d4
4
+ data.tar.gz: a9890f6b2c2571b83e31c71977ad15a07b451726
5
5
  SHA512:
6
- metadata.gz: c610895a090f73bb64ceb15ffb2b1cb8b197d78ca2fd0c49fbb295767ac1d87809ef97b54c9530d3a1b9c2f8b6d18bc86cf4cb9ae8f7b178c4c8be89b180b9e2
7
- data.tar.gz: f9648a60924612dddb2c370fb28e86d8e5eb512f3eeea97853eeed3753e6d573ea189df6f9f7b35a3bb333c469355e5e952251f33c7dcc4c06259094a62f1848
6
+ metadata.gz: 1b52dab2d476f1abd32fb5482945a676be560b94c64b795de45d600c75b5a46b8961f8d071826d9d048f0fdfa3613c079540a49b2518e6c3e3f9fec15f4d1eb4
7
+ data.tar.gz: 3dacfafa1340774a5377d74641263ca1b28abc6f249aed902ce066d3cd9f29b9303b1f9d6947192b2f54514dc58648c40a176f7a2bd1e02aff10a32131a5a9c6
@@ -61,6 +61,9 @@ class Applitools::Eyes
61
61
  # +rotation+:: +Integer+|+nil+ The degrees by which to rotate the screenshots received from the driver. Set this to
62
62
  # override Eyes' automatic rotation inference. Positive values = clockwise rotation, negative
63
63
  # values = counter-clockwise, 0 = force no rotation, +nil+ = use Eyes' automatic rotation inference.
64
+ # +scale_ratio+:: +Float+|+nil+ The ratio by which to scale the screenshots received from the driver. Set this to
65
+ # override Eyes' automatic scaling inference. Values must be >=0 or +nil+. 1 = Don't scale, +nil+ = use Eyes'
66
+ # automatic scaling inference.
64
67
  # +force_fullpage_screenshot+:: +boolean+ Whether or not to force fullpage screenshot taking, if the browser doesn't
65
68
  # support it explicitly.
66
69
  # +hide_scrollbars+:: +boolean+ Whether or not hide scrollbars.
@@ -68,7 +71,7 @@ class Applitools::Eyes
68
71
  attr_reader :app_name, :test_name, :is_open, :viewport_size, :driver
69
72
  attr_accessor :match_timeout, :batch, :host_os, :host_app, :branch_name, :parent_branch_name, :user_inputs,
70
73
  :save_new_tests, :save_failed_tests, :is_disabled, :server_url, :agent_id, :failure_reports, :match_level,
71
- :baseline_name, :rotation, :force_fullpage_screenshot, :hide_scrollbars, :use_css_transition
74
+ :baseline_name, :rotation, :force_fullpage_screenshot, :hide_scrollbars, :use_css_transition, :scale_ratio
72
75
 
73
76
  def_delegators 'Applitools::EyesLogger', :log_handler, :log_handler=
74
77
  def_delegators 'Applitools::Base::ServerConnector', :api_key, :api_key=, :server_url, :server_url=
@@ -80,6 +80,9 @@ module Applitools::Selenium
80
80
  end
81
81
 
82
82
  def image_normalization_factor(image)
83
+ # If the user manually set the scale ratio, we use that.
84
+ return @eyes.scale_ratio unless @eyes.scale_ratio.nil?
85
+
83
86
  if image.width == @eyes.viewport_size.extract_viewport_from_browser.width ||
84
87
  (image.width - entire_page_size.width).abs <= EPSILON_WIDTH
85
88
  return 1
@@ -1,3 +1,3 @@
1
1
  module Applitools
2
- VERSION = '2.18.0'.freeze
2
+ VERSION = '2.19.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eyes_selenium
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.18.0
4
+ version: 2.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Applitools Team