Sha256: 63bc575f863bbcf4d101ca66d2d7e2da673aa082d426d06965142f9a5777cade

Contents?: true

Size: 1.25 KB

Versions: 8

Compression:

Stored size: 1.25 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
    return unless @_initializer.first.include?('appium_ios')

    template('automation/home_page.tt', "#{name}/page_objects/pages/home_page.rb")
  end

  def generate_header_component
    return if @_initializer.first.include?('appium_ios')

    template('automation/component.tt', "#{name}/page_objects/components/header_component.rb")
  end

  def generate_abstract_component
    return if @_initializer.first.include?('appium_ios')

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

  def generate_confirmation_page
    return unless @_initializer.first.include?('appium_ios')

    template('automation/confirmation_page.tt', "#{name}/page_objects/pages/confirmation_page.rb")
  end

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ruby_raider-0.4.0 lib/generators/automation_generator.rb
ruby_raider-0.3.9 lib/generators/automation_generator.rb
ruby_raider-0.3.8 lib/generators/automation_generator.rb
ruby_raider-0.3.7 lib/generators/automation_generator.rb
ruby_raider-0.3.6 lib/generators/automation_generator.rb
ruby_raider-0.3.5 lib/generators/automation_generator.rb
ruby_raider-0.3.4 lib/generators/automation_generator.rb
ruby_raider-0.3.3 lib/generators/automation_generator.rb