eyes_core 4.6.2 → 4.6.3
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 +4 -4
 - data/lib/applitools/appium/eyes.rb +35 -0
 - data/lib/applitools/core/eyes_base_configuration.rb +1 -0
 - data/lib/applitools/universal_sdk/universal_check_settings.rb +3 -0
 - data/lib/applitools/universal_sdk/universal_client.rb +13 -9
 - data/lib/applitools/universal_sdk/universal_eyes_manager_config.rb +8 -5
 - data/lib/applitools/version.rb +4 -4
 - metadata +4 -4
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: dc9edfb9472508be4eef5a0b90e465af508088a242e65702b778cc29fe3ae9ba
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: d886d03648fe73af72be41ae4d04f8cec2b4fdc0f956f1c753a3b7cc21144c04
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 5bc0945cc30ee39e4a9b7648e02d7a2c84a8f5b96fbbc98855d7669c290a3995347f6c06d703efa65006851c16f116353b4940440353c45acec9c1c56a4656c2
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: ef53eba834af0a0c7e7db66437d31a26a669c68a14885f43b2f0a86c4c1099e32258c51b1bca7a1e9bbfd00361db3f12cad3b348c249c8b424a71a5f856599c1
         
     | 
| 
         @@ -120,6 +120,41 @@ class Applitools::Appium::Eyes < Applitools::Selenium::SeleniumEyes 
     | 
|
| 
       120 
120 
     | 
    
         
             
                check(options[:tag], target)
         
     | 
| 
       121 
121 
     | 
    
         
             
              end
         
     | 
| 
       122 
122 
     | 
    
         | 
| 
      
 123 
     | 
    
         
            +
              def set_mobile_capabilities(nmg_caps, nml_api_key, eyes_server_url, proxy_settings)
         
     | 
| 
      
 124 
     | 
    
         
            +
                new_caps = {}
         
     | 
| 
      
 125 
     | 
    
         
            +
             
     | 
| 
      
 126 
     | 
    
         
            +
                if nml_api_key.nil? || nml_api_key.empty?
         
     | 
| 
      
 127 
     | 
    
         
            +
                  nml_api_key = ENV['APPLITOOLS_API_KEY']
         
     | 
| 
      
 128 
     | 
    
         
            +
                  if nml_api_key.nil? || nml_api_key.empty?
         
     | 
| 
      
 129 
     | 
    
         
            +
                    raise Applitools::EyesError.new('No API key was given, or is an empty string.')
         
     | 
| 
      
 130 
     | 
    
         
            +
                  end
         
     | 
| 
      
 131 
     | 
    
         
            +
                end
         
     | 
| 
      
 132 
     | 
    
         
            +
                new_caps[:NML_API_KEY] = nml_api_key
         
     | 
| 
      
 133 
     | 
    
         
            +
             
     | 
| 
      
 134 
     | 
    
         
            +
                if eyes_server_url.nil? || eyes_server_url.empty?
         
     | 
| 
      
 135 
     | 
    
         
            +
                  eyes_server_url = ENV['APPLITOOLS_SERVER_URL']
         
     | 
| 
      
 136 
     | 
    
         
            +
                end
         
     | 
| 
      
 137 
     | 
    
         
            +
                new_caps[:NML_SERVER_URL] = eyes_server_url if eyes_server_url
         
     | 
| 
      
 138 
     | 
    
         
            +
             
     | 
| 
      
 139 
     | 
    
         
            +
                if proxy_settings.nil? || proxy_settings.empty?
         
     | 
| 
      
 140 
     | 
    
         
            +
                  proxy_settings = ENV['APPLITOOLS_HTTP_PROXY']
         
     | 
| 
      
 141 
     | 
    
         
            +
                end
         
     | 
| 
      
 142 
     | 
    
         
            +
                new_caps[:NML_PROXY_URL] = proxy_settings if proxy_settings
         
     | 
| 
      
 143 
     | 
    
         
            +
             
     | 
| 
      
 144 
     | 
    
         
            +
                nmg_caps[:optionalIntentArguments] = "--es APPLITOOLS '" + new_caps.to_json + "'"
         
     | 
