Sha256: d6b145670330ed3c27c7ad59d635e929a3b5105e4cefe1891e36d4da606d838b

Contents?: true

Size: 828 Bytes

Versions: 1

Compression:

Stored size: 828 Bytes

Contents

describe 'android/element/alert.rb' do
  def open_alert
    # trigger the alert
    wait { button('OK Cancel dialog with a long message').click }
  end

  t 'alert_click' do
    # nav to alert activity
    wait { find('app').click }
    wait { find('alert').click }

    # test
    wait { open_alert }
    wait { alert_click('Something') }
  end

  t 'alert_accept' do
    wait { open_alert }
    wait { alert_accept }
  end

  t 'alert_accept_text' do
    wait { open_alert }
    wait { alert_accept_text.must_equal 'OK' }
    wait { alert_accept }
  end

  t 'alert_dismiss' do
    wait { open_alert }
    wait { alert_dismiss }
  end

  t 'alert_dismiss_text' do
    wait { open_alert }
    wait { alert_dismiss_text.must_equal 'Cancel' }
    wait { alert_dismiss }

    # nav to start activity
    2.times { back }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
appium_lib-1.0.0 android_tests/lib/android/specs/android/element/alert.rb