eyes_core 3.14.2 → 3.14.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/applitools/calabash/eyes.rb +1 -1
- data/lib/applitools/calabash/eyes_calabash_android_screenshot.rb +2 -1
- data/lib/applitools/calabash/eyes_hooks.rb +1 -1
- data/lib/applitools/calabash/rspec_matchers.rb +3 -2
- data/lib/applitools/core/eyes_base.rb +19 -5
- data/lib/applitools/core/match_window_data.rb +1 -1
- data/lib/applitools/core/rectangle_size.rb +1 -1
- data/lib/applitools/core/session_start_info.rb +3 -1
- data/lib/applitools/utils/eyes_selenium_utils.rb +1 -1
- data/lib/applitools/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d9bf7c4a1a591be9f9e5a4fa1f97b5f6d89fdf1
|
4
|
+
data.tar.gz: b46c22f0b9a08fe8e7f1e768306bb787a6bf026c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 117dc8fdfc6a5dad6576c2d120ffc6d8fcde6c290eab3c5452e606d437fbd74900426148a16940b4897d0be9c90346ab42718708a976a33da24fb7fd89a07b77
|
7
|
+
data.tar.gz: 05340e98ffa98f3fcc433329c4bef32acafadd12c6cb39c0bf429a2cb37f2a1caf9c169047d71bbf32ee568712dd5a244c061e7c35792613fe5fe03fd9292592
|
@@ -8,7 +8,7 @@ module Applitools
|
|
8
8
|
def initialize(server_url = Applitools::Connectivity::ServerConnector::DEFAULT_SERVER_URL)
|
9
9
|
super
|
10
10
|
self.base_agent_id = "eyes.calabash.ruby/#{Applitools::VERSION}".freeze
|
11
|
-
self.debug_screenshot =
|
11
|
+
self.debug_screenshot = false
|
12
12
|
self.debug_screenshot_provider = Applitools::DebugScreenshotProvider.new
|
13
13
|
.tag_access { tag_for_debug }
|
14
14
|
.debug_flag_access { debug_screenshot }
|
@@ -19,7 +19,7 @@ if respond_to?(:After)
|
|
19
19
|
After('@eyes') do |_scenario|
|
20
20
|
eyes = Applitools::Calabash::EyesSettings.instance.eyes
|
21
21
|
Applitools::Calabash::EyesSettings.instance.eyes.remove_context if eyes && eyes.open?
|
22
|
-
step %(terminate eyes session)
|
22
|
+
step %(terminate eyes session) if eyes && eyes.running_session?
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
@@ -2,8 +2,9 @@ require 'rspec/expectations'
|
|
2
2
|
|
3
3
|
RSpec::Matchers.define :match_baseline do |expected|
|
4
4
|
match do |actual|
|
5
|
-
|
6
|
-
result.
|
5
|
+
eyes = Applitools::Calabash::EyesSettings.instance.eyes
|
6
|
+
result = eyes.check(expected, actual)
|
7
|
+
eyes.new_session? || result.as_expected?
|
7
8
|
end
|
8
9
|
|
9
10
|
failure_message do |_actual|
|
@@ -35,7 +35,8 @@ module Applitools
|
|
35
35
|
attr_accessor :app_name, :baseline_name, :branch_name, :parent_branch_name, :batch, :agent_id, :full_agent_id,
|
36
36
|
:match_timeout, :save_new_tests, :save_failed_tests, :failure_reports, :default_match_settings, :cut_provider,
|
37
37
|
:scale_ratio, :host_os, :host_app, :base_line_name, :position_provider, :viewport_size, :verbose_results,
|
38
|
-
:inferred_environment, :remove_session_if_matching, :server_scale, :server_remainder, :match_level, :exact
|
38
|
+
:inferred_environment, :remove_session_if_matching, :server_scale, :server_remainder, :match_level, :exact,
|
39
|
+
:compare_with_parent_branch
|
39
40
|
|
40
41
|
abstract_attr_accessor :base_agent_id
|
41
42
|
abstract_method :capture_screenshot, true
|
@@ -74,6 +75,7 @@ module Applitools
|
|
74
75
|
self.match_level = Applitools::MATCH_LEVEL[:strict]
|
75
76
|
self.server_scale = 0
|
76
77
|
self.server_remainder = 0
|
78
|
+
self.compare_with_parent_branch = false
|
77
79
|
end
|
78
80
|
|
79
81
|
def match_level=(value)
|
@@ -155,6 +157,14 @@ module Applitools
|
|
155
157
|
@open
|
156
158
|
end
|
157
159
|
|
160
|
+
def running_session?
|
161
|
+
running_session.nil? ? false : true
|
162
|
+
end
|
163
|
+
|
164
|
+
def new_session?
|
165
|
+
running_session && running_session.new_session?
|
166
|
+
end
|
167
|
+
|
158
168
|
def app_name
|
159
169
|
!current_app_name.nil? && !current_app_name.empty? ? current_app_name : @app_name
|
160
170
|
end
|
@@ -217,7 +227,8 @@ module Applitools
|
|
217
227
|
logger.info "openBase(app_name: #{options[:app_name]}, test_name: #{options[:test_name]}," \
|
218
228
|
" viewport_size: #{options[:viewport_size]})"
|
219
229
|
|
220
|
-
raise Applitools::EyesError.new 'API key is missing! Please set it using api_key=' if
|
230
|
+
raise Applitools::EyesError.new 'API key is missing! Please set it using api_key=' if
|
231
|
+
api_key.nil? || (api_key && api_key.empty?)
|
221
232
|
|
222
233
|
self.viewport_size = options[:viewport_size]
|
223
234
|
self.session_type = options[:session_type]
|
@@ -451,6 +462,10 @@ module Applitools
|
|
451
462
|
self.current_app_name = nil
|
452
463
|
end
|
453
464
|
|
465
|
+
def compare_with_parent_branch=(value)
|
466
|
+
@compare_with_parent_branch = value ? true : false
|
467
|
+
end
|
468
|
+
|
454
469
|
private
|
455
470
|
|
456
471
|
attr_accessor :running_session, :last_screenshot, :current_app_name, :test_name, :session_type,
|
@@ -570,15 +585,14 @@ module Applitools
|
|
570
585
|
self.viewport_size = get_viewport_size
|
571
586
|
end
|
572
587
|
|
573
|
-
logger.info "Batch is #{batch}"
|
574
|
-
test_batch = batch
|
588
|
+
logger.info "Batch is #{@batch}" if @batch
|
575
589
|
|
576
590
|
app_env = app_environment
|
577
591
|
|
578
592
|
logger.info "Application environment is #{app_env}"
|
579
593
|
|
580
594
|
self.session_start_info = SessionStartInfo.new agent_id: base_agent_id, app_id_or_name: app_name,
|
581
|
-
scenario_id_or_name: test_name, batch_info:
|
595
|
+
scenario_id_or_name: test_name, batch_info: @batch,
|
582
596
|
env_name: baseline_name, environment: app_env,
|
583
597
|
default_match_settings: default_match_settings,
|
584
598
|
branch_name: branch_name, parent_branch_name: parent_branch_name,
|
@@ -14,6 +14,7 @@ module Applitools
|
|
14
14
|
@branch_name = options[:branch_name]
|
15
15
|
@parent_branch_name = options[:parent_branch_name]
|
16
16
|
@properties = options[:properties]
|
17
|
+
@compare_with_parent_branch = options[:compare_with_parent_branch]
|
17
18
|
end
|
18
19
|
|
19
20
|
def to_hash
|
@@ -22,12 +23,13 @@ module Applitools
|
|
22
23
|
app_id_or_name: @app_id_or_name,
|
23
24
|
ver_id: @ver_id,
|
24
25
|
scenario_id_or_name: @scenario_id_or_name,
|
25
|
-
batch_info: @batch_info.to_hash,
|
26
|
+
batch_info: @batch_info && @batch_info.to_hash,
|
26
27
|
env_name: @env_name,
|
27
28
|
environment: @environment.to_hash,
|
28
29
|
default_match_settings: @default_match_settings,
|
29
30
|
branch_name: @branch_name,
|
30
31
|
parent_branch_name: @parent_branch_name,
|
32
|
+
compare_with_parent_branch: @compare_with_parent_branch,
|
31
33
|
properties: @properties
|
32
34
|
}
|
33
35
|
end
|
@@ -127,8 +127,8 @@ module Applitools::Utils
|
|
127
127
|
|
128
128
|
# true if test is running on mobile device
|
129
129
|
def mobile_device?
|
130
|
+
return nil unless defined?(Appium::Driver)
|
130
131
|
return $driver if $driver && $driver.is_a?(Appium::Driver)
|
131
|
-
nil
|
132
132
|
end
|
133
133
|
|
134
134
|
# true if test is running on Android device
|
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.14.
|
4
|
+
version: 3.14.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:
|
11
|
+
date: 2018-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oily_png
|
@@ -302,7 +302,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
302
302
|
version: '0'
|
303
303
|
requirements: []
|
304
304
|
rubyforge_project:
|
305
|
-
rubygems_version: 2.6.
|
305
|
+
rubygems_version: 2.6.14
|
306
306
|
signing_key:
|
307
307
|
specification_version: 4
|
308
308
|
summary: Applitools Ruby SDK
|