eyes_selenium 2.19.0 → 2.20.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e2e26548fc33b2ea447338b4d1143d74c192d8d4
4
- data.tar.gz: a9890f6b2c2571b83e31c71977ad15a07b451726
3
+ metadata.gz: f2a03af87e605624000861188061a24e4a5a0c17
4
+ data.tar.gz: cc98a04b4d9d8e3f3b4a1a01b844f8cd5d2a6e50
5
5
  SHA512:
6
- metadata.gz: 1b52dab2d476f1abd32fb5482945a676be560b94c64b795de45d600c75b5a46b8961f8d071826d9d048f0fdfa3613c079540a49b2518e6c3e3f9fec15f4d1eb4
7
- data.tar.gz: 3dacfafa1340774a5377d74641263ca1b28abc6f249aed902ce066d3cd9f29b9303b1f9d6947192b2f54514dc58648c40a176f7a2bd1e02aff10a32131a5a9c6
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 @eyes.force_fullpage_screenshot && (screenshot.width < page_size.width || screenshot.height < page_size.height)
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
- subregios = Applitools::Base::Region.new(0, 0, page_size.width,
171
+ sub_regions = Applitools::Base::Region.new(0, 0, page_size.width,
172
172
  page_size.height).subregions(screenshot_part_size)
173
- parts = subregios.map do |screenshot_part|
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 Argu mentError, "expected #{arg.inspect}:#{arg.class} to respond to #shift" unless arg.respond_to?(:shift)
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|
@@ -1,3 +1,3 @@
1
1
  module Applitools
2
- VERSION = '2.19.0'.freeze
2
+ VERSION = '2.20.0'.freeze
3
3
  end
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.19.0
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-02 00:00:00.000000000 Z
11
+ date: 2015-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: selenium-webdriver