Sha256: 0ca044905e7cf7e925ea4c4e639f993be6ede8f7874cbe0288c185ad414dbc37

Contents?: true

Size: 1.27 KB

Versions: 8

Compression:

Stored size: 1.27 KB

Contents

# frozen_string_literal: true

require_relative 'generator'

class AutomationGenerator < Generator
  def generate_login_page
    template('automation/login_page.tt', "#{name}/page_objects/pages/login_page.rb")
  end

  def generate_abstract_page
    template('automation/abstract_page.tt', "#{name}/page_objects/abstract/abstract_page.rb")
  end

  def generate_home_page
    if @_initializer.first.include?('appium_ios')
      template('automation/home_page.tt', "#{name}/page_objects/pages/home_page.rb")
    end
  end

  def generate_header_component
    unless @_initializer.first.include?('appium_ios')
      template('automation/component.tt', "#{name}/page_objects/components/header_component.rb")
    end
  end

  def generate_abstract_component
    unless @_initializer.first.include?('appium_ios')
      template('automation/abstract_component.tt', "#{name}/page_objects/abstract/abstract_component.rb")
    end
  end

  def generate_confirmation_page
    if @_initializer.first.include?('appium_ios')
      template('automation/confirmation_page.tt', "#{name}/page_objects/pages/confirmation_page.rb")
    end
  end

  def generate_appium_settings
    if @_initializer.first.include?('appium_ios')
      template('automation/appium_settings.tt', "#{name}/appium.txt")
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ruby_raider-0.3.2 lib/generators/automation_generator.rb
ruby_raider-0.3.1 lib/generators/automation_generator.rb
ruby_raider-0.3.0 lib/generators/automation_generator.rb
ruby_raider-0.2.9 lib/generators/automation_generator.rb
ruby_raider-0.2.8 lib/generators/automation_generator.rb
ruby_raider-0.2.7 lib/generators/automation_generator.rb
ruby_raider-0.2.6 lib/generators/automation_generator.rb
ruby_raider-0.2.5 lib/generators/automation_generator.rb