|
@@ -33,6 +33,7 @@ import org.junit.Rule;
|
|
|
import org.junit.Test;
|
|
|
|
|
|
import androidx.test.espresso.contrib.DrawerActions;
|
|
|
+import androidx.test.espresso.contrib.NavigationViewActions;
|
|
|
import androidx.test.espresso.intent.rule.IntentsTestRule;
|
|
|
import androidx.test.rule.GrantPermissionRule;
|
|
|
|
|
@@ -58,6 +59,40 @@ public class FileDisplayActivityScreenshotIT extends AbstractIT {
|
|
|
sut.getListOfFilesFragment().setLoading(false);
|
|
|
waitForIdleSync();
|
|
|
|
|
|
+ shortSleep();
|
|
|
+
|
|
|
+ screenshot(sut);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Test
|
|
|
+ @ScreenshotTest
|
|
|
+ public void showMediaThenAllFiles() {
|
|
|
+ FileDisplayActivity sut = activityRule.launchActivity(null);
|
|
|
+
|
|
|
+ sut.getListOfFilesFragment().setFabEnabled(false);
|
|
|
+ sut.getListOfFilesFragment().setEmptyListLoadingMessage();
|
|
|
+ sut.getListOfFilesFragment().setLoading(false);
|
|
|
+
|
|
|
+ // open drawer
|
|
|
+ onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
|
|
|
+
|
|
|
+ // click "all files"
|
|
|
+ onView(withId(R.id.nav_view))
|
|
|
+ .perform(NavigationViewActions.navigateTo(R.id.nav_gallery));
|
|
|
+
|
|
|
+ // wait
|
|
|
+ shortSleep();
|
|
|
+
|
|
|
+ // click "all files"
|
|
|
+ onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
|
|
|
+ onView(withId(R.id.nav_view)).perform(NavigationViewActions.navigateTo(R.id.nav_all_files));
|
|
|
+
|
|
|
+ // then compare screenshot
|
|
|
+ shortSleep();
|
|
|
+ sut.getListOfFilesFragment().setFabEnabled(false);
|
|
|
+ sut.getListOfFilesFragment().setEmptyListLoadingMessage();
|
|
|
+ sut.getListOfFilesFragment().setLoading(false);
|
|
|
+ shortSleep();
|
|
|
screenshot(sut);
|
|
|
}
|
|
|
|