| 
      
 145 
     | 
    
         
            +
                nmg_caps[:processArguments] = {
         
     | 
| 
      
 146 
     | 
    
         
            +
                  args: [],
         
     | 
| 
      
 147 
     | 
    
         
            +
                  env: new_caps.merge(DYLD_INSERT_LIBRARIES: "@executable_path/Frameworks/UFG_lib.xcframework/ios-arm64/UFG_lib.framework/UFG_lib:@executable_path/Frameworks/UFG_lib.xcframework/ios-arm64_x86_64-simulator/UFG_lib.framework/UFG_lib")
         
     | 
| 
      
 148 
     | 
    
         
            +
                }
         
     | 
| 
      
 149 
     | 
    
         
            +
              end
         
     | 
| 
      
 150 
     | 
    
         
            +
             
     | 
| 
      
 151 
     | 
    
         
            +
              alias set_nmg_capabilities set_mobile_capabilities
         
     | 
| 
      
 152 
     | 
    
         
            +
             
     | 
| 
      
 153 
     | 
    
         
            +
              def use_system_screenshot(value = true)
         
     | 
| 
      
 154 
     | 
    
         
            +
                self.screenshot_mode = !value ? 'applitools-lib' : 'default'
         
     | 
| 
      
 155 
     | 
    
         
            +
                self
         
     | 
| 
      
 156 
     | 
    
         
            +
              end
         
     | 
| 
      
 157 
     | 
    
         
            +
             
     | 
| 
       123 
158 
     | 
    
         
             
              private
         
     | 
| 
       124 
159 
     | 
    
         | 
| 
       125 
160 
     | 
    
         
             
              def viewport_screenshot
         
     | 
| 
         @@ -126,6 +126,7 @@ module Applitools 
     | 
|
| 
       126 
126 
     | 
    
         
             
                boolean_field :enable_cross_origin_rendering
         
     | 
| 
       127 
127 
     | 
    
         
             
                boolean_field :dont_use_cookies
         
     | 
| 
       128 
128 
     | 
    
         
             
                boolean_field :dont_close_batches
         
     | 
| 
      
 129 
     | 
    
         
            +
                string_field :screenshot_mode
         
     | 
| 
       129 
130 
     | 
    
         | 
| 
       130 
131 
     | 
    
         
             
                methods_to_delegate.delete(:batch_info)
         
     | 
| 
       131 
132 
     | 
    
         
             
                methods_to_delegate.delete(:batch_info=)
         
     | 
| 
         @@ -95,6 +95,8 @@ module Applitools 
     | 
|
| 
       95 
95 
     | 
    
         
             
                            # :locationInView,
         
     | 
| 
       96 
96 
     | 
    
         
             
                            # :fullViewSize
         
     | 
| 
       97 
97 
     | 
    
         | 
| 
      
 98 
     | 
    
         
            +
                json_fields :screenshotMode
         
     | 
| 
      
 99 
     | 
    
         
            +
             
     | 
| 
       98 
100 
     | 
    
         
             
                def initialize(*args)
         
     | 
| 
       99 
101 
     | 
    
         
             
                  options = Applitools::Utils.extract_options! args
         
     | 
| 
       100 
102 
     | 
    
         
             
                  options.keys.select {|k| options[k] && respond_to?("#{k}=") }.each {|k| send("#{k}=", options[k]) }
         
     | 
| 
         @@ -119,6 +121,7 @@ module Applitools 
     | 
|
| 
       119 
121 
     | 
    
         | 
| 
       120 
122 
     | 
    
         
             
                  self.accessibility_settings = eyes.accessibility_validation
         
     | 
| 
       121 
123 
     | 
    
         
             
                  self.disable_browser_fetching = eyes.dont_fetch_resources
         
     | 
| 
      
 124 
     | 
    
         
            +
                  self.screenshot_mode = eyes.screenshot_mode
         
     | 
| 
       122 
125 
     | 
    
         | 
| 
       123 
126 
     | 
    
         
             
                  self.accessibility_regions = target.accessibility_regions
         
     | 
