diff options
author | Andrew Lee <anwlee@google.com> | 2015-10-01 14:54:38 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-10-01 14:54:38 +0000 |
commit | 958e5e0dead916658f016817ab750e1d4a4b676c (patch) | |
tree | dcfb9050ffa10fa0e5fd46ea3ccadbe13b8a7fbd /tests | |
parent | 26e2ae950debe64389564c7c88911adae3bcf47a (diff) | |
parent | 8332271b49c728e4faa95c2cfd224ce8fa2594fd (diff) |
Merge "Fix voicemail playback tests." into ub-contactsdialer-a-dev
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/com/android/dialer/voicemail/VoicemailPlaybackTest.java | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/src/com/android/dialer/voicemail/VoicemailPlaybackTest.java b/tests/src/com/android/dialer/voicemail/VoicemailPlaybackTest.java index 420a17cfd..3a74f7395 100644 --- a/tests/src/com/android/dialer/voicemail/VoicemailPlaybackTest.java +++ b/tests/src/com/android/dialer/voicemail/VoicemailPlaybackTest.java @@ -111,12 +111,9 @@ public class VoicemailPlaybackTest extends ActivityInstrumentationTestCase2<Call @Override public void run() { mPresenter.resumePlayback(); + assertStateTextContains("Loading voicemail"); } }); - mFakeAsyncTaskExecutor.runTask(CHECK_FOR_CONTENT); - getInstrumentation().waitForIdleSync(); - - assertStateTextContains("Loading voicemail"); } public void testWhenCheckForContentCompletes() throws Throwable { @@ -132,8 +129,7 @@ public class VoicemailPlaybackTest extends ActivityInstrumentationTestCase2<Call mFakeAsyncTaskExecutor.runTask(CHECK_FOR_CONTENT); getInstrumentation().waitForIdleSync(); - // Since the content is already fetched, don't show the loading message. - assertStateTextNotContains("Loading voicemail"); + assertStateTextContains("Loading voicemail"); } public void testInvalidVoicemailShowsErrorMessage() throws Throwable { @@ -232,12 +228,12 @@ public class VoicemailPlaybackTest extends ActivityInstrumentationTestCase2<Call } } - private void assertStateTextContains(String text) throws Throwable { + private void assertStateTextContains(String text) { assertNotNull(mLayout); assertTrue(mLayout.getStateText().contains(text)); } - private void assertStateTextNotContains(String text) throws Throwable { + private void assertStateTextNotContains(String text) { assertNotNull(mLayout); assertFalse(mLayout.getStateText().contains(text)); } |