Sha256: b65e63a31627d90dc5fcd461422da11b2c4aec21e6b43025266cc5474f8ca645

Contents?: true

Size: 874 Bytes

Versions: 12

Compression:

Stored size: 874 Bytes

Contents

require 'calabash-android/management/app_installation'

AfterConfiguration do
  FeatureMemory.feature = nil
end

Before('@reinstall') do
  uninstall_apps
  install_app(ENV['TEST_APP_PATH'])
  install_app(ENV['APP_PATH'])
end

Before do |scenario|
  scenario = scenario.scenario_outline if
    scenario.respond_to?(:scenario_outline)

  feature = scenario.feature
  if FeatureMemory.feature != feature || ENV['RESET_BETWEEN_SCENARIOS'] == '1'
    if ENV['RESET_BETWEEN_SCENARIOS'] == '1'
      log 'New scenario - reinstalling apps'
    else
      log 'First scenario in feature - reinstalling apps'
    end

    uninstall_apps
    install_app(ENV['TEST_APP_PATH'])
    install_app(ENV['APP_PATH'])

    FeatureMemory.feature = feature
    FeatureMemory.invocation = 1
  else
    FeatureMemory.invocation += 1
  end
end

FeatureMemory = Struct.new(:feature, :invocation).new

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
sunomono-1.0.6 lib/skeleton_calabash/features/android/support/app_installation_hooks.rb
sunomono-1.0.5 lib/skeleton_calabash/features/android/support/app_installation_hooks.rb
sunomono-1.0.4 lib/skeleton_calabash/features/android/support/app_installation_hooks.rb
sunomono-1.0.3 lib/skeleton_calabash/features/android/support/app_installation_hooks.rb
sunomono-1.0.0 lib/skeleton_calabash/features/android/support/app_installation_hooks.rb
sunomono-0.3.1 lib/skeleton/features/android/support/app_installation_hooks.rb
sunomono-0.3.0 lib/skeleton/features/android/support/app_installation_hooks.rb
sunomono-0.2.0.pre lib/skeleton/features/android/support/app_installation_hooks.rb
cs-bdd-0.1.9 lib/skeleton/features/android/support/app_installation_hooks.rb
cs-bdd-0.1.8 lib/skeleton/features/android/support/app_installation_hooks.rb
cs-bdd-0.1.7 lib/skeleton/features/android/support/app_installation_hooks.rb
cs-bdd-0.1.6 lib/skeleton/features/android/support/app_installation_hooks.rb