summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenigan <rheniga1@MGC12Z921DLVCG.fbpld77.ford.com>2020-10-14 13:25:22 -0400
committerHenigan <rheniga1@MGC12Z921DLVCG.fbpld77.ford.com>2020-10-14 13:25:22 -0400
commit46283864ecf72d0f0b7622966133a94cca50170b (patch)
tree9e0ff75856fc91f50dcdaab6a04f9464e6a04df4
parentc88ee3bf8c6a176f2b696b49ba095476717bfea2 (diff)
downloadsdl_android-46283864ecf72d0f0b7622966133a94cca50170b.tar.gz
Code Review Changes
-rw-r--r--android/sdl_android/build.gradle13
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/lockscreen/SDLLockScreenActivityEspressoTest.java17
2 files changed, 9 insertions, 21 deletions
diff --git a/android/sdl_android/build.gradle b/android/sdl_android/build.gradle
index 15a36556d..c9f5ba246 100644
--- a/android/sdl_android/build.gradle
+++ b/android/sdl_android/build.gradle
@@ -43,18 +43,17 @@ dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])
api 'com.smartdevicelink:bson_java_port:RC1_1.2.2'
api 'com.livio.taskmaster:taskmaster:0.3.0'
- androidTestImplementation 'androidx.test.espresso:espresso-intents:3.1.0'
+ api 'androidx.lifecycle:lifecycle-extensions:2.2.0'
+ api 'androidx.annotation:annotation:1.1.0'
+ annotationProcessor 'androidx.lifecycle:lifecycle-compiler:2.2.0'
+
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:3.0.0'
androidTestImplementation 'org.mockito:mockito-core:3.0.0'
androidTestImplementation 'org.mockito:mockito-android:3.0.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
- api 'androidx.annotation:annotation:1.1.0'
- api 'androidx.lifecycle:lifecycle-extensions:2.2.0'
- annotationProcessor 'androidx.lifecycle:lifecycle-compiler:2.2.0'
- debugImplementation("androidx.test:core:1.3.0")
- debugImplementation("androidx.test:rules:1.3.0")
- debugImplementation("androidx.test:runner:1.3.0")
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
+ androidTestImplementation 'androidx.test.espresso:espresso-intents:3.1.0'
}
buildscript {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/lockscreen/SDLLockScreenActivityEspressoTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/lockscreen/SDLLockScreenActivityEspressoTest.java
index 73656dad9..264c4c741 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/lockscreen/SDLLockScreenActivityEspressoTest.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/lockscreen/SDLLockScreenActivityEspressoTest.java
@@ -48,12 +48,11 @@ import static org.mockito.Mockito.mock;
//They are ignored for CICD purposes and should be run manually during release testing
@RunWith(AndroidJUnit4.class)
@LargeTest
-@Ignore
+@Ignore //Remove this annotation before running these tests
public class SDLLockScreenActivityEspressoTest {
private OnRPCNotificationListener onDDListener;
private OnRPCNotificationListener onHMIListener;
- private OnRPCNotificationListener onSystemRequestListener;
@Rule
public ActivityScenarioRule<SDLLockScreenActivity> activityRule =
@@ -199,9 +198,9 @@ public class SDLLockScreenActivityEspressoTest {
@Override
public void run() {
if (dismissEnabled) {
- onView(withText("Swipe down to dismiss, acknowledging that you are not the driver.")).check(matches(isDisplayed()));
+ onView(withText(R.string.default_lockscreen_warning_message)).check(matches(isDisplayed()));
} else {
- onView(withText("Locked for your safety")).check(matches(isDisplayed()));
+ onView(withText(R.string.lockscreen_text)).check(matches(isDisplayed()));
}
BroadcastReceiver receiver = new BroadcastReceiver() {
@@ -246,18 +245,8 @@ public class SDLLockScreenActivityEspressoTest {
}
};
- Answer<Void> onSystemRequestAnswer = new Answer<Void>() {
- @Override
- public Void answer(InvocationOnMock invocation) {
- Object[] args = invocation.getArguments();
- onSystemRequestListener = (OnRPCNotificationListener) args[1];
- return null;
- }
- };
-
doAnswer(onDDStatusAnswer).when(internalInterface).addOnRPCNotificationListener(eq(FunctionID.ON_DRIVER_DISTRACTION), any(OnRPCNotificationListener.class));
doAnswer(onHMIStatusAnswer).when(internalInterface).addOnRPCNotificationListener(eq(FunctionID.ON_HMI_STATUS), any(OnRPCNotificationListener.class));
- doAnswer(onSystemRequestAnswer).when(internalInterface).addOnRPCNotificationListener(eq(FunctionID.ON_SYSTEM_REQUEST), any(OnRPCNotificationListener.class));
Context context = getInstrumentation().getContext();