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

Commit 0c6da98e authored by Zemiao Zhu's avatar Zemiao Zhu
Browse files

Deflake ActionCreateDocumentUiTest.

Bug: 157092101
Test: atest DocumentsUIGoogleTests:com.android.documentsui.ActionCreateDocumentUiTest
Change-Id: I38b2907b2ab321765b5cdaded850d12654c95fa7
parent ddab748e
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -57,15 +57,16 @@ public class ActionCreateDocumentUiTest {
    private Context mTargetContext;
    private Context mContext;
    private Bots mBots;
    private UiDevice mDevice;

    @Before
    public void setup() {
        UiDevice device = UiDevice.getInstance(getInstrumentation());
        UiAutomation automation = getInstrumentation().getUiAutomation();

        mDevice = UiDevice.getInstance(getInstrumentation());
        mTargetContext = getInstrumentation().getTargetContext();
        mContext = getInstrumentation().getContext();
        mBots = new Bots(device, automation, mTargetContext, 5000);
        mBots = new Bots(mDevice, automation, mTargetContext, 5000);
    }

    @Test
@@ -84,6 +85,7 @@ public class ActionCreateDocumentUiTest {

        mBots.main.setDialogText(fileName);
        mBots.main.clickSaveButton();
        mDevice.waitForIdle();

        Instrumentation.ActivityResult activityResult = mRule.getActivityResult();