Class: Fastlane::Actions::InitCordovaScreenshotsIosAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane/plugin/cordova_screenshots/actions/init_cordova_screenshots_ios_action.rb

Class Method Summary collapse

Class Method Details

.authorsObject



20
21
22
# File 'lib/fastlane/plugin/cordova_screenshots/actions/init_cordova_screenshots_ios_action.rb', line 20

def self.authors
  ['Adrian Regan', 'Jan Piotrowski']
end

.available_optionsObject



33
34
35
36
37
38
39
40
41
# File 'lib/fastlane/plugin/cordova_screenshots/actions/init_cordova_screenshots_ios_action.rb', line 33

def self.available_options
  [
    FastlaneCore::ConfigItem.new(key: :scheme_name,
                                 env_name: 'CORDOVA_SCREENSHOTS_IOS_TEST_SCHEME',
                                 description: 'Scheme Name of the UI Unit Tests',
                                 default_value: CordovaScreenshots::CORDOVA_SCREENSHOTS_DEFAULT_IOS_UNIT_TEST_NAME,
                                 optional: false)
  ]
end

.descriptionObject



16
17
18
# File 'lib/fastlane/plugin/cordova_screenshots/actions/init_cordova_screenshots_ios_action.rb', line 16

def self.description
  "Creates an iOS UI Unit Tests in '#{CordovaScreenshots::CORDOVA_SCREENSHOTS_IOS_CONFIG_PATH}'"
end

.detailsObject



28
29
30
31
# File 'lib/fastlane/plugin/cordova_screenshots/actions/init_cordova_screenshots_ios_action.rb', line 28

def self.details
  # Optional:
  ""
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


43
44
45
46
47
48
49
# File 'lib/fastlane/plugin/cordova_screenshots/actions/init_cordova_screenshots_ios_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://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
  #
  # [:ios, :mac, :android].include?(platform)
  [:ios].include?(platform)
end

.return_valueObject



24
25
26
# File 'lib/fastlane/plugin/cordova_screenshots/actions/init_cordova_screenshots_ios_action.rb', line 24

def self.return_value
  # If your method provides a return value, you can describe here what it does
end

.run(params) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/fastlane/plugin/cordova_screenshots/actions/init_cordova_screenshots_ios_action.rb', line 7

def self.run(params)
  scheme_name = params[:scheme_name]

  UI.message("Creating new iOS UI Unit Test (with scheme '#{scheme_name}') in '#{CordovaScreenshots::CORDOVA_SCREENSHOTS_IOS_CONFIG_PATH}'")
  Fastlane::Helper::CordovaScreenshotsHelper.copy_ios_sample_tests(scheme_name)

  UI.success("Done. Call the `retrofit_cordova_screenshots_ios` action to integrate it into your Cordova iOS Xcode project.")
end