Sha256: a1b12f0b5d9d113b0bdf65c71878433593e588e0d88d0c3ee2662f7453c88c58

Contents?: true

Size: 1.11 KB

Versions: 15

Compression:

Stored size: 1.11 KB

Contents

# rake ios['ios/element/button']
describe 'ios/element/button' do
  def before_first
    screen.must_equal catalog
    # nav to buttons activity
    wait { UI::Inventory.xcuitest? ? find_element(:name, 'Buttons').click : text('buttons').click }
  end

  def after_last
    # nav back to start
    back_click
  end

  t 'before_first' do
    before_first
  end

  def gray
    'Gray'
  end

  t 'button' do
    # by index
    button(3).name.must_equal gray # or UIButtonTypeInfoDark in XCUITest

    # by name contains
    button('ray').name.must_equal gray
  end

  t 'buttons' do
    exp = ['Back', 'Back', 'Gray', 'Right pointing arrow']

    target_buttons = buttons('a')
    target_buttons.map(&:name).must_equal exp
    target_buttons.length.must_equal exp.length
  end

  t 'first_button' do
    first_button.name.must_equal 'Back'
  end

  t 'last_button' do
    expected = 'Rounded'
    last_button.name.must_equal expected
  end

  t 'button_exact' do
    button_exact(gray).name.must_equal gray
  end

  t 'buttons_exact' do
    buttons_exact(gray).first.name.must_equal gray
  end

  t 'after_last' do
    after_last
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
appium_lib-9.4.5 ios_tests/lib/ios/specs/ios/element/button.rb
appium_lib-9.4.4 ios_tests/lib/ios/specs/ios/element/button.rb
appium_lib-9.4.3 ios_tests/lib/ios/specs/ios/element/button.rb
appium_lib-9.4.2 ios_tests/lib/ios/specs/ios/element/button.rb
appium_lib-9.4.1 ios_tests/lib/ios/specs/ios/element/button.rb
appium_lib-9.4.0 ios_tests/lib/ios/specs/ios/element/button.rb
appium_lib-9.3.8 ios_tests/lib/ios/specs/ios/element/button.rb
appium_lib-9.3.7 ios_tests/lib/ios/specs/ios/element/button.rb
appium_lib-9.3.6 ios_tests/lib/ios/specs/ios/element/button.rb
appium_lib-9.3.5 ios_tests/lib/ios/specs/ios/element/button.rb
appium_lib-9.3.4 ios_tests/lib/ios/specs/ios/element/button.rb
appium_lib-9.3.3 ios_tests/lib/ios/specs/ios/element/button.rb
appium_lib-9.3.2 ios_tests/lib/ios/specs/ios/element/button.rb
appium_lib-9.3.1 ios_tests/lib/ios/specs/ios/element/button.rb
appium_lib-9.3.0 ios_tests/lib/ios/specs/ios/element/button.rb