Espresso test for CreateKeyActivity
This commit is contained in:
@@ -125,9 +125,6 @@ public class CreateKeyEmailFragment extends Fragment {
|
||||
// initial values
|
||||
if (mAdditionalEmailModels == null) {
|
||||
mAdditionalEmailModels = new ArrayList<>();
|
||||
if (mCreateKeyActivity.mAdditionalEmails != null) {
|
||||
mEmailAdapter.addAll(mCreateKeyActivity.mAdditionalEmails);
|
||||
}
|
||||
}
|
||||
|
||||
if (mEmailAdapter == null) {
|
||||
@@ -137,6 +134,10 @@ public class CreateKeyEmailFragment extends Fragment {
|
||||
addEmail();
|
||||
}
|
||||
});
|
||||
|
||||
if (mCreateKeyActivity.mAdditionalEmails != null) {
|
||||
mEmailAdapter.addAll(mCreateKeyActivity.mAdditionalEmails);
|
||||
}
|
||||
}
|
||||
|
||||
mEmailsRecyclerView.setAdapter(mEmailAdapter);
|
||||
@@ -157,7 +158,7 @@ public class CreateKeyEmailFragment extends Fragment {
|
||||
email.equals(mEmailEdit.getText().toString())) {
|
||||
Notify.create(getActivity(),
|
||||
getString(R.string.create_key_email_already_exists_text),
|
||||
Notify.LENGTH_LONG, Notify.Style.ERROR).show();
|
||||
Notify.LENGTH_LONG, Notify.Style.ERROR).show(CreateKeyEmailFragment.this);
|
||||
return;
|
||||
}
|
||||
//check for duplicated emails inside the adapter
|
||||
@@ -165,7 +166,7 @@ public class CreateKeyEmailFragment extends Fragment {
|
||||
if (email.equals(model.email)) {
|
||||
Notify.create(getActivity(),
|
||||
getString(R.string.create_key_email_already_exists_text),
|
||||
Notify.LENGTH_LONG, Notify.Style.ERROR).show();
|
||||
Notify.LENGTH_LONG, Notify.Style.ERROR).show(CreateKeyEmailFragment.this);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user