Skip to content

Commit

Permalink
fixed bug in UserLoginActivityTest
Browse files Browse the repository at this point in the history
  • Loading branch information
eshza committed Nov 13, 2017
1 parent fe4dd6f commit a58d3e4
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,12 @@ public void testLogin(){


final ListView habitList = activity.getListView();
Habit habit = (Habit) habitList.getItemAtPosition(0);

Habit habit = (Habit) habitList.getItemAtPosition(habitList.getCount()-1);
assertEquals("Disciplining Kids", habit.getHabitTitle());
assertEquals("Good Nanny",habit.getHabitReason());

solo.clickInList(0);
solo.clickInList(habitList.getCount()-1);
solo.assertCurrentActivity("wrong activity", HabitDetailViewActivity.class);
assertTrue(solo.waitForText("Disciplining Kids", 1, 1000));
assertTrue(solo.waitForText("Good Nanny", 1, 1000));
Expand All @@ -96,11 +97,12 @@ public void testLogin(){


final ListView habitList2 = activity2.getListView();
Habit myhabit = (Habit) habitList.getItemAtPosition(0);

Habit myhabit = (Habit) habitList.getItemAtPosition(habitList.getCount()-1);
assertEquals("Disciplining Kids", myhabit.getHabitTitle());
assertEquals("Good Nanny",myhabit.getHabitReason());

solo.clickInList(0);
solo.clickInList(habitList.getCount()-1);
solo.assertCurrentActivity("wrong activity", HabitDetailViewActivity.class);
assertTrue(solo.waitForText("Disciplining Kids", 1, 1000));
assertTrue(solo.waitForText("Good Nanny", 1, 1000));
Expand Down

0 comments on commit a58d3e4

Please sign in to comment.