eyes_selenium 2.18.0 → 2.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/applitools/eyes.rb +4 -1
- data/lib/applitools/selenium/browser.rb +3 -0
- data/lib/applitools/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2e26548fc33b2ea447338b4d1143d74c192d8d4
|
4
|
+
data.tar.gz: a9890f6b2c2571b83e31c71977ad15a07b451726
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b52dab2d476f1abd32fb5482945a676be560b94c64b795de45d600c75b5a46b8961f8d071826d9d048f0fdfa3613c079540a49b2518e6c3e3f9fec15f4d1eb4
|
7
|
+
data.tar.gz: 3dacfafa1340774a5377d74641263ca1b28abc6f249aed902ce066d3cd9f29b9303b1f9d6947192b2f54514dc58648c40a176f7a2bd1e02aff10a32131a5a9c6
|
data/lib/applitools/eyes.rb
CHANGED
@@ -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
|
data/lib/applitools/version.rb
CHANGED