11package net .osmtracker .activity ;
22
3- import android .util .Log ;
4-
53import static androidx .test .espresso .Espresso .onView ;
64import static androidx .test .espresso .action .ViewActions .clearText ;
75import static androidx .test .espresso .action .ViewActions .click ;
3836
3937@ RunWith (AndroidJUnit4 .class )
4038public class PreferencesTest {
41- private static final String TAG = "PreferencesTest" ;
42-
39+
4340 private Context context ;
4441 private ActivityScenario <Preferences > activity ;
4542
@@ -65,26 +62,19 @@ public void tearDown() {
6562 */
6663 @ Test
6764 public void testStorageDirectoryValidatesNonEmpty () {
68- Log .i (TAG , "[1] Entering Test 1" );
6965 String keyTitle = context .getString (R .string .prefs_storage_dir );
70- // Log.i(TAG, "[2] Test 1");
7166 String defaultValue = OSMTracker .Preferences .VAL_STORAGE_DIR ;
72- // Log.i(TAG, "[3] Test 1");
7367
7468 // Looks for storage directory preference
7569 scrollToAndClick (keyTitle );
76- // Log.i(TAG, "[4] Test 1");
7770
7871 // Try to save an empty value
7972 onView (withId (android .R .id .edit )).perform (clearText ());
80- // Log.i(TAG, "[5] Test 1");
8173 onView (withText (android .R .string .ok )).perform (click ());
82- // Log.i(TAG, "[6] Test 1");
8374
8475 // Open the preference to verify the value in the list remains the default (unchanged)
8576 onView (ViewMatchers .isAssignableFrom (RecyclerView .class ))
8677 .check (matches (hasDescendant (withText (defaultValue ))));
87- // Log.i(TAG, "[7] Test 1");
8878 }
8979
9080 /**
0 commit comments