eyes_core 5.0.0 → 6.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +504 -0
- data/Rakefile +35 -0
- data/eyes_core.gemspec +60 -0
- data/lib/applitools/core/batch_info.rb +2 -0
- data/lib/applitools/core/eyes_base.rb +106 -18
- data/lib/applitools/core/eyes_base_configuration.rb +9 -3
- data/lib/applitools/core/eyes_runner.rb +3 -2
- data/lib/applitools/core/test_results.rb +6 -1
- data/lib/applitools/core/universal_eyes_checks.rb +2 -1
- data/lib/applitools/core/universal_eyes_open.rb +2 -1
- data/lib/applitools/eyes_core/version.rb +10 -0
- data/lib/applitools/universal_sdk/universal_client.rb +26 -10
- data/lib/applitools/universal_sdk/universal_eyes_config.rb +10 -9
- data/lib/eyes_core.rb +1 -3
- metadata +14 -58
- data/ext/eyes_core/extconf.rb +0 -5
- data/ext/eyes_core/eyes_core.c +0 -252
- data/ext/eyes_core/eyes_core.h +0 -28
- data/lib/applitools/appium/android_region_provider.rb +0 -32
- data/lib/applitools/appium/android_screenshot.rb +0 -21
- data/lib/applitools/appium/driver.rb +0 -12
- data/lib/applitools/appium/eyes.rb +0 -189
- data/lib/applitools/appium/ios_region_provider.rb +0 -25
- data/lib/applitools/appium/ios_screenshot.rb +0 -10
- data/lib/applitools/appium/region_provider.rb +0 -51
- data/lib/applitools/appium/screenshot.rb +0 -30
- data/lib/applitools/appium/target.rb +0 -240
- data/lib/applitools/appium/utils.rb +0 -64
- data/lib/applitools/calabash/calabash_element.rb +0 -64
- data/lib/applitools/calabash/calabash_screenshot_provider.rb +0 -83
- data/lib/applitools/calabash/environment_detector.rb +0 -25
- data/lib/applitools/calabash/eyes.rb +0 -194
- data/lib/applitools/calabash/eyes_calabash_android_screenshot.rb +0 -68
- data/lib/applitools/calabash/eyes_calabash_ios_screenshot.rb +0 -30
- data/lib/applitools/calabash/eyes_calabash_screenshot.rb +0 -80
- data/lib/applitools/calabash/eyes_hooks.rb +0 -51
- data/lib/applitools/calabash/eyes_settings.rb +0 -45
- data/lib/applitools/calabash/full_page_capture_algorithm/android_scroll_view.rb +0 -95
- data/lib/applitools/calabash/full_page_capture_algorithm/base.rb +0 -51
- data/lib/applitools/calabash/full_page_capture_algorithm/ios_ui_table_view.rb +0 -150
- data/lib/applitools/calabash/full_page_capture_algorithm.rb +0 -26
- data/lib/applitools/calabash/os_versions.rb +0 -25
- data/lib/applitools/calabash/rspec_matchers.rb +0 -25
- data/lib/applitools/calabash/steps/android_eyes_session.rb +0 -37
- data/lib/applitools/calabash/steps/android_matchers.rb +0 -36
- data/lib/applitools/calabash/steps/eyes_session.rb +0 -42
- data/lib/applitools/calabash/steps/eyes_settings.rb +0 -59
- data/lib/applitools/calabash/steps/ios_eyes_session.rb +0 -15
- data/lib/applitools/calabash/steps/ios_matchers.rb +0 -17
- data/lib/applitools/calabash/steps/matchers.rb +0 -71
- data/lib/applitools/calabash/target.rb +0 -69
- data/lib/applitools/calabash/utils.rb +0 -74
- data/lib/applitools/calabash_steps.rb +0 -16
- data/lib/applitools/capybara/capybara_settings.rb +0 -25
- data/lib/applitools/capybara/driver.rb +0 -39
- data/lib/applitools/rspec/target_matcher.rb +0 -25
- data/lib/applitools/universal_sdk/executable_finder.rb +0 -57
- data/lib/applitools/universal_sdk/universal_server_control.rb +0 -79
- data/lib/applitools/version.rb +0 -8
- data/lib/eyes_consts.rb +0 -4
- data/lib/eyes_rspec.rb +0 -4
@@ -49,7 +49,7 @@ module Applitools
|
|
49
49
|
begin
|
50
50
|
driver_config_json = driver.universal_driver_config
|
51
51
|
required_size = Applitools::RectangleSize.from_any_argument viewport_size
|
52
|
-
@universal_client = Applitools::Connectivity::UniversalClient.new
|
52
|
+
@universal_client = Applitools::Connectivity::UniversalClient.new(self)
|
53
53
|
@universal_client.core_set_viewport_size(driver_config_json, required_size.to_hash)
|
54
54
|
rescue => e
|
55
55
|
Applitools::EyesLogger.error e.class
|
@@ -64,7 +64,7 @@ module Applitools
|
|
64
64
|
server_url = options[:server_url] || default_configs[:server_url]
|
65
65
|
api_key = options[:api_key] || default_configs[:api_key]
|
66
66
|
proxy = options[:proxy]
|
67
|
-
@universal_client = Applitools::Connectivity::UniversalClient.new
|
67
|
+
@universal_client = Applitools::Connectivity::UniversalClient.new(self)
|
68
68
|
core_ec_client = @universal_client.core_make_ec_client(server_url, api_key, proxy)
|
69
69
|
core_ec_client[:url]
|
70
70
|
end
|
@@ -150,6 +150,13 @@ module Applitools
|
|
150
150
|
self.universal_driver = nil # eyes.open
|
151
151
|
end
|
152
152
|
|
153
|
+
def self.environment_sdk
|
154
|
+
{
|
155
|
+
name: :eyes_core,
|
156
|
+
currentVersion: Applitools::EyesCore::VERSION
|
157
|
+
}
|
158
|
+
end
|
159
|
+
|
153
160
|
def ensure_config
|
154
161
|
self.config = Applitools::EyesBaseConfiguration.new
|
155
162
|
end
|
@@ -441,11 +448,6 @@ module Applitools
|
|
441
448
|
logger.info "close(#{throw_exception})"
|
442
449
|
raise Applitools::EyesError.new 'Eyes not open' unless open?
|
443
450
|
|
444
|
-
self.open = false
|
445
|
-
self.last_screenshot = nil
|
446
|
-
|
447
|
-
clear_user_inputs
|
448
|
-
|
449
451
|
if !running_session && !universal_eyes
|
450
452
|
be_silent || logger.info('Server session was not started')
|
451
453
|
be_silent || logger.info('--- Empty test ended')
|
@@ -463,26 +465,112 @@ module Applitools
|
|
463
465
|
|
464
466
|
# U-Notes : universal server returns Array ; keys as sym
|
465
467
|
universal_eyes.close # nil
|
468
|
+
results = get_results(throw_exception)
|
469
|
+
# universal_results = universal_eyes.eyes_get_results # Array even for one test
|
470
|
+
# # require 'pry'
|
471
|
+
# # binding.pry
|
472
|
+
# # error from universal server
|
473
|
+
# if universal_results.is_a?(Hash) && universal_results[:message] && universal_results[:stack] && universal_results[:reason]
|
474
|
+
# logger.error "--- Error (#{universal_results[:reason]}) : #{universal_results[:message]}"
|
475
|
+
# error_message = "Test '#{test_name}' of '#{app_name}' " \
|
476
|
+
# "is failed! Details : #{universal_results[:message]}"
|
477
|
+
# raise Applitools::TestFailedError.new error_message, results if throw_exception
|
478
|
+
# return universal_results
|
479
|
+
# end
|
480
|
+
# key_transformed_results = Applitools::Utils.deep_stringify_keys(universal_results)
|
481
|
+
# results = key_transformed_results.map {|result| Applitools::TestResults.new(result) }
|
482
|
+
# results = results.first if results.size >= 1
|
483
|
+
#
|
484
|
+
# session_results_url = results.url
|
485
|
+
# # results = server_connector.stop_session running_session, false, save
|
486
|
+
# runner.aggregate_result(results) if runner
|
487
|
+
#
|
488
|
+
# # results.is_new = is_new_session
|
489
|
+
# # results.url = session_results_url
|
490
|
+
# save = results.new? && save_new_tests || !results.new? && failed && save_failed_tests
|
491
|
+
# logger.info "Automatically save test? #{save}"
|
492
|
+
#
|
493
|
+
# logger.info results.to_s(verbose_results)
|
494
|
+
#
|
495
|
+
# if results.unresolved?
|
496
|
+
# if results.new?
|
497
|
+
# logger.error "--- New test ended. see details at #{session_results_url}"
|
498
|
+
# error_message = "New test '#{test_name}' " \
|
499
|
+
# "of '#{app_name}' " \
|
500
|
+
# "Please approve the baseline at #{session_results_url} "
|
501
|
+
# raise Applitools::NewTestError.new error_message, results if throw_exception
|
502
|
+
# else
|
503
|
+
# logger.error "--- Differences are found. see details at #{session_results_url}"
|
504
|
+
# error_message = "Test '#{test_name}' " \
|
505
|
+
# "of '#{app_name}' " \
|
506
|
+
# "detected differences! See details at #{session_results_url}"
|
507
|
+
# raise Applitools::DiffsFoundError.new error_message, results if throw_exception
|
508
|
+
# end
|
509
|
+
# return results
|
510
|
+
# end
|
511
|
+
#
|
512
|
+
# if results.failed?
|
513
|
+
# logger.error "--- Failed test ended. see details at #{session_results_url}"
|
514
|
+
# error_message = "Test '#{test_name}' of '#{app_name}' " \
|
515
|
+
# "is failed! See details at #{session_results_url}"
|
516
|
+
# raise Applitools::TestFailedError.new error_message, results if throw_exception
|
517
|
+
# return results
|
518
|
+
# end
|
519
|
+
|
520
|
+
logger.info '--- Test passed'
|
521
|
+
self.results.push results
|
522
|
+
|
523
|
+
# match old style one result
|
524
|
+
if results.is_a?(Array) && results.first.is_a?(Applitools::TestResults)
|
525
|
+
return results.first if results.size >= 1
|
526
|
+
end
|
527
|
+
return results
|
528
|
+
ensure
|
529
|
+
self.running_session = nil
|
530
|
+
self.app_name = ''
|
531
|
+
end
|
532
|
+
|
533
|
+
def get_results(throw_exception = true)
|
534
|
+
if disabled?
|
535
|
+
logger.info "#{__method__} Ignored"
|
536
|
+
return false
|
537
|
+
end
|
538
|
+
|
539
|
+
self.open = false
|
540
|
+
self.last_screenshot = nil
|
541
|
+
clear_user_inputs
|
542
|
+
|
543
|
+
logger.info 'Getting results...'
|
544
|
+
|
466
545
|
universal_results = universal_eyes.eyes_get_results # Array even for one test
|
467
546
|
# require 'pry'
|
468
547
|
# binding.pry
|
548
|
+
# error from universal server
|
549
|
+
if universal_results.is_a?(Hash) && universal_results[:message] && universal_results[:stack] && universal_results[:reason]
|
550
|
+
logger.error "--- Error (#{universal_results[:reason]}) : #{universal_results[:message]}"
|
551
|
+
error_message = "Test '#{test_name}' of '#{app_name}' " \
|
552
|
+
"is failed! Details : #{universal_results[:message]}"
|
553
|
+
raise Applitools::TestFailedError.new error_message, results if throw_exception
|
554
|
+
return universal_results
|
555
|
+
end
|
469
556
|
key_transformed_results = Applitools::Utils.deep_stringify_keys(universal_results)
|
470
557
|
results = key_transformed_results.map {|result| Applitools::TestResults.new(result) }
|
471
|
-
results = results.first if results.size >= 1
|
558
|
+
# results = results.first if results.size >= 1
|
472
559
|
|
473
|
-
session_results_url = results.url
|
560
|
+
session_results_url = results.first.url
|
474
561
|
# results = server_connector.stop_session running_session, false, save
|
475
|
-
|
562
|
+
|
563
|
+
results.each { |result| runner.aggregate_result(result) } if runner
|
476
564
|
|
477
565
|
# results.is_new = is_new_session
|
478
566
|
# results.url = session_results_url
|
479
|
-
save = results.new? && save_new_tests || !results.new? && failed && save_failed_tests
|
567
|
+
save = (results.any?(&:new?) && save_new_tests) || (!results.any?(&:new?) && failed && save_failed_tests)
|
480
568
|
logger.info "Automatically save test? #{save}"
|
481
569
|
|
482
|
-
logger.info results.to_s(verbose_results)
|
570
|
+
logger.info results.first.to_s(verbose_results)
|
483
571
|
|
484
|
-
if results.unresolved?
|
485
|
-
if results.new?
|
572
|
+
if results.any?(&:unresolved?)
|
573
|
+
if results.any?(&:new?)
|
486
574
|
logger.error "--- New test ended. see details at #{session_results_url}"
|
487
575
|
error_message = "New test '#{test_name}' " \
|
488
576
|
"of '#{app_name}' " \
|
@@ -498,16 +586,16 @@ module Applitools
|
|
498
586
|
return results
|
499
587
|
end
|
500
588
|
|
501
|
-
if results.failed?
|
589
|
+
if results.any?(&:failed?)
|
502
590
|
logger.error "--- Failed test ended. see details at #{session_results_url}"
|
503
591
|
error_message = "Test '#{test_name}' of '#{app_name}' " \
|
504
|
-
|
592
|
+
"is failed! See details at #{session_results_url}"
|
505
593
|
raise Applitools::TestFailedError.new error_message, results if throw_exception
|
506
594
|
return results
|
507
595
|
end
|
508
596
|
|
509
|
-
logger.info '--- Test passed'
|
510
|
-
self.results.push results
|
597
|
+
# logger.info '--- Test passed'
|
598
|
+
# self.results.push results
|
511
599
|
return results
|
512
600
|
ensure
|
513
601
|
self.running_session = nil
|
@@ -207,9 +207,15 @@ module Applitools
|
|
207
207
|
|
208
208
|
# layoutBreakpoints?: boolean | number[]
|
209
209
|
def layout_breakpoints=(value)
|
210
|
-
config_hash[:layout_breakpoints] = value if value === true || value === false
|
211
|
-
config_hash[:layout_breakpoints] = value if value.is_a?(Array) && value.all? {|v| v.is_a?(Numeric)}
|
212
|
-
|
210
|
+
config_hash[:layout_breakpoints] = { breakpoints: value } if value === true || value === false
|
211
|
+
config_hash[:layout_breakpoints] = { breakpoints: value } if value.is_a?(Array) && value.all? {|v| v.is_a?(Numeric)}
|
212
|
+
if value.is_a?(Hash)
|
213
|
+
if value.has_key?(:breakpoints) || value.has_key?('breakpoints')
|
214
|
+
config_hash[:layout_breakpoints] = value
|
215
|
+
else
|
216
|
+
config_hash[:layout_breakpoints] = { breakpoints: value }
|
217
|
+
end
|
218
|
+
end
|
213
219
|
end
|
214
220
|
def layout_breakpoints
|
215
221
|
config_hash[:layout_breakpoints]
|
@@ -8,7 +8,7 @@ module Applitools
|
|
8
8
|
|
9
9
|
def initialize
|
10
10
|
self.batches_server_connectors_map = {}
|
11
|
-
self.universal_client =
|
11
|
+
self.universal_client = nil # eyes.open
|
12
12
|
self.universal_eyes_manager = nil # eyes.open
|
13
13
|
end
|
14
14
|
|
@@ -20,8 +20,9 @@ module Applitools
|
|
20
20
|
batches_server_connectors_map.each_value { |v| v.call if v.respond_to? :call }
|
21
21
|
end
|
22
22
|
|
23
|
-
def get_universal_eyes_manager
|
23
|
+
def get_universal_eyes_manager(eyes=nil)
|
24
24
|
return universal_eyes_manager if universal_eyes_manager
|
25
|
+
self.universal_client = Applitools::Connectivity::UniversalClient.new(eyes) if universal_client.nil?
|
25
26
|
self.universal_eyes_manager = universal_client.make_manager(universal_eyes_manager_config.to_hash)
|
26
27
|
end
|
27
28
|
|
@@ -20,7 +20,8 @@ module Applitools
|
|
20
20
|
attr_reader :status, :steps, :matches, :mismatches, :missing, :original_results, :browser_info, :renderer
|
21
21
|
|
22
22
|
def initialize(init_results = {})
|
23
|
-
|
23
|
+
environment = init_results[:environment] || {}
|
24
|
+
@renderer = Applitools::Utils.deep_stringify_keys(Applitools::Utils.underscore_hash_keys(environment[:requested]))
|
24
25
|
@browser_info = JSON.parse(@renderer.to_json, object_class: OpenStruct)
|
25
26
|
results = Applitools::Utils.deep_stringify_keys(init_results[:result] ? init_results[:result] : init_results)
|
26
27
|
@original_results = results
|
@@ -77,6 +78,10 @@ module Applitools
|
|
77
78
|
original_results['error']
|
78
79
|
end
|
79
80
|
|
81
|
+
def app_name
|
82
|
+
original_results['appName']
|
83
|
+
end
|
84
|
+
|
80
85
|
def session_accessibility_status
|
81
86
|
@accessibility_status ||= original_results['accessibilityStatus'] && AccessibilityStatus.new(original_results['accessibilityStatus'] || {})
|
82
87
|
end
|
@@ -12,6 +12,7 @@ module Applitools
|
|
12
12
|
return disabled_result if respond_to?(:disabled?) && disabled?
|
13
13
|
|
14
14
|
raise Applitools::EyesNotOpenException.new('Eyes not open!') if @universal_eyes.nil?
|
15
|
+
raise Applitools::EyesNotOpenException.new('Eyes not open') unless open?
|
15
16
|
Applitools::EyesLogger.logger.info "#{test_name} : check(#{name}) started ..."
|
16
17
|
settings = get_universal_check_settings(name, target)
|
17
18
|
image_target = settings[:image].nil? ? {} : { image: settings.delete(:image) }
|
@@ -24,7 +25,7 @@ module Applitools
|
|
24
25
|
raise Applitools::EyesError.new("Request failed: #{check_result[:message]}")
|
25
26
|
end
|
26
27
|
|
27
|
-
if check_result != {}
|
28
|
+
if check_result != {} && !check_result.nil?
|
28
29
|
result = Applitools::MatchResult.new(Applitools::Utils.deep_stringify_keys(check_result[0]))
|
29
30
|
|
30
31
|
check_fail_result_processing(name) unless result.as_expected?
|
@@ -31,7 +31,7 @@ module Applitools
|
|
31
31
|
|
32
32
|
update_config_from_options(options)
|
33
33
|
universal_driver_config = driver.universal_driver_config if self.class.name != 'Applitools::Images::Eyes'
|
34
|
-
universal_eyes_manager = runner.get_universal_eyes_manager
|
34
|
+
universal_eyes_manager = runner.get_universal_eyes_manager(self)
|
35
35
|
|
36
36
|
universal_eyes_config = Applitools::UniversalEyesConfig.new
|
37
37
|
universal_eyes_config.from_original_sdk(self)
|
@@ -43,6 +43,7 @@ module Applitools
|
|
43
43
|
raise Applitools::EyesNotOpenException.new('Eyes not open!') if @universal_eyes.nil?
|
44
44
|
|
45
45
|
self.open = true if respond_to?(:open=, true)
|
46
|
+
self.opened = true if respond_to?(:opened=, true)
|
46
47
|
self.running_session = true if respond_to?(:running_session=, true)
|
47
48
|
if self.class.name != 'Applitools::Images::Eyes'
|
48
49
|
driver
|
@@ -8,6 +8,7 @@ require 'securerandom'
|
|
8
8
|
require 'colorize'
|
9
9
|
require 'websocket'
|
10
10
|
require 'uri'
|
11
|
+
require 'eyes_universal'
|
11
12
|
|
12
13
|
|
13
14
|
module Applitools::Connectivity
|
@@ -40,9 +41,9 @@ module Applitools::Connectivity
|
|
40
41
|
|
41
42
|
attr_accessor :commands_config
|
42
43
|
|
43
|
-
def initialize
|
44
|
+
def initialize(eyes=nil)
|
44
45
|
# @socket = Applitools::Connectivity::UniversalClientSocket.new
|
45
|
-
prepare_socket
|
46
|
+
prepare_socket(eyes)
|
46
47
|
# store on open for next check calls
|
47
48
|
@open_config = nil
|
48
49
|
@commands_config = {
|
@@ -68,7 +69,7 @@ module Applitools::Connectivity
|
|
68
69
|
# },
|
69
70
|
# }
|
70
71
|
ec_client_capabilities = {}
|
71
|
-
ec_client_capabilities[:
|
72
|
+
ec_client_capabilities[:ecServerUrl] = server_url unless server_url.nil?
|
72
73
|
ec_client_capabilities[:apiKey] = api_key unless api_key.nil?
|
73
74
|
ec_client_settings = {}
|
74
75
|
ec_client_settings[:options] = ec_client_capabilities unless ec_client_capabilities.empty?
|
@@ -115,7 +116,7 @@ module Applitools::Connectivity
|
|
115
116
|
|
116
117
|
def map_open_eyes_config_to_commands_config(config)
|
117
118
|
[
|
118
|
-
:
|
119
|
+
:eyesServerUrl, :apiKey, :proxy, :connectionTimeout, :removeSession, :agentId, :appName, :testName, :displayName,
|
119
120
|
:userTestId, :sessionType, :properties, :batch, :keepBatchOpen, :environmentName, :environment, :branchName,
|
120
121
|
:parentBranchName, :baselineEnvName, :baselineBranchName, :compareWithParentBranch, :ignoreBaseline,
|
121
122
|
:ignoreGitBranching, :saveDiffs, :abortIdleTestTimeout
|
@@ -130,7 +131,7 @@ module Applitools::Connectivity
|
|
130
131
|
config_mapping(config, commands_config[:check], k)
|
131
132
|
end
|
132
133
|
|
133
|
-
commands_config[:check][:
|
134
|
+
commands_config[:check][:environments] = config.delete(:browsersInfo) unless config[:browsersInfo].nil?
|
134
135
|
|
135
136
|
unless config[:defaultMatchSettings].nil?
|
136
137
|
if config[:defaultMatchSettings][:accessibilitySettings]
|
@@ -326,6 +327,7 @@ module Applitools::Connectivity
|
|
326
327
|
batch_ids = [close_batch_settings] if close_batch_settings.is_a?(String)
|
327
328
|
batch_ids = close_batch_settings if close_batch_settings.is_a?(Array)
|
328
329
|
optional = [:serverUrl, :apiKey, :proxy].map {|k| [k, @open_config[k]] }.to_h
|
330
|
+
optional[:eyesServerUrl] = optional.delete(:serverUrl) if optional[:serverUrl] # v4
|
329
331
|
close_batch_settings = { settings: ({ batchIds: batch_ids }.merge(optional).compact) }
|
330
332
|
end
|
331
333
|
command_with_result(CORE_CLOSE_BATCHES, close_batch_settings)
|
@@ -342,11 +344,11 @@ module Applitools::Connectivity
|
|
342
344
|
private
|
343
345
|
|
344
346
|
|
345
|
-
def prepare_socket
|
346
|
-
@universal_server_control = Applitools::
|
347
|
+
def prepare_socket(eyes=nil)
|
348
|
+
@universal_server_control = Applitools::EyesUniversal::UniversalServerControl.instance
|
347
349
|
@web_socket = @universal_server_control.new_server_socket_connection
|
348
350
|
socket_handshake
|
349
|
-
session_init
|
351
|
+
session_init(eyes)
|
350
352
|
# connect_and_configure_socket(socket_uri)
|
351
353
|
end
|
352
354
|
|
@@ -385,12 +387,26 @@ module Applitools::Connectivity
|
|
385
387
|
@handshake_version = handshake.version if handshake.finished? && handshake.valid?
|
386
388
|
end
|
387
389
|
|
388
|
-
def session_init
|
390
|
+
def session_init(eyes=nil)
|
391
|
+
sdk_name = Applitools::EyesBase.environment_sdk[:name]
|
392
|
+
sdk_version = Applitools::EyesBase.environment_sdk[:currentVersion]
|
393
|
+
if eyes
|
394
|
+
if eyes.respond_to?(:environment_sdk)
|
395
|
+
sdk_name = eyes.environment_sdk[:name]
|
396
|
+
sdk_version = eyes.environment_sdk[:currentVersion]
|
397
|
+
elsif eyes.class.respond_to?(:environment_sdk)
|
398
|
+
sdk_name = eyes.class.environment_sdk[:name]
|
399
|
+
sdk_version = eyes.class.environment_sdk[:currentVersion]
|
400
|
+
end
|
401
|
+
end
|
389
402
|
init_agent_id = "eyes.ruby-sdk/#{Applitools::VERSION}".freeze
|
390
403
|
make_core_payload = {
|
391
404
|
agentId: init_agent_id,
|
392
405
|
cwd: Dir.pwd,
|
393
|
-
spec: :webdriver
|
406
|
+
spec: :webdriver,
|
407
|
+
environment: {
|
408
|
+
sdk: {lang: :ruby, name: sdk_name, currentVersion: sdk_version}
|
409
|
+
}
|
394
410
|
}
|
395
411
|
# interface MakeCorePayload {
|
396
412
|
# agentId: string
|
@@ -20,7 +20,7 @@ module Applitools
|
|
20
20
|
:debugScreenshots,
|
21
21
|
:agentId,
|
22
22
|
:apiKey,
|
23
|
-
:
|
23
|
+
:eyesServerUrl,
|
24
24
|
:proxy,
|
25
25
|
:isDisabled,
|
26
26
|
:connectionTimeout,
|
@@ -133,7 +133,7 @@ module Applitools
|
|
133
133
|
# 23 + 3 + 2 + 11 = 39
|
134
134
|
FROM_ORIGINAL_EYES = [:api_key, :app_name, :batch, :browsers_info, :concurrent_sessions, :debug_screenshots,
|
135
135
|
:force_full_page_screenshot, :hide_caret, :hide_scrollbars, :host_app, :host_os, :match_timeout, :proxy,
|
136
|
-
:save_failed_tests, :save_new_tests, :scale_ratio, :send_dom, :
|
136
|
+
:save_failed_tests, :save_new_tests, :scale_ratio, :send_dom, :stitch_mode, :test_name,
|
137
137
|
:viewport_size, :visual_grid_options, :wait_before_screenshots, :wait_before_capture] + [
|
138
138
|
:disabled?, # disabled? => is_disabled
|
139
139
|
:stitching_overlap, # SeleniumEyes.stitching_overlap => stitch_overlap
|
@@ -192,6 +192,7 @@ module Applitools
|
|
192
192
|
# self.display_name = original_eyes.app_name
|
193
193
|
self.dont_close_batches = original_eyes.dont_close_batches unless original_eyes.dont_close_batches.nil?
|
194
194
|
prepare_for_json!
|
195
|
+
self.eyes_server_url = original_eyes.server_url unless original_eyes.server_url.nil? # v4api_change
|
195
196
|
end
|
196
197
|
|
197
198
|
def copy_from(what, from)
|
@@ -208,20 +209,20 @@ module Applitools
|
|
208
209
|
self.default_match_settings = default_match_settings.to_hash if default_match_settings.is_a?(Applitools::ImageMatchSettings)
|
209
210
|
self.proxy = proxy.to_hash if proxy.is_a?(Applitools::Connectivity::Proxy)
|
210
211
|
self.viewport_size = viewport_size.to_h if viewport_size.is_a?(Applitools::RectangleSize)
|
211
|
-
|
212
|
+
api_change
|
212
213
|
# require 'pry'
|
213
214
|
# binding.pry
|
214
215
|
end
|
215
216
|
|
216
|
-
def
|
217
|
+
def api_change
|
217
218
|
# self.updateBaselineIfDifferent = saveFailedTests unless saveFailedTests.nil?
|
218
219
|
# self.updateBaselineIfNew = saveNewTests unless saveNewTests.nil?
|
219
220
|
environment = {}
|
220
|
-
environment[:
|
221
|
-
environment[:
|
222
|
-
environment[:
|
223
|
-
environment[:
|
224
|
-
environment[:
|
221
|
+
environment[:hostingApp] = hostApp unless hostApp.nil?
|
222
|
+
environment[:displayHostingApp] = hostAppInfo unless hostAppInfo.nil?
|
223
|
+
environment[:os] = hostOS unless hostOS.nil?
|
224
|
+
environment[:displayOs] = hostOSInfo unless hostOSInfo.nil?
|
225
|
+
environment[:deviceName] = deviceInfo unless deviceInfo.nil?
|
225
226
|
unless viewportSize.nil?
|
226
227
|
environment[:viewportSize] = viewportSize
|
227
228
|
self.viewportSize = nil
|
data/lib/eyes_core.rb
CHANGED
@@ -4,7 +4,6 @@ require 'forwardable'
|
|
4
4
|
require 'delegate'
|
5
5
|
require 'time'
|
6
6
|
require_relative 'require_utils'
|
7
|
-
require_relative 'eyes_consts'
|
8
7
|
|
9
8
|
module Applitools
|
10
9
|
extend Applitools::RequireUtils
|
@@ -64,8 +63,7 @@ end
|
|
64
63
|
|
65
64
|
require_relative 'applitools/method_tracer'
|
66
65
|
require_relative 'applitools/extensions'
|
67
|
-
require_relative 'applitools/version'
|
68
|
-
# require_relative 'applitools/chunky_png_patch'
|
66
|
+
require_relative 'applitools/eyes_core/version'
|
69
67
|
|
70
68
|
Applitools.require_dir 'utils'
|
71
69
|
Applitools.require_dir 'core'
|
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
|
+
version: 6.0.0
|
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-
|
11
|
+
date: 2023-12-13 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.
|
117
|
+
version: 4.3.0
|
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.
|
124
|
+
version: 4.3.0
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: bundler
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
@@ -182,16 +182,16 @@ dependencies:
|
|
182
182
|
name: webdrivers
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
|
-
- - "
|
185
|
+
- - "~>"
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version: '0'
|
187
|
+
version: '5.0'
|
188
188
|
type: :development
|
189
189
|
prerelease: false
|
190
190
|
version_requirements: !ruby/object:Gem::Requirement
|
191
191
|
requirements:
|
192
|
-
- - "
|
192
|
+
- - "~>"
|
193
193
|
- !ruby/object:Gem::Version
|
194
|
-
version: '0'
|
194
|
+
version: '5.0'
|
195
195
|
- !ruby/object:Gem::Dependency
|
196
196
|
name: pry
|
197
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -281,50 +281,12 @@ description: Don't use it directly, take a look at eyes_selenium, eyes_images or
|
|
281
281
|
email:
|
282
282
|
- team@applitools.com
|
283
283
|
executables: []
|
284
|
-
extensions:
|
285
|
-
- ext/eyes_core/extconf.rb
|
284
|
+
extensions: []
|
286
285
|
extra_rdoc_files: []
|
287
286
|
files:
|
288
|
-
-
|
289
|
-
-
|
290
|
-
-
|
291
|
-
- lib/applitools/appium/android_region_provider.rb
|
292
|
-
- lib/applitools/appium/android_screenshot.rb
|
293
|
-
- lib/applitools/appium/driver.rb
|
294
|
-
- lib/applitools/appium/eyes.rb
|
295
|
-
- lib/applitools/appium/ios_region_provider.rb
|
296
|
-
- lib/applitools/appium/ios_screenshot.rb
|
297
|
-
- lib/applitools/appium/region_provider.rb
|
298
|
-
- lib/applitools/appium/screenshot.rb
|
299
|
-
- lib/applitools/appium/target.rb
|
300
|
-
- lib/applitools/appium/utils.rb
|
301
|
-
- lib/applitools/calabash/calabash_element.rb
|
302
|
-
- lib/applitools/calabash/calabash_screenshot_provider.rb
|
303
|
-
- lib/applitools/calabash/environment_detector.rb
|
304
|
-
- lib/applitools/calabash/eyes.rb
|
305
|
-
- lib/applitools/calabash/eyes_calabash_android_screenshot.rb
|
306
|
-
- lib/applitools/calabash/eyes_calabash_ios_screenshot.rb
|
307
|
-
- lib/applitools/calabash/eyes_calabash_screenshot.rb
|
308
|
-
- lib/applitools/calabash/eyes_hooks.rb
|
309
|
-
- lib/applitools/calabash/eyes_settings.rb
|
310
|
-
- lib/applitools/calabash/full_page_capture_algorithm.rb
|
311
|
-
- lib/applitools/calabash/full_page_capture_algorithm/android_scroll_view.rb
|
312
|
-
- lib/applitools/calabash/full_page_capture_algorithm/base.rb
|
313
|
-
- lib/applitools/calabash/full_page_capture_algorithm/ios_ui_table_view.rb
|
314
|
-
- lib/applitools/calabash/os_versions.rb
|
315
|
-
- lib/applitools/calabash/rspec_matchers.rb
|
316
|
-
- lib/applitools/calabash/steps/android_eyes_session.rb
|
317
|
-
- lib/applitools/calabash/steps/android_matchers.rb
|
318
|
-
- lib/applitools/calabash/steps/eyes_session.rb
|
319
|
-
- lib/applitools/calabash/steps/eyes_settings.rb
|
320
|
-
- lib/applitools/calabash/steps/ios_eyes_session.rb
|
321
|
-
- lib/applitools/calabash/steps/ios_matchers.rb
|
322
|
-
- lib/applitools/calabash/steps/matchers.rb
|
323
|
-
- lib/applitools/calabash/target.rb
|
324
|
-
- lib/applitools/calabash/utils.rb
|
325
|
-
- lib/applitools/calabash_steps.rb
|
326
|
-
- lib/applitools/capybara/capybara_settings.rb
|
327
|
-
- lib/applitools/capybara/driver.rb
|
287
|
+
- CHANGELOG.md
|
288
|
+
- Rakefile
|
289
|
+
- eyes_core.gemspec
|
328
290
|
- lib/applitools/connectivity/proxy.rb
|
329
291
|
- lib/applitools/connectivity/server_connector.rb
|
330
292
|
- lib/applitools/connectivity/user_agent_middleware.rb
|
@@ -382,11 +344,10 @@ files:
|
|
382
344
|
- lib/applitools/core/universal_eyes_open.rb
|
383
345
|
- lib/applitools/core/universal_new_api.rb
|
384
346
|
- lib/applitools/extensions.rb
|
347
|
+
- lib/applitools/eyes_core/version.rb
|
385
348
|
- lib/applitools/eyes_logger.rb
|
386
349
|
- lib/applitools/method_tracer.rb
|
387
|
-
- lib/applitools/rspec/target_matcher.rb
|
388
350
|
- lib/applitools/sauce.rb
|
389
|
-
- lib/applitools/universal_sdk/executable_finder.rb
|
390
351
|
- lib/applitools/universal_sdk/universal_check_settings.rb
|
391
352
|
- lib/applitools/universal_sdk/universal_client.rb
|
392
353
|
- lib/applitools/universal_sdk/universal_client_socket.rb
|
@@ -395,15 +356,11 @@ files:
|
|
395
356
|
- lib/applitools/universal_sdk/universal_eyes_manager.rb
|
396
357
|
- lib/applitools/universal_sdk/universal_eyes_manager_config.rb
|
397
358
|
- lib/applitools/universal_sdk/universal_server.rb
|
398
|
-
- lib/applitools/universal_sdk/universal_server_control.rb
|
399
359
|
- lib/applitools/utils/eyes_selenium_utils.rb
|
400
360
|
- lib/applitools/utils/image_delta_compressor.rb
|
401
361
|
- lib/applitools/utils/image_utils.rb
|
402
362
|
- lib/applitools/utils/utils.rb
|
403
|
-
- lib/applitools/version.rb
|
404
|
-
- lib/eyes_consts.rb
|
405
363
|
- lib/eyes_core.rb
|
406
|
-
- lib/eyes_rspec.rb
|
407
364
|
- lib/require_utils.rb
|
408
365
|
homepage: https://www.applitools.com
|
409
366
|
licenses:
|
@@ -414,7 +371,6 @@ post_install_message:
|
|
414
371
|
rdoc_options: []
|
415
372
|
require_paths:
|
416
373
|
- lib
|
417
|
-
- ext
|
418
374
|
required_ruby_version: !ruby/object:Gem::Requirement
|
419
375
|
requirements:
|
420
376
|
- - ">="
|
@@ -426,7 +382,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
426
382
|
- !ruby/object:Gem::Version
|
427
383
|
version: '0'
|
428
384
|
requirements: []
|
429
|
-
rubygems_version: 3.3.
|
385
|
+
rubygems_version: 3.0.3.1
|
430
386
|
signing_key:
|
431
387
|
specification_version: 4
|
432
388
|
summary: Core of the Applitools Ruby SDK
|