| 
       124 
127 
     | 
    
         
             
                  self.content_regions = target.content_regions
         
     | 
| 
         @@ -16,7 +16,7 @@ module Applitools::Connectivity 
     | 
|
| 
       16 
16 
     | 
    
         
             
                extend Forwardable
         
     | 
| 
       17 
17 
     | 
    
         
             
                def_delegators 'Applitools::EyesLogger', :logger
         
     | 
| 
       18 
18 
     | 
    
         | 
| 
       19 
     | 
    
         
            -
                 
     | 
| 
      
 19 
     | 
    
         
            +
                CORE_GET_EC_CLIENT = 'Core.getECClient'
         
     | 
| 
       20 
20 
     | 
    
         
             
                SESSION_INIT = 'Core.makeCore'
         
     | 
| 
       21 
21 
     | 
    
         | 
| 
       22 
22 
     | 
    
         
             
                CORE_MAKE_MANAGER = 'Core.makeManager'
         
     | 
| 
         @@ -57,7 +57,7 @@ module Applitools::Connectivity 
     | 
|
| 
       57 
57 
     | 
    
         
             
                  # ECClientSettings
         
     | 
| 
       58 
58 
     | 
    
         
             
                  #
         
     | 
| 
       59 
59 
     | 
    
         
             
                  # {
         
     | 
| 
       60 
     | 
    
         
            -
                  #   " 
     | 
| 
      
 60 
     | 
    
         
            +
                  #   "options": { // default options that will be used if user do not provide `applitools:` caps
         
     | 
| 
       61 
61 
     | 
    
         
             
                  #     "serverUrl": "https://eyesapi.applitools.com/",
         
     | 
| 
       62 
62 
     | 
    
         
             
                  #     "apiKey": "DFH$HJD%77333J355",
         
     | 
| 
       63 
63 
     | 
    
         
             
                  #   },
         
     | 
| 
         @@ -71,17 +71,17 @@ module Applitools::Connectivity 
     | 
|
| 
       71 
71 
     | 
    
         
             
                  ec_client_capabilities[:serverUrl] = server_url unless server_url.nil?
         
     | 
| 
       72 
72 
     | 
    
         
             
                  ec_client_capabilities[:apiKey] = api_key unless api_key.nil?
         
     | 
| 
       73 
73 
     | 
    
         
             
                  ec_client_settings = {}
         
     | 
