Clean up instrumentation tests

- Fixed some important tests
- Deleted some useless tests
- Some tests are still broken, filed bugs for these

Fixes: 124572765
Test: atest
Change-Id: Iac4e6a1fb1dbf9383d91945525df69a651ae77fd
This commit is contained in:
Fan Zhang
2019-02-25 16:05:36 -08:00
parent aef472d0ca
commit 0047944c2e
24 changed files with 4 additions and 1562 deletions

View File

@@ -30,6 +30,7 @@ import static org.hamcrest.Matchers.allOf;
import android.app.Instrumentation;
import android.os.Bundle;
import android.provider.Settings;
import android.widget.CompoundButton;
@@ -63,14 +64,6 @@ public class AccessibilityShortcutPreferenceFragmentTest {
mActivity = mActivityRule.getActivity();
}
@Test
public void lockScreenPreference_defaultBeforeDialogShown_isOff() {
setDialogShown(false);
setOnLockscreen(null);
startFragment();
assertLockscreenSwitchIsCheckedIs(false);
}
@Test
public void lockScreenPreference_setOnBeforeDialogShown_isOn() {
setDialogShown(false);
@@ -87,14 +80,6 @@ public class AccessibilityShortcutPreferenceFragmentTest {
assertLockscreenSwitchIsCheckedIs(true);
}
@Test
public void lockScreenPreference_setOffAfterDialogShown_isOn() {
setDialogShown(true);
setOnLockscreen(false);
startFragment();
assertLockscreenSwitchIsCheckedIs(false);
}
private void startFragment() {
mInstrumentation.runOnMainSync(() -> {
new SubSettingLauncher(mActivity)