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, #default_image_match_settings, #ignore_mismatch, #options, #tag, #user_inputs

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from MatchWindowData

#accessibility_regions=, #accessibility_validation, #accessibility_validation=, #content_regions=, #convert_accessibility_regions_coordinates, #convert_content_regions_coordinates, convert_coordinates, #convert_floating_regions_coordinates, #convert_ignored_regions_coordinates, #convert_layout_regions_coordinates, #convert_regions_coordinates, #convert_strict_regions_coordinates, #enable_patterns, #enable_patterns=, #exact, #exact=, #floating_regions=, #ignore_caret=, #ignore_displacements, #ignore_displacements=, #ignored_regions=, #initialize, #layout_regions=, #match_level, #match_level=, #obtain_accessibility_regions_coordinates, #obtain_regions_coordinates, #read_target, #remainder, #remainder=, #render_id, #render_id=, #replace_last, #replace_last=, #scale, #scale=, #screenshot, #strict_regions=, #to_hash, #to_s, #trim=, #use_dom, #use_dom=, valid_input, valid_region, #variation_group_id=

Constructor Details

This class inherits a constructor from Applitools::MatchWindowData

Class Method Details

.default_dataObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/applitools/core/match_single_check_data.rb', line 7

def default_data
  super.merge!(
    'startInfo' => {
      'agentId' => nil,
      'appIdOrName' => nil,
      'verId' => nil,
      'scenarioIdOrName' => nil,
      'batchInfo' => {},
      'envName' => nil,
      'environment' => {},
      'defaultMatchSettings' => nil,
      'branchName' => nil,
      'parentBranchName' => nil,
      'properties' => nil
    }
  )
end

Instance Method Details

#agent_idObject



54
55
56
# File 'lib/applitools/core/match_single_check_data.rb', line 54

def agent_id
  current_data['startInfo']['agentId']
end

#remove_session_if_matching=(value) ⇒ Object



50
51
52
# File 'lib/applitools/core/match_single_check_data.rb', line 50

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

#start_info=(value) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/applitools/core/match_single_check_data.rb', line 26

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



42
43
44
# File 'lib/applitools/core/match_single_check_data.rb', line 42

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

#update_baseline_if_new=(value) ⇒ Object



46
47
48
# File 'lib/applitools/core/match_single_check_data.rb', line 46

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