diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2012-12-13 22:28:50 +0100 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2012-12-13 22:28:50 +0100 |
| commit | fd0e8caeb6a45fd30d859325e91f235d5c3ae048 (patch) | |
| tree | 1785133ccf513ec2ee4dfaf56ededbda0068153e /tests/src | |
| parent | 5a4820b48c8160fb76cda0f2eb805dd6430409dd (diff) | |
| download | cgeo-fd0e8caeb6a45fd30d859325e91f235d5c3ae048.zip cgeo-fd0e8caeb6a45fd30d859325e91f235d5c3ae048.tar.gz cgeo-fd0e8caeb6a45fd30d859325e91f235d5c3ae048.tar.bz2 | |
Use the right number of check boxes
The number of check boxes visible onto the screen must be taken after
the viewport has been moved to the right position. Otherwise, the number
of visible boxes may vary and cause an out of bounds exception.
Diffstat (limited to 'tests/src')
| -rw-r--r-- | tests/src/cgeo/geocaching/files/SimpleDirChooserUITest.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/src/cgeo/geocaching/files/SimpleDirChooserUITest.java b/tests/src/cgeo/geocaching/files/SimpleDirChooserUITest.java index 52266fb..80a2451 100644 --- a/tests/src/cgeo/geocaching/files/SimpleDirChooserUITest.java +++ b/tests/src/cgeo/geocaching/files/SimpleDirChooserUITest.java @@ -24,11 +24,10 @@ public class SimpleDirChooserUITest extends ActivityInstrumentationTestCase2<Sim } public void testSingleSelection() throws InterruptedException { - final ArrayList<CheckBox> boxes = solo.getCurrentCheckBoxes(); - final int lastIndex = boxes.size() - 1; assertChecked("Newly opened activity", 0); - solo.scrollToBottom(); + final int lastIndex = solo.getCurrentCheckBoxes().size() - 1; + solo.clickOnCheckBox(lastIndex); assertTrue(solo.getCurrentCheckBoxes().get(lastIndex).isChecked()); assertFalse(solo.getCurrentCheckBoxes().get(0).isChecked()); |
