eyes_core 3.12.0 → 3.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/applitools/core/eyes_base.rb +18 -10
- data/lib/applitools/core/fixed_cut_provider.rb +1 -1
- data/lib/applitools/core/test_results.rb +17 -4
- data/lib/applitools/version.rb +1 -1
- data/lib/eyes_core.rb +1 -0
- 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: 3cdf33bdcd17edc90839aa972220da8f8a7b1703
|
4
|
+
data.tar.gz: f90b947ead660f07029641479835bfb7da5828a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06f4fe2a9ba78498e0fc90d3fa360cb9f2bdef28c222926e71e4d05f5ea04a90fbb777d2d11c7d56ef5c076bb85a0745c167f32d5e6b85630447d001cbc35afe
|
7
|
+
data.tar.gz: ec9ba5bfac4a9577def13baee3bbb4191c0490e28da79c63b260a2f0401ff1643ebe08bae58732ad72642479f24d0ade4e50687a393b52aae1845f9a2bbe58dc
|
@@ -419,19 +419,27 @@ module Applitools
|
|
419
419
|
|
420
420
|
logger.info results.to_s(verbose_results)
|
421
421
|
|
422
|
-
if results.
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
422
|
+
if results.unresolved?
|
423
|
+
if results.new?
|
424
|
+
logger.error "--- New test ended. see details at #{session_results_url}"
|
425
|
+
error_message = "New test '#{session_start_info.scenario_id_or_name}' " \
|
426
|
+
"of '#{session_start_info.app_id_or_name}' " \
|
427
|
+
"Please approve the baseline at #{session_results_url} "
|
428
|
+
raise Applitools::NewTestError.new error_message, results if throw_exception
|
429
|
+
else
|
430
|
+
logger.error "--- Differences are found. see details at #{session_results_url}"
|
431
|
+
error_message = "Test '#{session_start_info.scenario_id_or_name}' " \
|
432
|
+
"of '#{session_start_info.app_id_or_name}' " \
|
433
|
+
"detected differences! See details at #{session_results_url}"
|
434
|
+
raise Applitools::DiffsFoundError.new error_message, results if throw_exception
|
435
|
+
end
|
427
436
|
return results
|
428
437
|
end
|
429
438
|
|
430
|
-
if results.
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
"#{instructions}"
|
439
|
+
if results.failed?
|
440
|
+
logger.error "--- Failed test ended. see details at #{session_results_url}"
|
441
|
+
error_message = "Test '#{session_start_info.scenario_id_or_name}' of '#{session_start_info.app_id_or_name}' " \
|
442
|
+
"is failed! See details at #{session_results_url}"
|
435
443
|
raise Applitools::TestFailedError.new error_message, results if throw_exception
|
436
444
|
return results
|
437
445
|
end
|
@@ -4,9 +4,9 @@ module Applitools
|
|
4
4
|
# Creates a FixedCutProvider instance
|
5
5
|
# @param [Applitools::Region] crop_region Outside space of the region will be cropped
|
6
6
|
# @param [Integer] header A top field to crop
|
7
|
+
# @param [Integer] footer A bottom field to crop
|
7
8
|
# @param [Integer] left A left field to crop
|
8
9
|
# @param [Integer] right A right field to crop
|
9
|
-
# @param [Integer] footer A bottom field to crop
|
10
10
|
# @example Creates cut provider by a Region
|
11
11
|
# Applitools::FixedCutProvider.new Applitools::Region.new(20,20, 300, 300)
|
12
12
|
# @example Creates cut provider by a set of fields
|
@@ -3,30 +3,43 @@ require 'yaml'
|
|
3
3
|
module Applitools
|
4
4
|
class TestResults
|
5
5
|
attr_accessor :is_new, :url, :screenshot
|
6
|
-
attr_reader :steps, :matches, :mismatches, :missing, :original_results
|
6
|
+
attr_reader :status, :steps, :matches, :mismatches, :missing, :original_results
|
7
7
|
|
8
8
|
def initialize(results = {})
|
9
|
+
@original_results = results
|
9
10
|
@steps = results.fetch('steps', 0)
|
10
11
|
@matches = results.fetch('matches', 0)
|
11
12
|
@mismatches = results.fetch('mismatches', 0)
|
12
13
|
@missing = results.fetch('missing', 0)
|
14
|
+
@status = results.fetch('status', 0)
|
13
15
|
@is_new = nil
|
14
16
|
@url = nil
|
15
|
-
@original_results = results
|
16
17
|
end
|
17
18
|
|
18
19
|
def passed?
|
19
|
-
|
20
|
+
status == 'Passed'
|
20
21
|
end
|
21
22
|
|
22
23
|
def failed?
|
23
|
-
|
24
|
+
status == 'Failed'
|
25
|
+
end
|
26
|
+
|
27
|
+
def unresolved?
|
28
|
+
status == 'Unresolved'
|
24
29
|
end
|
25
30
|
|
26
31
|
def new?
|
27
32
|
original_results['isNew']
|
28
33
|
end
|
29
34
|
|
35
|
+
def different?
|
36
|
+
original_results['isDifferent']
|
37
|
+
end
|
38
|
+
|
39
|
+
def aborted?
|
40
|
+
original_results['isAborted']
|
41
|
+
end
|
42
|
+
|
30
43
|
def ==(other)
|
31
44
|
if other.is_a? self.class
|
32
45
|
result = true
|
data/lib/applitools/version.rb
CHANGED
data/lib/eyes_core.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.
|
4
|
+
version: 3.13.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: 2017-
|
11
|
+
date: 2017-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oily_png
|