Class: Applitools::TestResults

Inherits:
Object
  • Object
show all
Defined in:
lib/eyes_selenium/eyes/test_results.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(steps = 0, matches = 0, mismatches = 0, missing = 0, exact_matches = 0, strict_matches = 0, content_matches = 0, layout_matches = 0, none_matches = 0) ⇒ TestResults

Returns a new instance of TestResults.



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/eyes_selenium/eyes/test_results.rb', line 5

def initialize(steps=0, matches=0, mismatches=0, missing=0,
               exact_matches=0, strict_matches=0, content_matches=0, 
               layout_matches=0, none_matches=0)
  @steps = steps
  @matches = matches
  @mismatches =  mismatches
  @missing =  missing
  @exact_matches =  exact_matches
  @strict_matches = strict_matches
  @content_matches =  content_matches
  @layout_matches =  layout_matches
  @none_matches =  none_matches
  @is_new = nil
  @url = nil
end

Instance Attribute Details

#content_matchesObject (readonly)

Returns the value of attribute content_matches.



3
4
5
# File 'lib/eyes_selenium/eyes/test_results.rb', line 3

def content_matches
  @content_matches
end

#exact_matchesObject (readonly)

Returns the value of attribute exact_matches.



3
4
5
# File 'lib/eyes_selenium/eyes/test_results.rb', line 3

def exact_matches
  @exact_matches
end

#is_newObject

Returns the value of attribute is_new.



2
3
4
# File 'lib/eyes_selenium/eyes/test_results.rb', line 2

def is_new
  @is_new
end

#is_passedObject (readonly)

Returns the value of attribute is_passed.



3
4
5
# File 'lib/eyes_selenium/eyes/test_results.rb', line 3

def is_passed
  @is_passed
end

#layout_matchesObject (readonly)

Returns the value of attribute layout_matches.



3
4
5
# File 'lib/eyes_selenium/eyes/test_results.rb', line 3

def layout_matches
  @layout_matches
end

#matchesObject (readonly)

Returns the value of attribute matches.



3
4
5
# File 'lib/eyes_selenium/eyes/test_results.rb', line 3

def matches
  @matches
end

#mismatchesObject (readonly)

Returns the value of attribute mismatches.



3
4
5
# File 'lib/eyes_selenium/eyes/test_results.rb', line 3

def mismatches
  @mismatches
end

#missingObject (readonly)

Returns the value of attribute missing.



3
4
5
# File 'lib/eyes_selenium/eyes/test_results.rb', line 3

def missing
  @missing
end

#none_matchesObject (readonly)

Returns the value of attribute none_matches.



3
4
5
# File 'lib/eyes_selenium/eyes/test_results.rb', line 3

def none_matches
  @none_matches
end

#stepsObject (readonly)

Returns the value of attribute steps.



3
4
5
# File 'lib/eyes_selenium/eyes/test_results.rb', line 3

def steps
  @steps
end

#strict_matchesObject (readonly)

Returns the value of attribute strict_matches.



3
4
5
# File 'lib/eyes_selenium/eyes/test_results.rb', line 3

def strict_matches
  @strict_matches
end

#urlObject

Returns the value of attribute url.



2
3
4
# File 'lib/eyes_selenium/eyes/test_results.rb', line 2

def url
  @url
end

Instance Method Details

#to_sObject



25
26
27
28
29
30
31
# File 'lib/eyes_selenium/eyes/test_results.rb', line 25

def to_s
  is_new_str = ""
  unless is_new.nil?
    is_new_str = is_new ? "New test" : "Existing test"
  end
  "#{is_new_str} [ steps: #{steps}, matches: #{matches}, mismatches: #{mismatches}, missing: #{missing} ], URL: #{url}"
end