From ec29931867f47c50e462b718f0cf45649f5a986d Mon Sep 17 00:00:00 2001 From: Joshua Trask Date: Wed, 1 Dec 2021 17:16:13 -0500 Subject: [PATCH] Un-@Ignore 7 passing ChooserActivity tests. Of 69 ChooserActivityTest cases, 22 are currently ignored, but should be restored in order to maximize coverage in preparation for the new unbundled implementation (but note that these tests are still only run against the "bundled" system chooser for now). Of the 22 ignored tests, 7 of them pass reliably and can be un-ignored immediately (although it's not known whether they were ignored for a reason other than failures/flakes). The remaining 15 will require some changes to the test and/or ChooserActivity code, to be investigated & completed in future CLs. Bug: 208803748 Test: `atest --iterations 100 ChooserActivityTest` (100 iterations ensures no regressions-to-flakiness.) Change-Id: Iede5835b429cccfd65fdc114397460fc00781a75 --- .../android/internal/app/ChooserActivityTest.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/tests/coretests/src/com/android/internal/app/ChooserActivityTest.java b/core/tests/coretests/src/com/android/internal/app/ChooserActivityTest.java index cfcbc7dec7d17..f8db060630388 100644 --- a/core/tests/coretests/src/com/android/internal/app/ChooserActivityTest.java +++ b/core/tests/coretests/src/com/android/internal/app/ChooserActivityTest.java @@ -269,7 +269,7 @@ public class ChooserActivityTest { onView(withId(R.id.content_preview_thumbnail)).check(matches(isDisplayed())); } - @Test @Ignore + @Test public void twoOptionsAndUserSelectsOne() throws InterruptedException { Intent sendIntent = createSendTextIntent(); List resolvedComponentInfos = createResolvedComponentsForTest(2); @@ -298,7 +298,7 @@ public class ChooserActivityTest { assertThat(chosen[0], is(toChoose)); } - @Test @Ignore + @Test public void fourOptionsStackedIntoOneTarget() throws InterruptedException { Intent sendIntent = createSendTextIntent(); @@ -351,7 +351,7 @@ public class ChooserActivityTest { } } - @Test @Ignore + @Test public void updateChooserCountsAndModelAfterUserSelection() throws InterruptedException { Intent sendIntent = createSendTextIntent(); List resolvedComponentInfos = createResolvedComponentsForTest(2); @@ -461,7 +461,7 @@ public class ChooserActivityTest { assertThat(chosen[0], is(toChoose)); } - @Test @Ignore + @Test public void hasOtherProfileTwoOptionsAndUserSelectsOne() throws Exception { // enable the work tab feature flag ResolverActivity.ENABLE_TABBED_VIEW = true; @@ -500,7 +500,7 @@ public class ChooserActivityTest { assertThat(chosen[0], is(toChoose)); } - @Test @Ignore + @Test public void hasLastChosenActivityAndOtherProfile() throws Exception { // enable the work tab feature flag ResolverActivity.ENABLE_TABBED_VIEW = true; @@ -1549,7 +1549,7 @@ public class ChooserActivityTest { assertThat(activity.getWorkListAdapter().getCount(), is(workProfileTargets)); } - @Test @Ignore + @Test public void testWorkTab_selectingWorkTabAppOpensAppInWorkProfile() throws InterruptedException { // enable the work tab feature flag ResolverActivity.ENABLE_TABBED_VIEW = true; @@ -1947,7 +1947,7 @@ public class ChooserActivityTest { .SharesheetTargetSelectedEvent.SHARESHEET_COPY_TARGET_SELECTED.getId())); } - @Test @Ignore + @Test public void testSwitchProfileLogging() throws InterruptedException { // enable the work tab feature flag ResolverActivity.ENABLE_TABBED_VIEW = true;