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

Commit cbbe83d6 authored by Ben Reich's avatar Ben Reich
Browse files

Convert IntegratedDownloadsUiTest to Junit 4

This class isn't being ran at the moment. Let's convert it first and
revisit it once all files have been converted. This migrates usages of
Suppress to Ignore as well.

Bug: 407646510
Test: NONE
Flag: EXEMPT test change
Change-Id: I15e1cba269108d46ee85a234203d20bf0eab9811
parent 69c54cf6
Loading
Loading
Loading
Loading
+10 −8
Original line number Original line Diff line number Diff line
@@ -16,6 +16,8 @@


package com.android.documentsui;
package com.android.documentsui;


import static org.junit.Assert.assertTrue;

import android.app.DownloadManager;
import android.app.DownloadManager;
import android.app.DownloadManager.Request;
import android.app.DownloadManager.Request;
import android.content.Context;
import android.content.Context;
@@ -23,23 +25,22 @@ import android.net.Uri;
import android.view.MotionEvent;
import android.view.MotionEvent;


import androidx.test.filters.LargeTest;
import androidx.test.filters.LargeTest;
import androidx.test.filters.Suppress;
import androidx.test.uiautomator.Configurator;
import androidx.test.uiautomator.Configurator;
import androidx.test.uiautomator.UiObject;
import androidx.test.uiautomator.UiObject;


import com.android.documentsui.files.FilesActivity;
import com.android.documentsui.files.FilesActivity;


import org.junit.Ignore;
import org.junit.Test;

// TODO: As of this writing all tests in this class are disabled. Please fix.
// TODO: As of this writing all tests in this class are disabled. Please fix.
@LargeTest
@LargeTest
public class IntegratedDownloadsUiTest extends ActivityTest<FilesActivity> {
public class IntegratedDownloadsUiTest extends ActivityTestJunit4<FilesActivity> {

    public IntegratedDownloadsUiTest() {
        super(FilesActivity.class);
    }


    // We don't really need to test the entirety of download support
    // We don't really need to test the entirety of download support
    // since downloads is (almost) just another provider.
    // since downloads is (almost) just another provider.
    @Suppress
    @Ignore
    @Test
    public void testDownload_Queued() throws Exception {
    public void testDownload_Queued() throws Exception {
        DownloadManager dm = (DownloadManager) context.getSystemService(
        DownloadManager dm = (DownloadManager) context.getSystemService(
                Context.DOWNLOAD_SERVICE);
                Context.DOWNLOAD_SERVICE);
@@ -51,7 +52,8 @@ public class IntegratedDownloadsUiTest extends ActivityTest<FilesActivity> {
        bots.directory.assertDocumentsPresent("Queued");
        bots.directory.assertDocumentsPresent("Queued");
    }
    }


    @Suppress
    @Ignore
    @Test
    public void testDownload_RetryUnsuccessful() throws Exception {
    public void testDownload_RetryUnsuccessful() throws Exception {
        DownloadManager dm = (DownloadManager) context.getSystemService(
        DownloadManager dm = (DownloadManager) context.getSystemService(
                Context.DOWNLOAD_SERVICE);
                Context.DOWNLOAD_SERVICE);