Sha256: 39bd4611d50553de923b9007fe71980e53dd174db854dc31595db0e3a21a5e6d

Contents?: true

Size: 1.28 KB

Versions: 8

Compression:

Stored size: 1.28 KB

Contents

activity Java::org.ruboto.test_app.PaddingActivity

setup do |activity|
  start = Time.now
  loop do
    @layout = activity.findViewById(41)
    @text_view = activity.findViewById(42)
    break if (@layout && @text_view) || Time.now - start > 60
    sleep 0.5
  end
  assert @layout
  assert @text_view
end

test('padding is set') do |activity|
  assert_equal 40, @layout.padding_bottom

  # FIXME(uwe): Remove condition when we stop testing api level < 17
  assert_equal(30, @layout.padding_end) if android.os.Build::VERSION::SDK_INT >= 17

  assert_equal 10, @layout.padding_left
  assert_equal 30, @layout.padding_right

  # FIXME(uwe): Remove condition when we stop testing api level < 17
  assert_equal(10, @layout.padding_start) if android.os.Build::VERSION::SDK_INT >= 17

  assert_equal 20, @layout.padding_top

  assert_equal 8, @text_view.padding_bottom

  # FIXME(uwe): Remove condition when we stop testing api level < 17
  assert_equal(4, @text_view.padding_end) if android.os.Build::VERSION::SDK_INT >= 17

  assert_equal 1, @text_view.padding_left
  assert_equal 4, @text_view.padding_right

  # FIXME(uwe): Remove condition when we stop testing api level < 17
  assert_equal(1, @text_view.padding_start) if android.os.Build::VERSION::SDK_INT >= 17

  assert_equal 2, @text_view.padding_top
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ruboto-1.6.1 test/activity/padding_activity_test.rb
ruboto-1.6.0 test/activity/padding_activity_test.rb
ruboto-1.5.0 test/activity/padding_activity_test.rb
ruboto-1.4.1 test/activity/padding_activity_test.rb
ruboto-1.4.0 test/activity/padding_activity_test.rb
ruboto-1.3.1 test/activity/padding_activity_test.rb
ruboto-1.3.0 test/activity/padding_activity_test.rb
ruboto-1.2.0 test/activity/padding_activity_test.rb