Sha256: d4dd36918ab69d6c50417289051f59f7ed30c111a9cfe728a8cd033912f3639c

Contents?: true

Size: 1.29 KB

Versions: 2

Compression:

Stored size: 1.29 KB

Contents

# frozen_string_literal: true

require_relative 'generator'

module RubyRaider
  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
      template('automation/home_page.tt', "#{name}/page_objects/pages/home_page.rb")
    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
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby_raider-0.2.1 lib/generators/automation_generator.rb
ruby_raider-0.2.0 lib/generators/automation_generator.rb