Class: Applitools::MatchSingleCheckData

Inherits:
MatchWindowData show all
Defined in:
lib/applitools/core/match_single_check_data.rb

Instance Attribute Summary

Attributes inherited from MatchWindowData

#app_output, #ignore_mismatch, #options, #tag, #user_inputs

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from MatchWindowData

convert_coordinates, #convert_ignored_regions_coordinates, #ignored_regions=, #initialize, #match_level, #match_level=, #read_target, #screenshot, #to_hash, #to_s, #trim=, valid_input, valid_region

Constructor Details

This class inherits a constructor from Applitools::MatchWindowData

Class Method Details

.default_dataObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/applitools/core/match_single_check_data.rb', line 5

def default_data
  {
    'startInfo' => {
      'agentId' => nil,
      'appIdOrName' => nil,
      'verId' => nil,
      'scenarioIdOrName' => nil,
      'batchInfo' => {},
      'envName' => nil,
      'environment' => {},
      'defaultMatchSettings' => nil,
      'branchName' => nil,
      'parentBranchName' => nil,
      'properties' => nil
    },
    'IgnoreMismatch' => false,
    'MismatchWait' => 0,
    'Options' => {
      'Name' => nil,
      'UserInputs' => [],
      'ImageMatchSettings' => {
        'MatchLevel' => 'None',
        'SplitTopHeight' => 0,
        'SplitBottomHeight' => 0,
        'IgnoreCaret' => false,
        'Ignore' => [],
        'Exact' => {
          'MinDiffIntensity' => 0,
          'MinDiffWidth' => 0,
          'MinDiffHeight' => 0,
          'MatchThreshold' => 0
        }
      },
      'IgnoreExpectedOutputSettings' => false,
      'ForceMatch' => false,
      'ForceMismatch' => false,
      'IgnoreMatch' => false,
      'IgnoreMismatch' => false,
      'Trim' => {
        'Enabled' => false,
        'ForegroundIntensity' => 0,
        'MinEdgeLength' => 0
      }
    },
    'Id' => nil,
    'UserInputs' => [],
    'AppOutput' => {
      'Screenshot64' => nil,
      'ScreenshotUrl' => nil,
      'Title' => nil,
      'IsPrimary' => false,
      'Elapsed' => 0
    },
    'Tag' => nil,
    'updateBaselineIfDifferent' => false,
    'updateBaselineIfNew' => false,
    'removeSessionIfMatching' => false
  }
end

Instance Method Details

#remove_session_if_matching=(value) ⇒ Object



90
91
92
# File 'lib/applitools/core/match_single_check_data.rb', line 90

def remove_session_if_matching=(value)
  current_data['removeSessionIfMatching'] = value ? true : false
end

#start_info=(value) ⇒ Object



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/applitools/core/match_single_check_data.rb', line 66

def start_info=(value)
  Applitools::ArgumentGuard.is_a? value, 'value', Applitools::SessionStartInfo
  hash_value = value.to_hash
  current_data['startInfo']['batchInfo'] = hash_value[:batch_info]
  current_data['startInfo']['environment'] = hash_value[:environment]
  current_data['startInfo']['agentId'] = hash_value[:agent_id]
  current_data['startInfo']['appIdOrName'] = hash_value[:app_id_or_name]
  current_data['startInfo']['verId'] = hash_value[:ver_id]
  current_data['startInfo']['scenarioIdOrName'] = hash_value[:scenario_id_or_name]
  current_data['startInfo']['envName'] = hash_value[:env_name]
  current_data['startInfo']['defaultMatchSettings'] = hash_value[:default_match_settings]
  current_data['startInfo']['branchName'] = hash_value[:branch_name]
  current_data['startInfo']['parentBranchName'] = hash_value[:parent_branch_name]
  current_data['startInfo']['properties'] = hash_value[:properties]
end

#update_baseline_if_different=(value) ⇒ Object



82
83
84
# File 'lib/applitools/core/match_single_check_data.rb', line 82

def update_baseline_if_different=(value)
  current_data['updateBaselineIfDifferent'] = value ? true : false
end

#update_baseline_if_new=(value) ⇒ Object



86
87
88
# File 'lib/applitools/core/match_single_check_data.rb', line 86

def update_baseline_if_new=(value)
  current_data['updateBaselineIfNew'] = value ? true : false
end