Search in sources :

Example 1 with SyncedFolderPreferencesDialogFragment

use of com.owncloud.android.ui.dialog.SyncedFolderPreferencesDialogFragment 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());
}
Also used : SyncedFoldersActivity(com.owncloud.android.ui.activity.SyncedFoldersActivity) SyncedFolderDisplayItem(com.owncloud.android.datamodel.SyncedFolderDisplayItem) Intent(android.content.Intent) SyncedFolderPreferencesDialogFragment(com.owncloud.android.ui.dialog.SyncedFolderPreferencesDialogFragment) Test(org.junit.Test) ScreenshotTest(com.owncloud.android.utils.ScreenshotTest) ScreenshotTest(com.owncloud.android.utils.ScreenshotTest)

Aggregations

Intent (android.content.Intent)1 SyncedFolderDisplayItem (com.owncloud.android.datamodel.SyncedFolderDisplayItem)1 SyncedFoldersActivity (com.owncloud.android.ui.activity.SyncedFoldersActivity)1 SyncedFolderPreferencesDialogFragment (com.owncloud.android.ui.dialog.SyncedFolderPreferencesDialogFragment)1 ScreenshotTest (com.owncloud.android.utils.ScreenshotTest)1 Test (org.junit.Test)1