eyes_core 4.4.0 → 4.5.0.alpha
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/applitools/connectivity/server_connector.rb +1 -1
- data/lib/applitools/core/floating_region.rb +16 -12
- data/lib/applitools/core/test_result_summary.rb +1 -1
- data/lib/applitools/core/universal_eyes_checks.rb +1 -1
- data/lib/applitools/core/universal_new_api.rb +9 -3
- data/lib/applitools/universal_sdk/universal_check_settings.rb +6 -0
- data/lib/applitools/universal_sdk/universal_client.rb +179 -35
- data/lib/applitools/universal_sdk/universal_eyes.rb +6 -6
- data/lib/applitools/universal_sdk/universal_eyes_config.rb +25 -0
- data/lib/applitools/universal_sdk/universal_eyes_manager_config.rb +1 -1
- data/lib/applitools/version.rb +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c7a7954467752a70c0d4f461440fd757e5152569db10f88268e13b63a287982
|
4
|
+
data.tar.gz: '08eb391d5a2aa367873fe596c9adedfafaf195cec3cc70fc4203f303d083ae02'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0089cdebd1f02bb2e721ead00c0e321a334e79a0db516d45ad7a2b7d65f1862cb232d1a716212bc867eeda45fe4088b1e033bcc72531f6ff9b19a9c51699034
|
7
|
+
data.tar.gz: 9840236d2db173ba8c903fc495e0e332743483c36be2c5f8a59293b86c5514f23e2315b880eb4eefd43693fac3f8e585e1436bf3b276ff7f31c8635f99176494
|
@@ -21,7 +21,7 @@ module Applitools::Connectivity
|
|
21
21
|
DEFAULT_SERVER_URL = 'https://eyesapi.applitools.com'.freeze
|
22
22
|
|
23
23
|
SSL_CERT = File.join(File.dirname(File.expand_path(__FILE__)), '../../../certs/cacert.pem').to_s.freeze
|
24
|
-
DEFAULT_TIMEOUT =
|
24
|
+
DEFAULT_TIMEOUT = 300_000
|
25
25
|
API_SESSIONS = '/api/sessions'.freeze
|
26
26
|
API_SESSIONS_RUNNING = API_SESSIONS + '/running/'.freeze
|
27
27
|
API_SINGLE_TEST = API_SESSIONS + '/'.freeze
|
@@ -93,14 +93,16 @@ module Applitools
|
|
93
93
|
|
94
94
|
def to_hash
|
95
95
|
{
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
96
|
+
x: left,
|
97
|
+
y: top,
|
98
|
+
width: width,
|
99
|
+
height: height,
|
100
|
+
offset: {
|
101
|
+
top: max_top_offset + padding_top,
|
102
|
+
bottom: max_bottom_offset + padding_bottom,
|
103
|
+
left: max_left_offset + padding_left,
|
104
|
+
right: max_right_offset + padding_right
|
105
|
+
}
|
104
106
|
}
|
105
107
|
end
|
106
108
|
end
|
@@ -126,10 +128,12 @@ module Applitools
|
|
126
128
|
|
127
129
|
def to_hash
|
128
130
|
{
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
131
|
+
offset: {
|
132
|
+
top: max_top_offset,
|
133
|
+
bottom: max_bottom_offset,
|
134
|
+
left: max_left_offset,
|
135
|
+
right: max_right_offset
|
136
|
+
}
|
133
137
|
}
|
134
138
|
end
|
135
139
|
end
|
@@ -23,7 +23,7 @@ module Applitools
|
|
23
23
|
end
|
24
24
|
|
25
25
|
if check_result != {}
|
26
|
-
result = Applitools::MatchResult.new(Applitools::Utils.deep_stringify_keys(check_result))
|
26
|
+
result = Applitools::MatchResult.new(Applitools::Utils.deep_stringify_keys(check_result[0]))
|
27
27
|
|
28
28
|
check_fail_result_processing(name) unless result.as_expected?
|
29
29
|
end
|
@@ -12,9 +12,13 @@ module Applitools
|
|
12
12
|
def extract_text(targets_array)
|
13
13
|
targets_array.map do |target|
|
14
14
|
target['target'] = { elementId: target['target'].ref } if target['target'].is_a?(::Selenium::WebDriver::Element)
|
15
|
+
target['target']['x'] = target['target'].delete('left') if target['target']['left']
|
16
|
+
target['target']['y'] = target['target'].delete('top') if target['target']['top']
|
17
|
+
target[:region] = target.delete('target')
|
15
18
|
target
|
16
19
|
end
|
17
|
-
|
20
|
+
driver_target = driver.universal_driver_config
|
21
|
+
universal_eyes.extract_text(targets_array, driver_target)
|
18
22
|
end
|
19
23
|
|
20
24
|
|
@@ -25,7 +29,8 @@ module Applitools
|
|
25
29
|
# language?: string
|
26
30
|
# }
|
27
31
|
def extract_text_regions(patterns_array)
|
28
|
-
|
32
|
+
driver_target = driver.universal_driver_config
|
33
|
+
results = universal_eyes.extract_text_regions(patterns_array, driver_target)
|
29
34
|
Applitools::Utils.deep_stringify_keys(results)
|
30
35
|
end
|
31
36
|
|
@@ -35,7 +40,8 @@ module Applitools
|
|
35
40
|
locatorNames: locate_settings[:locator_names],
|
36
41
|
firstOnly: !!locate_settings[:first_only]
|
37
42
|
}
|
38
|
-
|
43
|
+
driver_target = driver.universal_driver_config
|
44
|
+
results = universal_eyes.locate(settings, driver_target)
|
39
45
|
Applitools::Utils.deep_stringify_keys(results)
|
40
46
|
end
|
41
47
|
|
@@ -80,6 +80,10 @@ module Applitools
|
|
80
80
|
:scrollRootElement,
|
81
81
|
:fully
|
82
82
|
|
83
|
+
# v3
|
84
|
+
json_fields :ufgOptions,
|
85
|
+
:userCommandId
|
86
|
+
|
83
87
|
def initialize(*args)
|
84
88
|
options = Applitools::Utils.extract_options! args
|
85
89
|
options.keys.select {|k| options[k] && respond_to?("#{k}=") }.each {|k| send("#{k}=", options[k]) }
|
@@ -160,6 +164,8 @@ module Applitools
|
|
160
164
|
self.send_dom = from_target_options_or_eyes(:send_dom, target.options, eyes)
|
161
165
|
self.use_dom = from_target_options_or_eyes(:use_dom, target.options, eyes)
|
162
166
|
self.visual_grid_options = from_target_options_or_eyes(:visual_grid_options, target.options, eyes)
|
167
|
+
self.ufg_options = self.visual_grid_options
|
168
|
+
self.user_command_id = self.variation_group_id
|
163
169
|
# rescue => e
|
164
170
|
# require('pry')
|
165
171
|
# binding.pry
|
@@ -16,29 +16,37 @@ module Applitools::Connectivity
|
|
16
16
|
extend Forwardable
|
17
17
|
def_delegators 'Applitools::EyesLogger', :logger
|
18
18
|
|
19
|
-
SESSION_INIT = 'Core.
|
19
|
+
SESSION_INIT = 'Core.makeCore'
|
20
20
|
|
21
21
|
CORE_MAKE_MANAGER = 'Core.makeManager'
|
22
22
|
CORE_GET_VIEWPORT_SIZE = 'Core.getViewportSize'
|
23
23
|
CORE_SET_VIEWPORT_SIZE = 'Core.setViewportSize'
|
24
|
-
CORE_CLOSE_BATCHES = 'Core.
|
24
|
+
CORE_CLOSE_BATCHES = 'Core.closeBatch'
|
25
25
|
CORE_DELETE_TEST = 'Core.deleteTest'
|
26
26
|
|
27
27
|
EYES_MANAGER_MAKE_EYES = 'EyesManager.openEyes'
|
28
28
|
EYES_MANAGER_CLOSE_ALL_EYES = 'EyesManager.closeManager'
|
29
29
|
EYES_CHECK = 'Eyes.check'
|
30
|
-
|
31
|
-
|
30
|
+
EYES_CHECK_AND_CLOSE = 'Eyes.checkAndClose' # ...
|
31
|
+
EYES_LOCATE = 'Core.locate'
|
32
|
+
EYES_EXTRACT_TEXT_REGIONS = 'Eyes.locateText'
|
32
33
|
EYES_EXTRACT_TEXT = 'Eyes.extractText'
|
33
34
|
EYES_CLOSE = 'Eyes.close'
|
34
35
|
EYES_ABORT = 'Eyes.abort'
|
35
36
|
|
37
|
+
attr_accessor :commands_config
|
36
38
|
|
37
39
|
def initialize
|
38
40
|
# @socket = Applitools::Connectivity::UniversalClientSocket.new
|
39
41
|
prepare_socket
|
40
42
|
# store on open for next check calls
|
41
43
|
@open_config = nil
|
44
|
+
@commands_config = {
|
45
|
+
open: {},
|
46
|
+
screenshot: {},
|
47
|
+
check: {},
|
48
|
+
close: {}
|
49
|
+
}
|
42
50
|
end
|
43
51
|
|
44
52
|
def make_manager(eyes_manager_config)
|
@@ -50,66 +58,201 @@ module Applitools::Connectivity
|
|
50
58
|
|
51
59
|
|
52
60
|
def core_make_manager(eyes_manager_config)
|
53
|
-
#
|
61
|
+
# interface MakeManagerRequestPayload {
|
62
|
+
# type: 'ufg' | 'classic'
|
63
|
+
# concurrency?: number
|
64
|
+
# legacyConcurrency?: number
|
65
|
+
# agentId?: string
|
66
|
+
# }
|
67
|
+
#
|
68
|
+
# type MakeManagerResponsePayload = Ref<EyesManager>
|
54
69
|
command_with_result(CORE_MAKE_MANAGER, eyes_manager_config)
|
55
70
|
end
|
56
71
|
|
72
|
+
def config_mapping(old_config, command_config, name)
|
73
|
+
return if old_config[name].nil?
|
74
|
+
command_config[name] = old_config.delete(name)
|
75
|
+
end
|
76
|
+
|
77
|
+
def map_open_eyes_config_to_commands_config(config)
|
78
|
+
[
|
79
|
+
:serverUrl, :apiKey, :proxy, :connectionTimeout, :removeSession, :agentId, :appName, :testName, :displayName,
|
80
|
+
:userTestId, :sessionType, :properties, :batch, :keepBatchOpen, :environmentName, :environment, :branchName,
|
81
|
+
:parentBranchName, :baselineEnvName, :baselineBranchName, :compareWithParentBranch, :ignoreBaseline,
|
82
|
+
:ignoreGitBranching, :saveDiffs, :abortIdleTestTimeout
|
83
|
+
].each do |k|
|
84
|
+
config_mapping(config, commands_config[:open], k)
|
85
|
+
end
|
86
|
+
|
87
|
+
commands_config[:open][:keepBatchOpen] = config.delete(:dontCloseBatches) unless config[:dontCloseBatches].nil?
|
88
|
+
|
89
|
+
[:hideCaret, :hideScrollbars, :disableBrowserFetching, :sendDom, :stitchMode,
|
90
|
+
:layoutBreakpoints, :waitBeforeCapture].each do |k|
|
91
|
+
config_mapping(config, commands_config[:check], k)
|
92
|
+
end
|
93
|
+
|
94
|
+
commands_config[:check][:renderers] = config.delete(:browsersInfo) unless config[:browsersInfo].nil?
|
95
|
+
|
96
|
+
unless config[:defaultMatchSettings].nil?
|
97
|
+
if config[:defaultMatchSettings][:accessibilitySettings]
|
98
|
+
commands_config[:check][:accessibilitySettings] = {}
|
99
|
+
commands_config[:check][:accessibilitySettings][:level] = config[:defaultMatchSettings][:accessibilitySettings].delete(:level) unless config[:defaultMatchSettings][:accessibilitySettings][:level].nil?
|
100
|
+
commands_config[:check][:accessibilitySettings][:version] = config[:defaultMatchSettings][:accessibilitySettings].delete(:guidelinesVersion) unless config[:defaultMatchSettings][:accessibilitySettings][:guidelinesVersion].nil?
|
101
|
+
config[:defaultMatchSettings].delete(:accessibilitySettings) if config[:defaultMatchSettings][:accessibilitySettings].empty?
|
102
|
+
end
|
103
|
+
commands_config[:check][:ignoreCaret] = config[:defaultMatchSettings].delete(:ignoreCaret) unless config[:defaultMatchSettings][:ignoreCaret].nil?
|
104
|
+
commands_config[:check][:matchLevel] = config[:defaultMatchSettings].delete(:matchLevel) unless config[:defaultMatchSettings][:matchLevel].nil?
|
105
|
+
config.delete(:defaultMatchSettings) if config[:defaultMatchSettings].empty?
|
106
|
+
end
|
107
|
+
|
108
|
+
if commands_config[:check][:fully].nil?
|
109
|
+
commands_config[:check][:fully] = config.delete(:forceFullPageScreenshot) unless config[:forceFullPageScreenshot].nil?
|
110
|
+
end
|
111
|
+
|
112
|
+
commands_config[:close][:updateBaselineIfNew] = config.delete(:saveNewTests) unless config[:saveNewTests].nil?
|
113
|
+
commands_config[:close][:updateBaselineIfDifferent] = config.delete(:saveFailedTests) unless config[:saveFailedTests].nil?
|
114
|
+
|
115
|
+
commands_config[:screenshot] = commands_config[:check]
|
116
|
+
end
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
57
121
|
def eyes_manager_make_eyes(manager, driver_config, config)
|
58
122
|
@open_config = config
|
59
123
|
|
60
|
-
|
61
|
-
#
|
62
|
-
#
|
63
|
-
|
124
|
+
map_open_eyes_config_to_commands_config(config)
|
125
|
+
# interface OpenEyesRequestPayload {
|
126
|
+
# manager: Ref<EyesManager>
|
127
|
+
# target?: DriverTarget
|
128
|
+
# settings?: OpenSettings
|
129
|
+
# config?: Config
|
130
|
+
# }
|
131
|
+
#
|
132
|
+
# type OpenEyesResponsePayload = Ref<Eyes>
|
133
|
+
command_with_result(EYES_MANAGER_MAKE_EYES, {manager: manager, target: driver_config, settings: commands_config[:open], config: commands_config})
|
64
134
|
end
|
65
135
|
|
66
136
|
def eyes_manager_close_all_eyes(manager)
|
67
|
-
#
|
68
|
-
|
137
|
+
# interface CloseManagerRequestPayload {
|
138
|
+
# manager: Ref<EyesManager>
|
139
|
+
# settings?: {throwErr?: boolean}
|
140
|
+
# }
|
141
|
+
#
|
142
|
+
# interface CloseManagerResponsePayload {
|
143
|
+
# results: Array<{
|
144
|
+
# error?: Error
|
145
|
+
# result?: TestResult
|
146
|
+
# renderer?: TType extends 'ufg' ? Renderer : never
|
147
|
+
# userTestId: string
|
148
|
+
# }>
|
149
|
+
# passed: number
|
150
|
+
# unresolved: number
|
151
|
+
# failed: number
|
152
|
+
# exceptions: number
|
153
|
+
# mismatches: number
|
154
|
+
# missing: number
|
155
|
+
# matches: number
|
156
|
+
# }
|
157
|
+
command_with_result(EYES_MANAGER_CLOSE_ALL_EYES, {manager: manager, config: commands_config})
|
69
158
|
end
|
70
159
|
|
71
160
|
def eyes_check(eyes, settings)
|
72
|
-
#
|
73
|
-
|
161
|
+
# interface CheckRequestPayload {
|
162
|
+
# eyes: Ref<Eyes>
|
163
|
+
# target?: ImageTarget | DriverTarget
|
164
|
+
# settings?: CheckSettings
|
165
|
+
# config?: Config
|
166
|
+
# }
|
167
|
+
#
|
168
|
+
# type CheckResponsePayload = CheckResult[]
|
169
|
+
command_with_result(EYES_CHECK, {eyes: eyes, settings: settings, config: commands_config})
|
74
170
|
end
|
75
171
|
|
76
|
-
def eyes_locate(eyes, settings)
|
77
|
-
#
|
78
|
-
|
172
|
+
def eyes_locate(eyes, settings, driver_target)
|
173
|
+
# interface LocateRequestPayload {
|
174
|
+
# target?: ImageTarget | DriverTarget
|
175
|
+
# settings?: LocateSettings
|
176
|
+
# config?: Config
|
177
|
+
# }
|
178
|
+
#
|
179
|
+
# interface LocateResponsePayload {
|
180
|
+
# [key: string]: Array<{x: number, y: number, width: number, height: number}>
|
181
|
+
# }
|
182
|
+
|
183
|
+
command_with_result(EYES_LOCATE, {target: driver_target, settings: settings, config: commands_config})
|
79
184
|
end
|
80
185
|
|
81
|
-
def eyes_extract_text_regions(eyes, settings)
|
82
|
-
#
|
83
|
-
|
186
|
+
def eyes_extract_text_regions(eyes, settings, driver_target)
|
187
|
+
# interface LocateTextRequestPayload {
|
188
|
+
# eyes: Ref<Eyes>
|
189
|
+
# target?: ImageTarget | DriverTarget
|
190
|
+
# settings?: LocateTextSettings
|
191
|
+
# config?: Config
|
192
|
+
# }
|
193
|
+
#
|
194
|
+
# type LocateTextResponcePayload = Record<string, Array<{text: string, x: number, y: number, width: number, hieght: number}>>
|
195
|
+
command_with_result(EYES_EXTRACT_TEXT_REGIONS, {eyes: eyes, settings: settings, config: commands_config})
|
84
196
|
end
|
85
197
|
|
86
|
-
def eyes_extract_text(eyes, regions)
|
87
|
-
#
|
88
|
-
|
198
|
+
def eyes_extract_text(eyes, regions, driver_target)
|
199
|
+
# interface ExtractTextRequestPayload {
|
200
|
+
# eyes: Ref<Eyes>
|
201
|
+
# target?: ImageTarget | DriverTarget
|
202
|
+
# settings?: ExtractTextSettings | ExtractTextSettings[]
|
203
|
+
# config?: Config
|
204
|
+
# }
|
205
|
+
#
|
206
|
+
# type ExtractTextResponcePayload = string[]
|
207
|
+
command_with_result(EYES_EXTRACT_TEXT, {eyes: eyes, settings: regions, config: commands_config})
|
89
208
|
end
|
90
209
|
|
91
210
|
def eyes_close(eyes)
|
92
|
-
#
|
93
|
-
|
211
|
+
# interface CloseResponsePayload {
|
212
|
+
# eyes: Ref<Eyes>
|
213
|
+
# settings?: CloseSettings
|
214
|
+
# config?: Config
|
215
|
+
# }
|
216
|
+
#
|
217
|
+
# type CloseResponsePayload = TestResult[]
|
218
|
+
settings = {throwErr: false}
|
219
|
+
|
220
|
+
command_with_result(EYES_CLOSE, {eyes: eyes, settings: settings, config: commands_config})
|
94
221
|
end
|
95
222
|
|
96
223
|
def eyes_abort(eyes)
|
97
|
-
#
|
224
|
+
# interface AbortPayload {
|
225
|
+
# eyes: Ref<Eyes>
|
226
|
+
# }
|
227
|
+
#
|
228
|
+
# type AbortResponsePayload = TestResult[]
|
98
229
|
command_with_result(EYES_ABORT, {eyes: eyes})
|
99
230
|
end
|
100
231
|
|
101
232
|
def core_get_viewport_size(driver)
|
102
|
-
#
|
103
|
-
|
233
|
+
# interface GetViewportSizeRequestPayload {
|
234
|
+
# target: DriverTarget
|
235
|
+
# }
|
236
|
+
#
|
237
|
+
# interface GetViewportSizeResponsePayload {
|
238
|
+
# width: number
|
239
|
+
# height: number
|
240
|
+
# }
|
241
|
+
command_with_result(CORE_GET_VIEWPORT_SIZE, {target: driver})
|
104
242
|
end
|
105
243
|
|
106
244
|
def core_set_viewport_size(driver, size)
|
107
|
-
#
|
108
|
-
|
245
|
+
# interface SetViewportSizeRequestPayload {
|
246
|
+
# target: DriverTarget
|
247
|
+
# size: {width: number, height: number}
|
248
|
+
# }
|
249
|
+
command_with_result(CORE_SET_VIEWPORT_SIZE, {target: driver, size: size})
|
109
250
|
end
|
110
251
|
|
111
252
|
def core_close_batches(close_batch_settings=nil)
|
112
|
-
#
|
253
|
+
# interface CloseBatchRequestPayload {
|
254
|
+
# settings: CloseBatchSettings | CloseBatchSettings[]
|
255
|
+
# }
|
113
256
|
unless close_batch_settings.is_a?(Hash)
|
114
257
|
batch_ids = [@open_config[:batch][:id]]
|
115
258
|
batch_ids = [close_batch_settings] if close_batch_settings.is_a?(String)
|
@@ -117,13 +260,13 @@ module Applitools::Connectivity
|
|
117
260
|
optional = [:serverUrl, :apiKey, :proxy].map {|k| [k, @open_config[k]] }.to_h
|
118
261
|
close_batch_settings = { settings: ({ batchIds: batch_ids }.merge(optional).compact) }
|
119
262
|
end
|
120
|
-
# await(->(cb) { @socket.request(CORE_CLOSE_BATCHES, close_batch_settings, cb) })
|
121
263
|
command_with_result(CORE_CLOSE_BATCHES, close_batch_settings)
|
122
264
|
end
|
123
265
|
|
124
266
|
def core_delete_test(delete_test_settings)
|
125
|
-
#
|
126
|
-
#
|
267
|
+
# interface DeleteTestRequestPayload {
|
268
|
+
# settings: DeleteTestSettings | DeleteTestSettings[]
|
269
|
+
# }
|
127
270
|
command_with_result(CORE_DELETE_TEST, delete_test_settings)
|
128
271
|
end
|
129
272
|
|
@@ -175,12 +318,13 @@ module Applitools::Connectivity
|
|
175
318
|
end
|
176
319
|
|
177
320
|
def session_init
|
178
|
-
|
321
|
+
make_core_payload = {
|
179
322
|
name: :rb,
|
180
323
|
version: Applitools::VERSION,
|
181
324
|
protocol: :webdriver,
|
182
325
|
cwd: Dir.pwd
|
183
|
-
}
|
326
|
+
}
|
327
|
+
command(SESSION_INIT, make_core_payload)
|
184
328
|
# no response
|
185
329
|
end
|
186
330
|
|
@@ -28,16 +28,16 @@ module Applitools
|
|
28
28
|
@universal_client.eyes_abort(@eyes)
|
29
29
|
end
|
30
30
|
|
31
|
-
def locate(settings)
|
32
|
-
@universal_client.eyes_locate(@eyes, settings)
|
31
|
+
def locate(settings, driver_target)
|
32
|
+
@universal_client.eyes_locate(@eyes, settings, driver_target)
|
33
33
|
end
|
34
34
|
|
35
|
-
def extract_text_regions(patterns_array)
|
36
|
-
@universal_client.eyes_extract_text_regions(@eyes, patterns_array)
|
35
|
+
def extract_text_regions(patterns_array, driver_target)
|
36
|
+
@universal_client.eyes_extract_text_regions(@eyes, patterns_array, driver_target)
|
37
37
|
end
|
38
38
|
|
39
|
-
def extract_text(targets_array)
|
40
|
-
@universal_client.eyes_extract_text(@eyes, targets_array)
|
39
|
+
def extract_text(targets_array, driver_target)
|
40
|
+
@universal_client.eyes_extract_text(@eyes, targets_array, driver_target)
|
41
41
|
end
|
42
42
|
|
43
43
|
end
|
@@ -123,6 +123,13 @@ module Applitools
|
|
123
123
|
:layoutBreakpoints,
|
124
124
|
:disableBrowserFetching
|
125
125
|
|
126
|
+
# v3
|
127
|
+
json_fields :environment
|
128
|
+
# :updateBaselineIfDifferent,
|
129
|
+
# :updateBaselineIfNew,
|
130
|
+
# :ignoreGitBranching,
|
131
|
+
# :abortIdleTestTimeout
|
132
|
+
|
126
133
|
# 23 + 3 + 2 + 11 = 39
|
127
134
|
FROM_ORIGINAL_EYES = [:api_key, :app_name, :batch, :browsers_info, :concurrent_sessions, :debug_screenshots,
|
128
135
|
:force_full_page_screenshot, :hide_caret, :hide_scrollbars, :host_app, :host_os, :match_timeout, :proxy,
|
@@ -181,10 +188,28 @@ module Applitools
|
|
181
188
|
self.default_match_settings = default_match_settings.to_hash if default_match_settings.is_a?(Applitools::ImageMatchSettings)
|
182
189
|
self.proxy = proxy.to_hash if proxy.is_a?(Applitools::Connectivity::Proxy)
|
183
190
|
self.viewport_size = viewport_size.to_h if viewport_size.is_a?(Applitools::RectangleSize)
|
191
|
+
v3api_change
|
184
192
|
# require 'pry'
|
185
193
|
# binding.pry
|
186
194
|
end
|
187
195
|
|
196
|
+
def v3api_change
|
197
|
+
# self.updateBaselineIfDifferent = saveFailedTests unless saveFailedTests.nil?
|
198
|
+
# self.updateBaselineIfNew = saveNewTests unless saveNewTests.nil?
|
199
|
+
environment = {}
|
200
|
+
environment[:hostApp] = hostApp unless hostApp.nil?
|
201
|
+
environment[:hostAppInfo] = hostAppInfo unless hostAppInfo.nil?
|
202
|
+
environment[:hostOS] = hostOS unless hostOS.nil?
|
203
|
+
environment[:hostOSInfo] = hostOSInfo unless hostOSInfo.nil?
|
204
|
+
environment[:deviceInfo] = deviceInfo unless deviceInfo.nil?
|
205
|
+
unless viewportSize.nil?
|
206
|
+
environment[:viewportSize] = viewportSize
|
207
|
+
self.viewportSize = nil
|
208
|
+
end
|
209
|
+
self.environment = environment unless environment.empty?
|
210
|
+
# :ignoreGitBranching, :abortIdleTestTimeout
|
211
|
+
end
|
212
|
+
|
188
213
|
def to_hash
|
189
214
|
json_data.compact.reject do |_, v|
|
190
215
|
case v
|
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: 4.
|
4
|
+
version: 4.5.0.alpha
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Applitools Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-23 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:
|
117
|
+
version: 3.0.2
|
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:
|
124
|
+
version: 3.0.2
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: bundler
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -422,9 +422,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
422
422
|
version: '0'
|
423
423
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
424
424
|
requirements:
|
425
|
-
- - "
|
425
|
+
- - ">"
|
426
426
|
- !ruby/object:Gem::Version
|
427
|
-
version:
|
427
|
+
version: 1.3.1
|
428
428
|
requirements: []
|
429
429
|
rubygems_version: 3.3.14
|
430
430
|
signing_key:
|