eyes_core 3.16.0 → 3.16.1

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
  SHA256:
3
- metadata.gz: 7c8b1c4252bdea87951ac2bf9139c9271d2e673974f13edce49faa0d942e5101
4
- data.tar.gz: 7b2c2ebe51fad932e0b391c6b892bbd378cc6c9795d3271eb6a1d68d7c63132c
3
+ metadata.gz: 0613722ca2baf28172990b0e9dad28e60506110fc8d0c3447be31a07df1a95b8
4
+ data.tar.gz: 4b584d7e1fffdde21233ec56a7e6cb690c59debcf0ee07a85b377fa5887b50df
5
5
  SHA512:
6
- metadata.gz: 255a174ae78081297d821772d7601016e0b66b2b1f6de1f6ae162e269cf6001dd22d5497d16b0ae98f71788693e69bb73bdc0502d067ad8aa2823196336259ca
7
- data.tar.gz: 1b1c4126c15b94f498c4807c3b0f96a56a258311da4f898b014dc119b59d2c39f20df5b4974be512f194951615a9d03a483f88ccb08d8d273fb2e90cb54db657
6
+ metadata.gz: 80ebd10fb88cc9fe08d6c222124df8e300b9dbf2ab718ce88bc009df49a8a9215357adb93dba801c1adf84974c934f29549f238fb1d8b2febad9f7b8c4c09c5c
7
+ data.tar.gz: 2f1e3d1fcd9b14d47bbf8f21578389227e6ae6ca2b29dfb458fd561301d93b1e5053a56cceaa46d812da945c615c7aaa79253e7dc623932158ce65cd396a71cc
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: false
2
2
 
3
- class Applitools::Appium::Eyes < Applitools::Selenium::Eyes
3
+ class Applitools::Appium::Eyes < Applitools::Selenium::SeleniumEyes
4
4
  def perform_driver_settings_for_appium_driver
5
5
  self.region_visibility_strategy = Applitools::Selenium::NopRegionVisibilityStrategy.new
6
6
  self.force_driver_resolution_as_viewport_size = true
@@ -44,7 +44,7 @@ module Applitools::Connectivity
44
44
  end
45
45
 
46
46
  def rendering_info
47
- response = get(server_url + RENDER_INFO_PATH, content_type: 'application/json')
47
+ response = long_get(server_url + RENDER_INFO_PATH, content_type: 'application/json')
48
48
  unless response.status == HTTP_STATUS_CODES[:ok]
49
49
  raise Applitools::EyesError, "Error getting render info (#{response.status}})"
50
50
  end
@@ -261,7 +261,7 @@ module Applitools::Connectivity
261
261
  request_body = Oj.dump(
262
262
  startInfo: Applitools::Utils.camelcase_hash_keys(session_start_info.to_hash)
263
263
  )
264
- res = post(
264
+ res = long_post(
265
265
  endpoint_url, body: request_body
266
266
  )
267
267
  raise Applitools::EyesError.new("Request failed: #{res.status} #{res.body} #{request_body}") unless res.success?
@@ -395,7 +395,7 @@ module Applitools::Connectivity
395
395
  check_status(res, delay)
396
396
  when HTTP_STATUS_CODES[:created]
397
397
  last_step_url = res.headers[:location]
398
- request(last_step_url, :delete, headers: eyes_date_header)
398
+ last_step_url.nil? ? res : request(last_step_url, :delete, headers: eyes_date_header)
399
399
  when HTTP_STATUS_CODES[:gone]
400
400
  raise Applitools::EyesError.new('The server task has gone.')
401
401
  else
@@ -211,21 +211,22 @@ module Applitools::Utils
211
211
  def extract_viewport_size(executor)
212
212
  Applitools::EyesLogger.debug 'extract_viewport_size()'
213
213
 
214
- begin
215
- width, height = executor.execute_script(JS_GET_VIEWPORT_SIZE)
216
- result = Applitools::RectangleSize.from_any_argument width: width, height: height
217
- Applitools::EyesLogger.debug "Viewport size is #{result}."
218
- return result
219
- rescue => e
220
- Applitools::EyesLogger.error "Failed extracting viewport size using JavaScript: (#{e.message})"
221
- end
222
-
223
- Applitools::EyesLogger.info 'Using window size as viewport size.'
224
-
225
- width, height = executor.manage.window.size.to_a
226
- width, height = height, width if executor.landscape_orientation? && height > width
227
-
228
- result = Applitools::RectangleSize.new width, height
214
+ result = if defined?(Applitools::Appium::Driver) && executor.is_a?(Applitools::Appium::Driver)
215
+ Applitools::RectangleSize.from_any_argument(executor.window_size)
216
+ else
217
+ begin
218
+ width, height = executor.execute_script(JS_GET_VIEWPORT_SIZE)
219
+ Applitools::RectangleSize.from_any_argument width: width, height: height
220
+ rescue => e
221
+ Applitools::EyesLogger.error "Failed extracting viewport size using JavaScript: (#{e.message})"
222
+ Applitools::EyesLogger.info 'Using window size as viewport size.'
223
+
224
+ width, height = executor.manage.window.size.to_a
225
+ width, height = height, width if executor.landscape_orientation? && height > width
226
+
227
+ Applitools::RectangleSize.new width, height
228
+ end
229
+ end
229
230
  Applitools::EyesLogger.debug "Viewport size is #{result}."
230
231
  result
231
232
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Applitools
4
- VERSION = '3.16.0'.freeze
4
+ VERSION = '3.16.1'.freeze
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eyes_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.16.0
4
+ version: 3.16.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Applitools Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-24 00:00:00.000000000 Z
11
+ date: 2020-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oily_png