use of com.firebase.ui.auth.ui.email.EmailActivity in project FirebaseUI-Android by firebase.
the class AuthMethodPickerActivityTest method testCustomAuthMethodPickerLayout.
@Test
public void testCustomAuthMethodPickerLayout() {
List<String> providers = Arrays.asList(EmailAuthProvider.PROVIDER_ID);
AuthMethodPickerLayout customLayout = new AuthMethodPickerLayout.Builder(R.layout.fui_provider_button_email).setEmailButtonId(R.id.email_button).build();
AuthMethodPickerActivity authMethodPickerActivity = createActivityWithCustomLayout(providers, customLayout, false);
Button emailButton = authMethodPickerActivity.findViewById(R.id.email_button);
emailButton.performClick();
// Expected result -> Directing users to EmailActivity
ShadowActivity.IntentForResult nextIntent = Shadows.shadowOf(authMethodPickerActivity).getNextStartedActivityForResult();
assertEquals(EmailActivity.class.getName(), nextIntent.intent.getComponent().getClassName());
}
use of com.firebase.ui.auth.ui.email.EmailActivity in project FirebaseUI-Android by firebase.
the class AuthMethodPickerActivityTest method testCustomAuthMethodPickerLayoutWithDefaultEmail.
@Test
public void testCustomAuthMethodPickerLayoutWithDefaultEmail() {
List<String> providers = Arrays.asList(EmailAuthProvider.PROVIDER_ID);
AuthMethodPickerLayout customLayout = new AuthMethodPickerLayout.Builder(R.layout.fui_provider_button_email).setEmailButtonId(R.id.email_button).build();
AuthMethodPickerActivity authMethodPickerActivity = createActivityWithCustomLayout(providers, customLayout, true);
Button emailButton = authMethodPickerActivity.findViewById(R.id.email_button);
emailButton.performClick();
// Expected result -> Directing users to EmailActivity
ShadowActivity.IntentForResult nextIntent = Shadows.shadowOf(authMethodPickerActivity).getNextStartedActivityForResult();
assertEquals(EmailActivity.class.getName(), nextIntent.intent.getComponent().getClassName());
}
use of com.firebase.ui.auth.ui.email.EmailActivity in project FirebaseUI-Android by firebase.
the class AuthMethodPickerActivityTest method testCustomAuthMethodPickerLayoutWithEmailLink.
@Test
public void testCustomAuthMethodPickerLayoutWithEmailLink() {
List<String> providers = Arrays.asList(EmailAuthProvider.EMAIL_LINK_SIGN_IN_METHOD);
AuthMethodPickerLayout customLayout = new AuthMethodPickerLayout.Builder(R.layout.fui_provider_button_email).setEmailButtonId(R.id.email_button).build();
AuthMethodPickerActivity authMethodPickerActivity = createActivityWithCustomLayout(providers, customLayout, false);
Button emailButton = authMethodPickerActivity.findViewById(R.id.email_button);
emailButton.performClick();
// Expected result -> Directing users to EmailActivity
ShadowActivity.IntentForResult nextIntent = Shadows.shadowOf(authMethodPickerActivity).getNextStartedActivityForResult();
assertEquals(EmailActivity.class.getName(), nextIntent.intent.getComponent().getClassName());
}
Aggregations