OSDN Git Service

WifiCallingSettingsForSubTest: Solve casting problem in setup
authorTorbjorn Eklund <torbjorn.eklund@sony.com>
Thu, 28 Mar 2019 12:18:47 +0000 (13:18 +0100)
committerTorbjorn Eklund <torbjorn.eklund@sony.com>
Mon, 1 Apr 2019 07:27:04 +0000 (07:27 +0000)
Solves casting problem in WifiCallingSettingsForSubTest that causes all
tests in this file to fail in the setup-function.

The wfc mode buttons has changed from being a ListPreference to be a
ListWithEntrySummaryPreference. The test cases have now been updated
accordingly.

Problem was introduced by the following two patches that conflict with
each other. The test cases in WifiCallingSettingsForSubTest works
correctly when each patch is tested in isolation, but failed when they
were both merged:
73ffcf49990ab3134b139607c0225f6ae1646c18
8498436a9613c806d4e1085074aea22f1a78675a

Bug: 129545431
Test: make RunSettingsRoboTests \
ROBOTEST_FILTER=WifiCallingSettingsForSubTest
Change-Id: Ib6988e514bbad2023ba6cfc2e1d8734b68cabc31

tests/robotests/src/com/android/settings/wifi/calling/WifiCallingSettingsForSubTest.java

index fbdc303..8f01d39 100644 (file)
@@ -92,8 +92,8 @@ public class WifiCallingSettingsForSubTest {
     @Mock private ToggleSwitch mToggleSwitch;
     @Mock private View mView;
     @Mock private ImsConfig mImsConfig;
-    @Mock private ListPreference mButtonWfcMode;
-    @Mock private ListPreference mButtonWfcRoamingMode;
+    @Mock private ListWithEntrySummaryPreference mButtonWfcMode;
+    @Mock private ListWithEntrySummaryPreference mButtonWfcRoamingMode;
     @Mock private Preference mUpdateAddress;
 
     @Before