Sha256: 424e8a8c69c63dfdc6265a203467fd43a120a6764cc0a59ca723f2c6f5bb7709

Contents?: true

Size: 719 Bytes

Versions: 26

Compression:

Stored size: 719 Bytes

Contents

require 'calabash-android/management/app_installation'

AfterConfiguration do |config|
  FeatureMemory.feature = nil
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

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

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

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
calabash-android-0.9.22 features-skeleton/support/app_installation_hooks.rb
calabash-android-0.9.21 features-skeleton/support/app_installation_hooks.rb
calabash-android-0.9.20 features-skeleton/support/app_installation_hooks.rb
calabash-android-0.9.19 features-skeleton/support/app_installation_hooks.rb
calabash-android-0.9.18 features-skeleton/support/app_installation_hooks.rb
calabash-android-0.9.17 features-skeleton/support/app_installation_hooks.rb
calabash-android-0.9.16 features-skeleton/support/app_installation_hooks.rb
kraken-mobile-1.0.9 calabash-android-features-skeleton/support/app_installation_hooks.rb
kraken-mobile-1.0.8 calabash-android-features-skeleton/support/app_installation_hooks.rb
calabash-android-0.9.14 features-skeleton/support/app_installation_hooks.rb
kraken-mobile-1.0.5 calabash-android-features-skeleton/support/app_installation_hooks.rb
calabash-android-0.9.12 features-skeleton/support/app_installation_hooks.rb
calabash-android-0.9.11 features-skeleton/support/app_installation_hooks.rb
calabash-android-0.9.10 features-skeleton/support/app_installation_hooks.rb
calabash-android-0.9.9 features-skeleton/support/app_installation_hooks.rb
calabash-android-0.9.8 features-skeleton/support/app_installation_hooks.rb
calabash-android-0.9.7 features-skeleton/support/app_installation_hooks.rb
calabash-android-0.9.6 features-skeleton/support/app_installation_hooks.rb
calabash-android-0.9.5 features-skeleton/support/app_installation_hooks.rb
calabash-android-0.9.4 features-skeleton/support/app_installation_hooks.rb