class Fastlane::Actions::MochaRunTestsAction

Public Class Methods

authors() click to toggle source
# File lib/fastlane/plugin/mocha_run_tests/actions/mocha_run_tests_action.rb, line 18
def self.authors
  ["Adam T Armstrong"]
end
available_options() click to toggle source
# File lib/fastlane/plugin/mocha_run_tests/actions/mocha_run_tests_action.rb, line 31
def self.available_options
  [
    FastlaneCore::ConfigItem.new(
          key: :mocha_js_file_name,
          env_name: "TI_BUILD_APP_MOCHA_JS_FILE_NAME",
          description: "Mocha .js file to use to test this app",
          optional: false,
          is_string: true
    )
  ]
end
description() click to toggle source
# File lib/fastlane/plugin/mocha_run_tests/actions/mocha_run_tests_action.rb, line 14
def self.description
  "Run Mocha Tests from within fastlane"
end
details() click to toggle source
# File lib/fastlane/plugin/mocha_run_tests/actions/mocha_run_tests_action.rb, line 26
def self.details
  # Optional:
  "Leverages mocha to run tests for both iOS and Android Applications from within fastlane"
end
is_supported?(platform) click to toggle source
# File lib/fastlane/plugin/mocha_run_tests/actions/mocha_run_tests_action.rb, line 43
def self.is_supported?(platform)
  # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
  # See: https://docs.fastlane.tools/advanced/#control-configuration-by-lane-and-by-platform
  #
  # [:ios, :mac, :android].include?(platform)
  true
end
return_value() click to toggle source
# File lib/fastlane/plugin/mocha_run_tests/actions/mocha_run_tests_action.rb, line 22
def self.return_value
  # If your method provides a return value, you can describe here what it does
end
run(params) click to toggle source
# File lib/fastlane/plugin/mocha_run_tests/actions/mocha_run_tests_action.rb, line 7
def self.run(params)
  UI.header("MOCHA TESTS")
  UI.important("Ensure Appium Server is running!")
  system "mocha #{params[:mocha_js_file_name]}"
  UI.success("✅ - Mocha Tests Completed!")
end