Sha256: c0eadc453483c26a8d01f293401d54257bdb24eb9d4bbf51b11ff534d6d649fc

Contents?: true

Size: 1.35 KB

Versions: 3

Compression:

Stored size: 1.35 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
      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
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruby_raider-0.2.4 lib/generators/automation_generator.rb
ruby_raider-0.2.3 lib/generators/automation_generator.rb
ruby_raider-0.2.2 lib/generators/automation_generator.rb