| 
       74 
     | 
    
         
            -
                  ec_client_settings[: 
     | 
| 
      
 74 
     | 
    
         
            +
                  ec_client_settings[:options] = ec_client_capabilities unless ec_client_capabilities.empty?
         
     | 
| 
       75 
75 
     | 
    
         
             
                  ec_client_settings[:proxy] = proxy unless proxy.nil?
         
     | 
| 
       76 
76 
     | 
    
         
             
                  make_ec_client_request_payload = {settings: ec_client_settings}
         
     | 
| 
       77 
     | 
    
         
            -
                  # interface  
     | 
| 
      
 77 
     | 
    
         
            +
                  # interface GetECClientRequestPayload {
         
     | 
| 
       78 
78 
     | 
    
         
             
                  #   settings?: ECClientSettings
         
     | 
| 
       79 
79 
     | 
    
         
             
                  # }
         
     | 
| 
       80 
80 
     | 
    
         
             
                  #
         
     | 
| 
       81 
     | 
    
         
            -
                  # interface  
     | 
| 
      
 81 
     | 
    
         
            +
                  # interface GetECClientResponsePayload {
         
     | 
| 
       82 
82 
     | 
    
         
             
                  #   url: string
         
     | 
| 
       83 
83 
     | 
    
         
             
                  # }
         
     | 
| 
       84 
     | 
    
         
            -
                  command_with_result( 
     | 
| 
      
 84 
     | 
    
         
            +
                  command_with_result(CORE_GET_EC_CLIENT, make_ec_client_request_payload)
         
     | 
| 
       85 
85 
     | 
    
         
             
                end
         
     | 
| 
       86 
86 
     | 
    
         | 
| 
       87 
87 
     | 
    
         
             
                def make_manager(eyes_manager_config)
         
     | 
| 
         @@ -95,9 +95,13 @@ module Applitools::Connectivity 
     | 
|
| 
       95 
95 
     | 
    
         
             
                def core_make_manager(eyes_manager_config)
         
     | 
| 
       96 
96 
     | 
    
         
             
                  # interface MakeManagerRequestPayload {
         
     | 
| 
       97 
97 
     | 
    
         
             
                  #   type: 'ufg' | 'classic'
         
     | 
| 
       98 
     | 
    
         
            -
                  #    
     | 
| 
       99 
     | 
    
         
            -
                  # 
     | 
| 
       100 
     | 
    
         
            -
                  # 
     | 
| 
      
 98 
     | 
    
         
            +
                  #   settings?: EyesManagerSettings
         
     | 
| 
      
 99 
     | 
    
         
            +
                  # }
         
     | 
| 
      
 100 
     | 
    
         
            +
                  # ### EyesManagerSettings
         
     | 
| 
      
 101 
     | 
    
         
            +
                  # {
         
     | 
| 
      
 102 
     | 
    
         
            +
                  #   "concurrency": 10,
         
     | 
| 
      
 103 
     | 
    
         
            +
                  #   "legacyConcurrency": 50,
         
     | 
| 
      
 104 
     | 
    
         
            +
                  #   "agentId": "js/eyes/1.0.0"
         
     | 
| 
       101 
105 
     | 
    
         
             
                  # }
         
     | 
| 
       102 
106 
     | 
    
         
             
                  #
         
     | 
| 
       103 
107 
     | 
    
         
             
                  # type MakeManagerResponsePayload = Ref<EyesManager>
         
     | 
| 
         @@ -4,11 +4,11 @@ module Applitools 
     | 
|
| 
       4 
4 
     | 
    
         
             
              class UniversalEyesManagerConfig
         
     | 
| 
       5 
5 
     | 
    
         | 
| 
       6 
6 
     | 
    
         
             
                def self.classic
         
     | 
| 
       7 
     | 
    
         
            -
                  new(type: CLASSIC)
         
     | 
| 
      
 7 
     | 
    
         
            +
                  new(type: CLASSIC, runner_agent_id: "eyes.classic.ruby/#{Applitools::VERSION}")
         
     | 
| 
       8 
8 
     | 
    
         
             
                end
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
                def self.vg(concurrent_open_sessions=1)
         
     | 
| 
       11 
     | 
    
         
            -
                  new(type: VG, concurrency: concurrent_open_sessions, legacy: false)
         
     | 
| 
      
 11 
     | 
    
         
            +
                  new(type: VG, concurrency: concurrent_open_sessions, legacy: false, runner_agent_id: "eyes.visualgrid.ruby/#{Applitools::VERSION}")
         
     | 
| 
       12 
12 
     | 
    
         
             
                end
         
     | 
| 
       13 
13 
     | 
    
         | 
| 
       14 
14 
     | 
    
         
             
                # export type EyesManagerConfig<TType extends 'vg' | 'classic' = 'vg' | 'classic'> = {
         
     | 
| 
         @@ -16,7 +16,7 @@ module Applitools 
     | 
|
| 
       16 
16 
     | 
    
         
             
                #   concurrency?: TType extends 'vg' ? number : never
         
     | 
| 
       17 
17 
     | 
    
         
             
                #   legacy?: TType extends 'vg' ? boolean : never
         
     | 
| 
       18 
18 
     | 
    
         
             
                # }
         
     | 
| 
       19 
     | 
    
         
            -
                attr_reader :type, :concurrency, :legacy
         
     | 
| 
      
 19 
     | 
    
         
            +
                attr_reader :type, :concurrency, :legacy, :runner_agent_id
         
     | 
| 
       20 
20 
     | 
    
         | 
| 
       21 
21 
     | 
    
         
             
                VG = 'ufg'.freeze
         
     | 
| 
       22 
22 
     | 
    
         
             
                CLASSIC = 'classic'.freeze
         
     | 
| 
         @@ -29,6 +29,7 @@ module Applitools 
     | 
|
| 
       29 
29 
     | 
    
         
             
                  self.type = options[:type].to_s
         
     | 
| 
       30 
30 
     | 
    
         
             
                  self.concurrency = options[:concurrency]
         
     | 
| 
       31 
31 
     | 
    
         
             
                  self.legacy = options[:legacy]
         
     | 
| 
      
 32 
     | 
    
         
            +
                  @runner_agent_id = options[:runner_agent_id]
         
     | 
| 
       32 
33 
     | 
    
         
             
                end
         
     | 
| 
       33 
34 
     | 
    
         | 
| 
       34 
35 
     | 
    
         
             
                # enum_field :type, Applitools::UniversalEyesManagerConfig.type_enum_values
         
     | 
| 
         @@ -52,8 +53,10 @@ module Applitools 
     | 
|
| 
       52 
53 
     | 
    
         
             
                def to_hash
         
     | 
| 
       53 
54 
     | 
    
         
             
                  result = {}
         
     | 
| 
       54 
55 
     | 
    
         
             
                  result[:type] = type
         
     | 
| 
       55 
     | 
    
         
            -
                  result[: 
     | 
| 
       56 
     | 
    
         
            -
                  result[: 
     | 
| 
      
 56 
     | 
    
         
            +
                  result[:settings] = {}
         
     | 
| 
      
 57 
     | 
    
         
            +
                  result[:settings][:concurrency] = concurrency if concurrency
         
     | 
| 
      
 58 
     | 
    
         
            +
                  result[:settings][:legacyConcurrency] = legacy if legacy
         
     | 
| 
      
 59 
     | 
    
         
            +
                  result[:settings][:agentId] = runner_agent_id
         
     | 
| 
       57 
60 
     | 
    
         
             
                  result.compact
         
     | 
| 
       58 
61 
     | 
    
         
             
                end
         
     | 
| 
       59 
62 
     | 
    
         | 
    
        data/lib/applitools/version.rb
    CHANGED
    
    | 
         @@ -1,8 +1,8 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # frozen_string_literal: false
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            module Applitools
         
     | 
| 
       4 
     | 
    
         
            -
              VERSION = '4.6. 
     | 
| 
       5 
     | 
    
         
            -
              IMAGES_VERSION = '4.2. 
     | 
| 
       6 
     | 
    
         
            -
              UNIVERSAL_VERSION = '3.3. 
     | 
| 
       7 
     | 
    
         
            -
              UNIVERSAL_CORE_VERSION = ' 
     | 
| 
      
 4 
     | 
    
         
            +
              VERSION = '4.6.3'.freeze
         
     | 
| 
      
 5 
     | 
    
         
            +
              IMAGES_VERSION = '4.2.3'.freeze
         
     | 
| 
      
 6 
     | 
    
         
            +
              UNIVERSAL_VERSION = '3.3.3'.freeze
         
     | 
| 
      
 7 
     | 
    
         
            +
              UNIVERSAL_CORE_VERSION = '3.4.0'.freeze
         
     | 
| 
       8 
8 
     | 
    
         
             
            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: 4.6. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 4.6.3
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Applitools Team
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2023-05 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2023-07-05 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: faraday
         
     | 
| 
         @@ -114,14 +114,14 @@ dependencies: 
     | 
|
| 
       114 
114 
     | 
    
         
             
                requirements:
         
     | 
| 
       115 
115 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       116 
116 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       117 
     | 
    
         
            -
                    version: 3.3. 
     | 
| 
      
 117 
     | 
    
         
            +
                    version: 3.3.3
         
     | 
| 
       118 
118 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       119 
119 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       120 
120 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       121 
121 
     | 
    
         
             
                requirements:
         
     | 
| 
       122 
122 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       123 
123 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       124 
     | 
    
         
            -
                    version: 3.3. 
     | 
| 
      
 124 
     | 
    
         
            +
                    version: 3.3.3
         
     | 
| 
       125 
125 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       126 
126 
     | 
    
         
             
              name: bundler
         
     | 
| 
       127 
127 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     |