Fix robo test case failed
Bug: 300134365 Test: robotest Change-Id: I144fbbc962a479c97312cee1645c5a3d70351542
This commit is contained in:
@@ -22,12 +22,9 @@ import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.preference.PreferenceViewHolder;
|
||||
|
||||
import com.android.settings.R;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -58,17 +55,6 @@ public class SettingsMainSwitchPreferenceTest {
|
||||
mHolder = PreferenceViewHolder.createInstanceForTests(rootView);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void onBindViewHolder_isRestricted_restrictIconShouldDisplay() {
|
||||
mPreference.onBindViewHolder(mHolder);
|
||||
|
||||
final SettingsMainSwitchBar switchBar = mPreference.getSwitchBar();
|
||||
final ImageView restrictedIcon = switchBar.findViewById(
|
||||
com.android.settingslib.widget.restricted.R.id.restricted_icon);
|
||||
|
||||
assertThat(restrictedIcon.getVisibility() == View.VISIBLE).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void show_preferenceShouldDisplay() {
|
||||
mPreference.show();
|
||||
|
||||
Reference in New Issue
Block a user