use of com.owncloud.android.utils.ScreenshotTest in project android by nextcloud.
the class ConflictsResolveActivityIT method screenshotTextFiles.
@Test
@ScreenshotTest
public void screenshotTextFiles() {
OCFile newFile = new OCFile("/newFile.txt");
newFile.setFileLength(56000);
newFile.setModificationTimestamp(1522019340);
newFile.setStoragePath(FileStorageUtils.getSavePath(user.getAccountName()) + "/nonEmpty.txt");
OCFile existingFile = new OCFile("/newFile.txt");
existingFile.setFileLength(1024000);
existingFile.setModificationTimestamp(1582019340);
FileDataStorageManager storageManager = new FileDataStorageManager(user, targetContext.getContentResolver());
storageManager.saveNewFile(existingFile);
Intent intent = new Intent(targetContext, ConflictsResolveActivity.class);
intent.putExtra(ConflictsResolveActivity.EXTRA_FILE, newFile);
intent.putExtra(ConflictsResolveActivity.EXTRA_EXISTING_FILE, existingFile);
ConflictsResolveActivity sut = activityRule.launchActivity(intent);
ConflictsResolveDialog dialog = ConflictsResolveDialog.newInstance(existingFile, newFile, UserAccountManagerImpl.fromContext(targetContext).getUser());
dialog.showDialog(sut);
getInstrumentation().waitForIdleSync();
shortSleep();
shortSleep();
shortSleep();
shortSleep();
screenshot(Objects.requireNonNull(dialog.requireDialog().getWindow()).getDecorView());
}
use of com.owncloud.android.utils.ScreenshotTest in project android by nextcloud.
the class ManageAccountsActivityIT method userInfoDetail.
@Test
@ScreenshotTest
public void userInfoDetail() {
ManageAccountsActivity sut = activityRule.launchActivity(null);
User user = sut.accountManager.getUser();
UserInfo userInfo = new UserInfo("test", true, "Test User", "test@nextcloud.com", "+49 123 456", "Address 123, Berlin", "https://www.nextcloud.com", "https://twitter.com/Nextclouders", new Quota(), new ArrayList<>());
sut.showUser(user, userInfo);
shortSleep();
shortSleep();
screenshot(getCurrentActivity());
}
use of com.owncloud.android.utils.ScreenshotTest in project android by nextcloud.
the class ManageAccountsActivityIT method open.
@Test
@ScreenshotTest
public void open() {
Activity sut = activityRule.launchActivity(null);
shortSleep();
screenshot(sut);
}
use of com.owncloud.android.utils.ScreenshotTest in project android by nextcloud.
the class CommunityActivityIT 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 AuthenticatorActivityIT method login.
@Test
@ScreenshotTest
public void login() {
AuthenticatorActivity sut = activityRule.launchActivity(null);
((TextView) sut.findViewById(R.id.host_url_input)).setText(URL);
sut.runOnUiThread(() -> sut.getAccountSetupBinding().hostUrlInput.clearFocus());
screenshot(sut);
}
Aggregations