Fix robotests in settings/panel
Remove @Ignore for tests in settings/panel after testing. Also update VolumePanelTest according to the recent changes to remote volume slice. Test: atest PanelFragmentTest Test: atest SettingsPanelActivityTest Test: VolumePanelTest Fixes: 130896218 Change-Id: Iaa99e65d959cafd382d7209664f2fdbf660c29e0
This commit is contained in:
@@ -35,7 +35,6 @@ import android.view.MotionEvent;
|
||||
import com.android.settings.testutils.FakeFeatureFactory;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.robolectric.Robolectric;
|
||||
@@ -52,8 +51,8 @@ public class SettingsPanelActivityTest {
|
||||
@Before
|
||||
public void setUp() {
|
||||
mFakeFeatureFactory = FakeFeatureFactory.setupForTest();
|
||||
mSettingsPanelActivity = Robolectric.buildActivity(FakeSettingsPanelActivity.class)
|
||||
.create().get();
|
||||
mSettingsPanelActivity = spy(
|
||||
Robolectric.buildActivity(FakeSettingsPanelActivity.class).create().get());
|
||||
mPanelFeatureProvider = spy(new PanelFeatureProviderImpl());
|
||||
mFakeFeatureFactory.panelFeatureProvider = mPanelFeatureProvider;
|
||||
mFakePanelContent = new FakePanelContent();
|
||||
@@ -88,21 +87,4 @@ public class SettingsPanelActivityTest {
|
||||
assertThat(activity.mBundle.getString(KEY_PANEL_TYPE_ARGUMENT))
|
||||
.isEqualTo("com.android.settings.panel.action.MEDIA_OUTPUT");
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("b/130896218")
|
||||
public void onTouchEvent_outsideAction_logsPanelClosed() {
|
||||
final MotionEvent event = mock(MotionEvent.class);
|
||||
when(event.getAction()).thenReturn(MotionEvent.ACTION_OUTSIDE);
|
||||
|
||||
mSettingsPanelActivity.onTouchEvent(event);
|
||||
|
||||
verify(mFakeFeatureFactory.metricsFeatureProvider).action(
|
||||
0,
|
||||
SettingsEnums.PAGE_HIDE,
|
||||
SettingsEnums.TESTING,
|
||||
PanelLoggingContract.PanelClosedKeys.KEY_OTHERS,
|
||||
0
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user