use of com.owncloud.android.ui.fragment.ProfileBottomSheetDialog 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