Skip to content

Commit 9be3b3f

Browse files
committed
22
1 parent b0e4301 commit 9be3b3f

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

app/src/androidTest/java/com/mytaxi/android_demo/activities/LogInTestCases.java

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,11 @@ public void loginToMyTaxiPositiveScenario() {
109109

110110
//Step 4: Press the Login Button
111111
Espresso.onView(withId(R.id.btn_login)).perform(click());
112-
try {
113-
Thread.sleep(10000);
112+
113+
while(!(doesViewExist(R.id.textSearch)))
114+
{
115+
SystemClock.sleep(200);
114116
}
115-
catch(Exception e)
116-
{ e.printStackTrace();}
117-
//Log ig out
118117

119118
onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
120119

@@ -130,12 +129,7 @@ public void loginToMyTaxiPositiveScenario() {
130129

131130

132131

133-
try {
134-
Thread.sleep(5000);
135-
}
136-
catch(Exception e)
137-
{ e.printStackTrace();}
138-
//Log ig out
132+
139133
onView(withText("Logout")).perform(click());
140134

141135
}

0 commit comments

Comments
 (0)