eyes_core 3.16.0 → 3.16.1
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0613722ca2baf28172990b0e9dad28e60506110fc8d0c3447be31a07df1a95b8
|
4
|
+
data.tar.gz: 4b584d7e1fffdde21233ec56a7e6cb690c59debcf0ee07a85b377fa5887b50df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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::
|
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 =
|
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 =
|
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
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
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
|
data/lib/applitools/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2020-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oily_png
|