eyes_core 3.16.5 → 3.16.6

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: 39e8a6b4d23f5c9e058ad38d4b7a0ddb45eca4a6621e4ad9ce46614f4d5d0abd
4
- data.tar.gz: d190e9dc7fae77cf84bff7dbdd36e644e77434fb94927968f13452ff25b74bef
3
+ metadata.gz: 24805d46d94b91197c0673638ca055d92474533cf314d307bd14eabee94a00ed
4
+ data.tar.gz: '038378742f8fe1d8936f4791d36df3ff91de1fb8e549402e4cb212ce0e629914'
5
5
  SHA512:
6
- metadata.gz: 9ee00b1c65a417e51ed7d6a201a350967e98b37e28ede1e7bce8c880cf4880bcefdc96d8e070efe6700484e471d55cf7faa1b6b5cd5bb5352a51b478bb4661b9
7
- data.tar.gz: bfb4061d30189e445e6bca23dc52f777fa74634fa41532f891cde0fc4cd0aa34ccadbe9e871d73efa32f830bced19cc7147545956c8b9477926e7dc31b608154
6
+ metadata.gz: eaeaeb4f48a2ffe3cd0a773771fa124aae14ed2d0b51bf90f549db169e8d51386b5de9ade2b068b0f59eb7cb715b56580d47d87c822ea30a1c6a318d1b06a39e
7
+ data.tar.gz: c9cd0e30967c16b757917218c2f5faf439155751a94f5f920d45af1bf4b2dd71f42077e89dc542fcf71d907cf6febf76da6b0b5be75861bf4c46a5568dd874f4
@@ -14,7 +14,19 @@ class Applitools::Appium::Eyes < Applitools::Selenium::SeleniumEyes
14
14
 
15
15
  private :perform_driver_settings_for_appium_driver
16
16
 
17
- def check(name, target)
17
+ def check(*args)
18
+ args.compact!
19
+ case (first_arg = args.shift)
20
+ when String
21
+ name = first_arg
22
+ target = args.shift
23
+ when Applitools::Selenium::Target
24
+ target = first_arg
25
+ when Hash
26
+ target = first_arg[:target]
27
+ name = first_arg[:name] || first_arg[:tag]
28
+ end
29
+
18
30
  logger.info "check(#{name}) is called"
19
31
  self.tag_for_debug = name
20
32
  Applitools::ArgumentGuard.one_of? target, 'target', [Applitools::Selenium::Target, Applitools::Appium::Target]
@@ -22,7 +22,19 @@ module Applitools
22
22
  open_base options
23
23
  end
24
24
 
25
- def check(name, target)
25
+ def check(*args)
26
+ args.compact!
27
+ case (first_arg = args.shift)
28
+ when String
29
+ name = first_arg
30
+ target = args.shift
31
+ when Applitools::Selenium::Target
32
+ target = first_arg
33
+ when Hash
34
+ target = first_arg[:target]
35
+ name = first_arg[:name] || first_arg[:tag]
36
+ end
37
+
26
38
  self.tag_for_debug = get_tag_for_debug(name)
27
39
  check_it(name, target, Applitools::MatchWindowData.new(default_match_settings))
28
40
  end
@@ -204,12 +204,13 @@ module Applitools::Connectivity
204
204
  def match_window(session, data)
205
205
  # Notice that this does not include the screenshot.
206
206
  json_data = Oj.dump(Applitools::Utils.camelcase_hash_keys(data.to_hash)).force_encoding('BINARY')
207
- body = if data.screenshot.empty?
208
- content_type = 'application/json'
209
- json_data
210
- else
207
+
208
+ body = if data.screenshot && data.app_output.screenshot_url.nil?
211
209
  content_type = 'application/octet-stream'
212
210
  [json_data.length].pack('L>') + json_data + data.screenshot
211
+ else
212
+ content_type = 'application/json'
213
+ json_data
213
214
  end
214
215
 
215
216
  Applitools::EyesLogger.debug 'Sending match data...'
@@ -20,5 +20,9 @@ module Applitools
20
20
  def to_s
21
21
  app_output.to_hash.to_s
22
22
  end
23
+
24
+ def screenshot_url
25
+ app_output.screenshot_url
26
+ end
23
27
  end
24
28
  end
@@ -650,7 +650,6 @@ module Applitools
650
650
  runner.rendering_info(server_connector),
651
651
  screenshot
652
652
  )
653
- screenshot = nil
654
653
  end
655
654
 
656
655
  logger.info 'Getting title...'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  module Applitools
4
- VERSION = '3.16.5'.freeze
4
+ VERSION = '3.16.6'.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.5
4
+ version: 3.16.6
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-03-02 00:00:00.000000000 Z
11
+ date: 2020-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oily_png