eyes_selenium 2.19.0 → 2.20.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/applitools/selenium/browser.rb +3 -3
- data/lib/applitools/selenium/driver.rb +2 -2
- data/lib/applitools/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f2a03af87e605624000861188061a24e4a5a0c17
|
4
|
+
data.tar.gz: cc98a04b4d9d8e3f3b4a1a01b844f8cd5d2a6e50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa6cec3f2ff9eac384a78900262852c6801b22bddec37839594e2669aba0a5aa4d2c5331e43e172b34e32ecbd903fb61341e5841e923f31df553015607d7e380
|
7
|
+
data.tar.gz: 86df288b0117f79ab91dedf90b051190e94048e679b1486ba4ea5b7b347c06c39d0d9976d3765c8bdbb3b742700c7c9d8a0b39af875e28947ba503ecfa132f47
|
@@ -161,16 +161,16 @@ module Applitools::Selenium
|
|
161
161
|
|
162
162
|
# NOTE: this is required! Since when calculating the screenshot parts for full size, we use a screenshot size
|
163
163
|
# which is a bit smaller (see comment below).
|
164
|
-
if
|
164
|
+
if screenshot.width < page_size.width || screenshot.height < page_size.height
|
165
165
|
# We use a smaller size than the actual screenshot size in order to eliminate duplication of bottom scroll bars,
|
166
166
|
# as well as footer-like elements with fixed position.
|
167
167
|
max_scrollbar_size = @eyes.use_css_transition ? 0 : MAX_SCROLLBAR_SIZE
|
168
168
|
height = [screenshot.height - (max_scrollbar_size * size_factor), MIN_SCREENSHOT_PART_HEIGHT * size_factor].max
|
169
169
|
screenshot_part_size = Applitools::Base::Dimension.new(screenshot.width, height)
|
170
170
|
|
171
|
-
|
171
|
+
sub_regions = Applitools::Base::Region.new(0, 0, page_size.width,
|
172
172
|
page_size.height).subregions(screenshot_part_size)
|
173
|
-
parts =
|
173
|
+
parts = sub_regions.map do |screenshot_part|
|
174
174
|
# Skip (0,0), as we already got the screenshot.
|
175
175
|
if screenshot_part.left == 0 && screenshot_part.top == 0
|
176
176
|
next Applitools::Base::ImagePosition.new(screenshot, Applitools::Base::Point::TOP_LEFT)
|
@@ -79,7 +79,7 @@ module Applitools::Selenium
|
|
79
79
|
#
|
80
80
|
# Returns: +String+ A screenshot in the requested format.
|
81
81
|
def screenshot_as(output_type, rotation = nil)
|
82
|
-
image = mobile_device? ? visible_screenshot : @browser.fullpage_screenshot
|
82
|
+
image = mobile_device? || !@eyes.force_fullpage_screenshot ? visible_screenshot : @browser.fullpage_screenshot
|
83
83
|
|
84
84
|
Applitools::Selenium::Driver.normalize_image(self, image, rotation)
|
85
85
|
|
@@ -145,7 +145,7 @@ module Applitools::Selenium
|
|
145
145
|
when 1
|
146
146
|
arg = args.first
|
147
147
|
|
148
|
-
raise
|
148
|
+
raise ArgumentError, "expected #{arg.inspect}:#{arg.class} to respond to #shift" unless arg.respond_to?(:shift)
|
149
149
|
|
150
150
|
# This will be a single-entry hash, so use #shift over #first or #[].
|
151
151
|
arg.dup.shift.tap do |arr|
|
data/lib/applitools/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eyes_selenium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.20.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Applitools Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: selenium-webdriver
|