|
@@ -1,11 +1,13 @@
|
|
package com.owncloud.android.screenshots;
|
|
package com.owncloud.android.screenshots;
|
|
|
|
|
|
|
|
+import android.content.Intent;
|
|
import android.support.test.espresso.Espresso;
|
|
import android.support.test.espresso.Espresso;
|
|
import android.support.test.espresso.contrib.DrawerActions;
|
|
import android.support.test.espresso.contrib.DrawerActions;
|
|
import android.support.test.rule.ActivityTestRule;
|
|
import android.support.test.rule.ActivityTestRule;
|
|
|
|
|
|
import com.owncloud.android.R;
|
|
import com.owncloud.android.R;
|
|
import com.owncloud.android.ui.activity.FileDisplayActivity;
|
|
import com.owncloud.android.ui.activity.FileDisplayActivity;
|
|
|
|
+import com.owncloud.android.ui.activity.Preferences;
|
|
|
|
|
|
import junit.framework.Assert;
|
|
import junit.framework.Assert;
|
|
|
|
|
|
@@ -36,6 +38,9 @@ public class ScreenshotsIT {
|
|
@Rule
|
|
@Rule
|
|
public ActivityTestRule<FileDisplayActivity> fileDisplayRule = new ActivityTestRule<>(FileDisplayActivity.class);
|
|
public ActivityTestRule<FileDisplayActivity> fileDisplayRule = new ActivityTestRule<>(FileDisplayActivity.class);
|
|
|
|
|
|
|
|
+ @Rule
|
|
|
|
+ public ActivityTestRule<Preferences> preferencesRule = new ActivityTestRule<>(Preferences.class, true, false);
|
|
|
|
+
|
|
@BeforeClass
|
|
@BeforeClass
|
|
public static void beforeAll() {
|
|
public static void beforeAll() {
|
|
Screengrab.setDefaultScreenshotStrategy(new UiAutomatorScreenshotStrategy());
|
|
Screengrab.setDefaultScreenshotStrategy(new UiAutomatorScreenshotStrategy());
|
|
@@ -103,4 +108,17 @@ public class ScreenshotsIT {
|
|
|
|
|
|
Assert.assertTrue(true); // if we reach this, everything is ok
|
|
Assert.assertTrue(true); // if we reach this, everything is ok
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Test
|
|
|
|
+ public void davdroidScreenshot() throws InterruptedException {
|
|
|
|
+
|
|
|
|
+ preferencesRule.launchActivity(new Intent());
|
|
|
|
+
|
|
|
|
+// onView(withId(R.id.drawer_layout)).perform(DrawerActions.open());
|
|
|
|
+// onView(withId(R.id.nav_settings)).perform(click());
|
|
|
|
+
|
|
|
|
+ Screengrab.screenshot("06_davdroid");
|
|
|
|
+
|
|
|
|
+// Espresso.pressBack();
|
|
|
|
+ }
|
|
}
|
|
}
|