Update eSIM deletion strings.
Adds some conditional behavior for the confirmation screens. When the erase eSIM option is visible and checked, shows alternate string. Fixes: 126262481 Fixes: 118751918 Test: visual inspection & make -j RunSettingsRoboTests Change-Id: I40f983b03ad470d785bf104e645dbc92e7897d2d
This commit is contained in:
@@ -108,12 +108,14 @@ public class MasterClearTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testShowFinalConfirmation_eraseEsimChecked() {
|
||||
public void testShowFinalConfirmation_eraseEsimVisible_eraseEsimChecked() {
|
||||
final Context context = mock(Context.class);
|
||||
when(mMasterClear.getContext()).thenReturn(context);
|
||||
|
||||
mMasterClear.mEsimStorage = mContentView.findViewById(R.id.erase_esim);
|
||||
mMasterClear.mExternalStorage = mContentView.findViewById(R.id.erase_external);
|
||||
mMasterClear.mEsimStorageContainer = mContentView.findViewById(R.id.erase_esim_container);
|
||||
mMasterClear.mEsimStorageContainer.setVisibility(View.VISIBLE);
|
||||
mMasterClear.mEsimStorage.setChecked(true);
|
||||
mMasterClear.showFinalConfirmation();
|
||||
|
||||
@@ -126,12 +128,14 @@ public class MasterClearTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testShowFinalConfirmation_eraseEsimUnchecked() {
|
||||
public void testShowFinalConfirmation_eraseEsimVisible_eraseEsimUnchecked() {
|
||||
final Context context = mock(Context.class);
|
||||
when(mMasterClear.getContext()).thenReturn(context);
|
||||
|
||||
mMasterClear.mEsimStorage = mContentView.findViewById(R.id.erase_esim);
|
||||
mMasterClear.mExternalStorage = mContentView.findViewById(R.id.erase_external);
|
||||
mMasterClear.mEsimStorageContainer = mContentView.findViewById(R.id.erase_esim_container);
|
||||
mMasterClear.mEsimStorageContainer.setVisibility(View.VISIBLE);
|
||||
mMasterClear.mEsimStorage.setChecked(false);
|
||||
mMasterClear.showFinalConfirmation();
|
||||
final ArgumentCaptor<Intent> intent = ArgumentCaptor.forClass(Intent.class);
|
||||
@@ -142,6 +146,45 @@ public class MasterClearTest {
|
||||
.isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testShowFinalConfirmation_eraseEsimGone_eraseEsimChecked() {
|
||||
final Context context = mock(Context.class);
|
||||
when(mMasterClear.getContext()).thenReturn(context);
|
||||
|
||||
mMasterClear.mEsimStorage = mContentView.findViewById(R.id.erase_esim);
|
||||
mMasterClear.mExternalStorage = mContentView.findViewById(R.id.erase_external);
|
||||
mMasterClear.mEsimStorageContainer = mContentView.findViewById(R.id.erase_esim_container);
|
||||
mMasterClear.mEsimStorageContainer.setVisibility(View.GONE);
|
||||
mMasterClear.mEsimStorage.setChecked(true);
|
||||
mMasterClear.showFinalConfirmation();
|
||||
|
||||
final ArgumentCaptor<Intent> intent = ArgumentCaptor.forClass(Intent.class);
|
||||
|
||||
verify(context).startActivity(intent.capture());
|
||||
assertThat(intent.getValue().getBundleExtra(SettingsActivity.EXTRA_SHOW_FRAGMENT_ARGUMENTS)
|
||||
.getBoolean(MasterClear.ERASE_ESIMS_EXTRA, false))
|
||||
.isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testShowFinalConfirmation_eraseEsimGone_eraseEsimUnchecked() {
|
||||
final Context context = mock(Context.class);
|
||||
when(mMasterClear.getContext()).thenReturn(context);
|
||||
|
||||
mMasterClear.mEsimStorage = mContentView.findViewById(R.id.erase_esim);
|
||||
mMasterClear.mExternalStorage = mContentView.findViewById(R.id.erase_external);
|
||||
mMasterClear.mEsimStorageContainer = mContentView.findViewById(R.id.erase_esim_container);
|
||||
mMasterClear.mEsimStorageContainer.setVisibility(View.GONE);
|
||||
mMasterClear.mEsimStorage.setChecked(false);
|
||||
mMasterClear.showFinalConfirmation();
|
||||
final ArgumentCaptor<Intent> intent = ArgumentCaptor.forClass(Intent.class);
|
||||
|
||||
verify(context).startActivity(intent.capture());
|
||||
assertThat(intent.getValue().getBundleExtra(SettingsActivity.EXTRA_SHOW_FRAGMENT_ARGUMENTS)
|
||||
.getBoolean(MasterClear.ERASE_ESIMS_EXTRA, false))
|
||||
.isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testShowWipeEuicc_euiccDisabled() {
|
||||
prepareEuiccState(
|
||||
|
Reference in New Issue
Block a user