diff options
author | Suryanarayana Mudunuri <smudunuri@google.com> | 2022-06-23 11:28:05 -0700 |
---|---|---|
committer | Suryanarayana Mudunuri <smudunuri@google.com> | 2022-06-23 20:20:44 +0000 |
commit | b49ece63226b4854b54581d04d2d9777f44868b1 (patch) | |
tree | 32d02cfe9b2cbb2a4bbd7f4c91ff6f878a974a59 /android-uitests | |
parent | 9eed766b8680abf77764719eb0e6092321bc777c (diff) | |
download | idea-b49ece63226b4854b54581d04d2d9777f44868b1.tar.gz |
Fix flaky issue in the UI tests
Enabling the InstantApp is triggering a new sync on the project. Adding a extra wait to verify project sync is completed before proceeding with the further actions to verify the project make and build.
Bug:236971209
Test: BuildInstantAppTest - https://fusion2.corp.google.com/invocations/6d0a5bd9-93fa-44c3-86a6-5e1573dad0de
Change-Id: I42f98804a25b42c3121d0140f0171edf773805f1
Diffstat (limited to 'android-uitests')
-rw-r--r-- | android-uitests/testSrc/com/android/tools/idea/tests/gui/instantapp/BuildInstantAppTest.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/android-uitests/testSrc/com/android/tools/idea/tests/gui/instantapp/BuildInstantAppTest.java b/android-uitests/testSrc/com/android/tools/idea/tests/gui/instantapp/BuildInstantAppTest.java index 7c5de081ccb..abf445eaede 100644 --- a/android-uitests/testSrc/com/android/tools/idea/tests/gui/instantapp/BuildInstantAppTest.java +++ b/android-uitests/testSrc/com/android/tools/idea/tests/gui/instantapp/BuildInstantAppTest.java @@ -58,9 +58,11 @@ public class BuildInstantAppTest { ideFrame.getProjectView() .selectAndroidPane() .clickPath("app") - .openFromMenu(EnableInstantAppSupportDialogFixture::find, "Refactor", "Enable Instant Apps Support...") - .clickOk(); - guiTest.robot().waitForIdle(); + .invokeMenuPath("Refactor", "Enable Instant Apps Support..."); + + ideFrame.actAndWaitForGradleProjectSyncToFinish( + it -> EnableInstantAppSupportDialogFixture.find(ideFrame).clickOk()); + assertThat(guiTest.ideFrame().invokeProjectMake().isBuildSuccessful()).isTrue(); ideFrame.invokeMenuPath("Run", "Edit Configurations..."); |