diff options
author | Andrew Lee <anwlee@google.com> | 2015-10-03 00:09:50 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-10-03 00:09:50 +0000 |
commit | aebebba874a0137ff8fdb280f87b047e49c0707b (patch) | |
tree | 0b22de3483f54dc0ddf2056845a6b0b1eb0903f5 /tests | |
parent | f375d2a8d7b22b2d404170cb7687b1c69359583c (diff) | |
parent | 7b127d43de0de29c27a9db19f0a7e792ac678c05 (diff) |
am 7b127d43: Prepatory CallDetailActivity tweaks.
* commit '7b127d43de0de29c27a9db19f0a7e792ac678c05':
Prepatory CallDetailActivity tweaks.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/com/android/dialer/CallDetailActivityTest.java | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/src/com/android/dialer/CallDetailActivityTest.java b/tests/src/com/android/dialer/CallDetailActivityTest.java index 27fbc304e..eda74742b 100644 --- a/tests/src/com/android/dialer/CallDetailActivityTest.java +++ b/tests/src/com/android/dialer/CallDetailActivityTest.java @@ -84,11 +84,9 @@ public class CallDetailActivityTest extends ActivityInstrumentationTestCase2<Cal } /** - * Test for bug where voicemails should not have remove-from-call-log entry. - * <p> - * See http://b/5054103. + * Verifies the trash menu item is present and a voicemail URI is set. */ - public void testVoicemailDoesNotHaveRemoveFromCallLog() throws Throwable { + public void testVoicemailDeleteButton() throws Throwable { setActivityIntentForTestVoicemailEntry(); startActivityUnderTest(); mFakeAsyncTaskExecutor.runTask(GET_CALL_DETAILS); @@ -96,12 +94,13 @@ public class CallDetailActivityTest extends ActivityInstrumentationTestCase2<Cal Menu optionsMenu = (new PopupMenu(mActivityUnderTest, null)).getMenu(); mActivityUnderTest.onCreateOptionsMenu(optionsMenu); mActivityUnderTest.onPrepareOptionsMenu(optionsMenu); - assertFalse(optionsMenu.findItem(R.id.menu_remove_from_call_log).isVisible()); - assertTrue(optionsMenu.findItem(R.id.menu_trash).isVisible()); + + assertTrue(optionsMenu.findItem(R.id.call_detail_delete_menu_item).isVisible()); + assertTrue(mActivityUnderTest.hasVoicemail()); } /** - * Test to check that I haven't broken the remove-from-call-log entry from regular calls. + * Verifies the trash menu item is present and a voicemail URI is not set. */ public void testRegularCallDoesHaveRemoveFromCallLog() throws Throwable { setActivityIntentForTestCallEntry(); @@ -111,8 +110,9 @@ public class CallDetailActivityTest extends ActivityInstrumentationTestCase2<Cal Menu optionsMenu = (new PopupMenu(mActivityUnderTest, null)).getMenu(); mActivityUnderTest.onCreateOptionsMenu(optionsMenu); mActivityUnderTest.onPrepareOptionsMenu(optionsMenu); - assertTrue(optionsMenu.findItem(R.id.menu_remove_from_call_log).isVisible()); - assertFalse(optionsMenu.findItem(R.id.menu_trash).isVisible()); + + assertTrue(optionsMenu.findItem(R.id.call_detail_delete_menu_item).isVisible()); + assertFalse(mActivityUnderTest.hasVoicemail()); } private void setActivityIntentForTestCallEntry() { |