class RainforestCli::TestParser::Test

Public Instance Methods

browser_json() click to toggle source
# File lib/rainforest_cli/test_parser/test.rb, line 31
def browser_json
  browsers.map do |b|
    {'state' => 'enabled', 'name' => b}
  end
end
embedded_ids() click to toggle source
# File lib/rainforest_cli/test_parser/test.rb, line 14
def embedded_ids
  steps.inject([]) { |embeds, step| step.type == :test ? embeds + [step.rfml_id] : embeds }
end
has_uploadable_files?() click to toggle source
# File lib/rainforest_cli/test_parser/test.rb, line 37
def has_uploadable_files?
  steps.any?(&:has_uploadable_files?)
end
to_json() click to toggle source
# File lib/rainforest_cli/test_parser/test.rb, line 18
def to_json
  {
    start_uri: start_uri || '/',
    title: title,
    site_id: site_id,
    description: description,
    source: 'rainforest-cli',
    tags: tags.uniq,
    rfml_id: rfml_id,
    browsers: browser_json,
  }
end