use of com.owncloud.android.utils.ScreenshotTest in project android by nextcloud.
the class FirstRunActivityIT method open.
@Test
@ScreenshotTest
public void open() {
Activity sut = activityRule.launchActivity(null);
screenshot(sut);
}
use of com.owncloud.android.utils.ScreenshotTest in project android by nextcloud.
the class SyncedFoldersActivityIT method testSyncedFolderDialog.
@Test
@ScreenshotTest
public void testSyncedFolderDialog() {
SyncedFolderDisplayItem item = new SyncedFolderDisplayItem(1, "/sdcard/DCIM/", "/InstantUpload/", true, false, false, true, "test@https://nextcloud.localhost", 0, 0, true, 1000, "Name", MediaFolderType.IMAGE, false);
SyncedFolderPreferencesDialogFragment sut = SyncedFolderPreferencesDialogFragment.newInstance(item, 0);
Intent intent = new Intent(targetContext, SyncedFoldersActivity.class);
SyncedFoldersActivity activity = activityRule.launchActivity(intent);
sut.show(activity.getSupportFragmentManager(), "");
getInstrumentation().waitForIdleSync();
shortSleep();
screenshot(Objects.requireNonNull(sut.requireDialog().getWindow()).getDecorView());
}
use of com.owncloud.android.utils.ScreenshotTest in project android by nextcloud.
the class DialogFragmentIT method testOptionalPasswordDialog.
@Test
@ScreenshotTest
public void testOptionalPasswordDialog() {
if (Looper.myLooper() == null) {
Looper.prepare();
}
SharePasswordDialogFragment sut = SharePasswordDialogFragment.newInstance(new OCFile("/"), true, true);
showDialog(sut);
}
use of com.owncloud.android.utils.ScreenshotTest in project android by nextcloud.
the class DialogFragmentIT method testRemoveFolderDialog.
@Test
@ScreenshotTest
public void testRemoveFolderDialog() {
RemoveFilesDialogFragment dialog = RemoveFilesDialogFragment.newInstance(new OCFile("/Folder/"));
showDialog(dialog);
}
use of com.owncloud.android.utils.ScreenshotTest in project android by nextcloud.
the class DialogFragmentIT method testProfileBottomSheet.
@Test
@ScreenshotTest
public void testProfileBottomSheet() {
if (Looper.myLooper() == null) {
Looper.prepare();
}
// Fixed values for HoverCard
List<Action> actions = new ArrayList<>();
actions.add(new Action("profile", "View profile", "https://dev.nextcloud.com/core/img/actions/profile.svg", "https://dev.nextcloud.com/index.php/u/christine"));
actions.add(new Action("core", "christine.scott@nextcloud.com", "https://dev.nextcloud.com/core/img/actions/mail.svg", "mailto:christine.scott@nextcloud.com"));
actions.add(new Action("spreed", "Talk to Christine", "https://dev.nextcloud.com/apps/spreed/img/app-dark.svg", "https://dev.nextcloud.com/apps/spreed/?callUser=christine"));
HoverCard hoverCard = new HoverCard("christine", "Christine Scott", actions);
// show dialog
Intent intent = new Intent(targetContext, FileDisplayActivity.class);
FileDisplayActivity fda = activityRule.launchActivity(intent);
ProfileBottomSheetDialog sut = new ProfileBottomSheetDialog(fda, user, hoverCard);
fda.runOnUiThread(sut::show);
waitForIdleSync();
screenshot(sut.getWindow().getDecorView());
}
Aggregations