Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c8c551e0 authored by Debashish Chatterjee's avatar Debashish Chatterjee
Browse files

Fix suppressed CallDetailsActivityTest tests.

A recent change that marked voicemails as read when call details page is
opened broke callDetailsActivityTest because it used arbitrary fake
voicemail uri which never matched a valid content provider.

The offending tests were suppressed subsequently.

This change modifies the fake_uri to be built out of voicemail content
uri, but does not point to any real entry.

testVoicemailPlaybackRateDisplayedOnUi still fails due to an unrelated
change. This is still suppressed. Other tests have been unsupprressed.

Change-Id: Ie25a44f3cfc7263d9b127aa33f467a57eae07af7
parent 56e5db37
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import android.content.ContentValues;
import android.content.Intent;
import android.net.Uri;
import android.provider.CallLog;
import android.provider.VoicemailContract.Voicemails;
import android.test.ActivityInstrumentationTestCase2;
import android.test.suitebuilder.annotation.LargeTest;
import android.test.suitebuilder.annotation.Suppress;
@@ -42,7 +43,8 @@ import java.util.Locale;
 */
@LargeTest
public class CallDetailActivityTest extends ActivityInstrumentationTestCase2<CallDetailActivity> {
    private static final String FAKE_VOICEMAIL_URI_STRING = "content://fake_uri";
    private static final String FAKE_VOICEMAIL_URI_STRING = ContentUris.withAppendedId(
            Voicemails.CONTENT_URI, Integer.MAX_VALUE).toString();
    private Uri mUri;
    private IntegrationTestUtils mTestUtils;
    private LocaleTestUtils mLocaleTestUtils;
@@ -80,7 +82,6 @@ public class CallDetailActivityTest extends ActivityInstrumentationTestCase2<Cal
     * then click the play button (which just reported an error), then after that try to adjust the
     * rate.  See http://b/5047879.
     */
    @Suppress
    public void testClickIncreaseRateButtonWithInvalidVoicemailDoesNotCrash() throws Throwable {
        setActivityIntentForTestVoicemailEntry();
        Activity activity = getActivity();
@@ -89,7 +90,6 @@ public class CallDetailActivityTest extends ActivityInstrumentationTestCase2<Cal
    }

    /** Test for bug where missing Extras on intent used to start Activity causes NPE. */
    @Suppress
    public void testCallLogUriWithMissingExtrasShouldNotCauseNPE() throws Exception {
        setActivityIntentForTestCallEntry();
        getActivity();
@@ -100,7 +100,6 @@ public class CallDetailActivityTest extends ActivityInstrumentationTestCase2<Cal
     * <p>
     * See http://b/5054103.
     */
    @Suppress
    public void testVoicemailDoesNotHaveRemoveFromCallLog() throws Throwable {
        setActivityIntentForTestVoicemailEntry();
        CallDetailActivity activity = getActivity();