eyes_core 3.18.0 → 3.18.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/applitools/appium/eyes.rb +1 -1
- data/lib/applitools/connectivity/server_connector.rb +2 -1
- data/lib/applitools/core/batch_info.rb +20 -4
- data/lib/applitools/core/eyes_base.rb +2 -1
- data/lib/applitools/core/eyes_base_configuration.rb +12 -1
- data/lib/applitools/core/match_window_data.rb +4 -0
- data/lib/applitools/core/session_start_info.rb +2 -1
- data/lib/applitools/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2266ac45e6dae719ab54835cf538c92dcc1e26e6
|
4
|
+
data.tar.gz: 7b979f33539ba0b24134bbea48ff41e969c2b889
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 64183d05aa34724a51c7574d20ffad6488fcbb4d469f142a1d866f4031751bd23adf025bbd2b6b49620885e92770411101a4b96225696d1ee17c57b0c5209ef4
|
7
|
+
data.tar.gz: 583ce8369b5cfae7b339a7c9b7c68a12d47e590c2e74ee3af7cb4d56d54a5be586bc23933f551f27d698dd138e14f400d6cd259648d175c23e0a2855c68c3ed2
|
@@ -11,7 +11,7 @@ class Applitools::Appium::Eyes < Applitools::Selenium::SeleniumEyes
|
|
11
11
|
def initialize(*args)
|
12
12
|
super
|
13
13
|
self.dont_get_title = true
|
14
|
-
self.runner = Applitools::ClassicRunner.new
|
14
|
+
self.runner = Applitools::ClassicRunner.new unless runner
|
15
15
|
self.base_agent_id = "eyes.appium.ruby/#{Applitools::VERSION}".freeze
|
16
16
|
self.status_bar_height = 0
|
17
17
|
self.utils = Applitools::Appium::Utils
|
@@ -167,7 +167,7 @@ module Applitools::Connectivity
|
|
167
167
|
Oj.load(response.body)
|
168
168
|
end
|
169
169
|
|
170
|
-
def download_resource(url, ua_string = nil)
|
170
|
+
def download_resource(url, ua_string = nil, cookies=nil)
|
171
171
|
Applitools::EyesLogger.debug "Fetching #{url}..."
|
172
172
|
resp_proc = proc do |u|
|
173
173
|
faraday_connection(u, false).send(:get) do |req|
|
@@ -175,6 +175,7 @@ module Applitools::Connectivity
|
|
175
175
|
req.headers[:accept_encoding] = 'identity'
|
176
176
|
req.headers[:accept_language] = '*'
|
177
177
|
req.headers[:user_agent] = ua_string if ua_string
|
178
|
+
req.headers[:Cookie] = cookies.map { |h| [h[:name], h[:value]].join('=') }.join('; ') unless cookies.to_a.empty?
|
178
179
|
end
|
179
180
|
end
|
180
181
|
response = resp_proc.call(url)
|
@@ -1,12 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'securerandom'
|
4
|
+
require 'applitools/utils/utils'
|
4
5
|
require_relative 'helpers'
|
5
6
|
|
6
7
|
module Applitools
|
7
8
|
class BatchInfo
|
8
9
|
extend Helpers
|
9
|
-
attr_accessor :started_at, :id, :notify_on_completion
|
10
|
+
attr_accessor :started_at, :id, :notify_on_completion, :properties
|
10
11
|
|
11
12
|
environment_attribute :name, 'APPLITOOLS_BATCH_NAME'
|
12
13
|
environment_attribute :id, 'APPLITOOLS_BATCH_ID'
|
@@ -14,10 +15,24 @@ module Applitools
|
|
14
15
|
environment_attribute :env_notify_on_completion, 'APPLITOOLS_BATCH_NOTIFY'
|
15
16
|
|
16
17
|
|
17
|
-
def initialize(
|
18
|
+
def initialize(args = nil, started_at = Time.now)
|
19
|
+
case args
|
20
|
+
when String
|
21
|
+
name = args
|
22
|
+
when Hash
|
23
|
+
sym_args = Applitools::Utils.symbolize_keys args
|
24
|
+
id ||= sym_args[:id]
|
25
|
+
name ||= sym_args[:name]
|
26
|
+
properties ||= sym_args[:properties]
|
27
|
+
end
|
18
28
|
self.name = name if name
|
19
29
|
@started_at = started_at
|
20
|
-
|
30
|
+
if id
|
31
|
+
self.id = id
|
32
|
+
elsif self.id.nil? || self.id.empty?
|
33
|
+
self.id = SecureRandom.uuid
|
34
|
+
end
|
35
|
+
self.properties = properties if properties
|
21
36
|
self.notify_on_completion = 'true'.casecmp(env_notify_on_completion || '') == 0 ? true : false
|
22
37
|
end
|
23
38
|
|
@@ -27,7 +42,8 @@ module Applitools
|
|
27
42
|
'name' => name,
|
28
43
|
'startedAt' => @started_at.iso8601,
|
29
44
|
'batchSequenceName' => sequence_name,
|
30
|
-
'notifyOnCompletion' => notify_on_completion
|
45
|
+
'notifyOnCompletion' => notify_on_completion,
|
46
|
+
'properties' => properties
|
31
47
|
}
|
32
48
|
end
|
33
49
|
|
@@ -319,7 +319,7 @@ module Applitools
|
|
319
319
|
branch_name: branch_name, parent_branch_name: parent_branch_name,
|
320
320
|
baseline_branch_name: baseline_branch_name, save_diffs: save_diffs,
|
321
321
|
properties: properties
|
322
|
-
|
322
|
+
session_start_info.agent_run_id = agent_run_id if agent_run_id
|
323
323
|
match_window_data.start_info = session_start_info
|
324
324
|
match_window_data.update_baseline_if_new = save_new_tests
|
325
325
|
match_window_data.update_baseline_if_different = save_failed_tests
|
@@ -597,6 +597,7 @@ module Applitools
|
|
597
597
|
branch_name: branch_name, parent_branch_name: parent_branch_name,
|
598
598
|
baseline_branch_name: baseline_branch_name, save_diffs: save_diffs,
|
599
599
|
properties: properties
|
600
|
+
session_start_info.agent_run_id = agent_run_id if agent_run_id
|
600
601
|
|
601
602
|
logger.info 'Starting server session...'
|
602
603
|
self.running_session = server_connector.start_session session_start_info
|
@@ -25,7 +25,10 @@ module Applitools
|
|
25
25
|
default_match_settings: Applitools::ImageMatchSettings.new,
|
26
26
|
accessibility_validation: nil,
|
27
27
|
properties: [],
|
28
|
-
match_timeout: DEFAULT_MATCH_TIMEOUT
|
28
|
+
match_timeout: DEFAULT_MATCH_TIMEOUT,
|
29
|
+
dont_fetch_resources: true,
|
30
|
+
enable_cross_origin_rendering: true,
|
31
|
+
dont_use_cookies: false,
|
29
32
|
}.freeze
|
30
33
|
|
31
34
|
class << self
|
@@ -118,6 +121,10 @@ module Applitools
|
|
118
121
|
object_field :accessibility_validation, Applitools::AccessibilitySettings, true
|
119
122
|
object_field :properties, Array
|
120
123
|
int_field :match_timeout
|
124
|
+
string_field :agent_run_id
|
125
|
+
boolean_field :dont_fetch_resources
|
126
|
+
boolean_field :enable_cross_origin_rendering
|
127
|
+
boolean_field :dont_use_cookies
|
121
128
|
|
122
129
|
methods_to_delegate.delete(:batch_info)
|
123
130
|
methods_to_delegate.delete(:batch_info=)
|
@@ -187,6 +194,10 @@ module Applitools
|
|
187
194
|
properties << { name: name, value: value } if name && value
|
188
195
|
end
|
189
196
|
|
197
|
+
def disable_browser_fetching=(value)
|
198
|
+
self.dont_fetch_resources = value
|
199
|
+
end
|
200
|
+
|
190
201
|
methods_to_delegate.push(:set_proxy)
|
191
202
|
methods_to_delegate.push(:add_property)
|
192
203
|
end
|
@@ -87,6 +87,10 @@ module Applitools
|
|
87
87
|
current_data['Options']['Name'] = value
|
88
88
|
end
|
89
89
|
|
90
|
+
def variation_group_id=(value)
|
91
|
+
current_data['Options']['variantId'] = value
|
92
|
+
end
|
93
|
+
|
90
94
|
def user_inputs=(value)
|
91
95
|
Applitools::ArgumentGuard.is_a? value, 'value', Array
|
92
96
|
current_data['UserInputs'] += value.select { |i| i.respond_to? :to_hash }
|
@@ -5,7 +5,7 @@ module Applitools
|
|
5
5
|
include Applitools::Jsonable
|
6
6
|
json_fields :batchInfo, :agentId, :appIdOrName, :verId, :environment, :environmentName, :branchName, :defaultMatchSettings,
|
7
7
|
:scenarioIdOrName, :properties, :parentBranchName, :compareWithParentBranch, :baselineEnvName, :saveDiffs, :sessionType,
|
8
|
-
:baselineBranchName
|
8
|
+
:baselineBranchName, :agentRunId
|
9
9
|
|
10
10
|
wrap_data do |value|
|
11
11
|
{ startInfo: value }
|
@@ -28,6 +28,7 @@ module Applitools
|
|
28
28
|
self.save_diffs = options[:save_diffs]
|
29
29
|
self.session_type = options[:session_type]
|
30
30
|
self.baseline_branch_name = options[:baseline_branch_name]
|
31
|
+
self.agentRunId = options[:agent_run_id] if options[:agent_run_id]
|
31
32
|
end
|
32
33
|
|
33
34
|
def to_hash
|
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.18.
|
4
|
+
version: 3.18.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Applitools Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oily_png
|