Skip to content

Commit 4628386

Browse files
HeniganHenigan
authored andcommitted
Code Review Changes
1 parent c88ee3b commit 4628386

2 files changed

Lines changed: 9 additions & 21 deletions

File tree

android/sdl_android/build.gradle

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,17 @@ dependencies {
4343
api fileTree(dir: 'libs', include: ['*.jar'])
4444
api 'com.smartdevicelink:bson_java_port:RC1_1.2.2'
4545
api 'com.livio.taskmaster:taskmaster:0.3.0'
46-
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.1.0'
46+
api 'androidx.lifecycle:lifecycle-extensions:2.2.0'
47+
api 'androidx.annotation:annotation:1.1.0'
48+
annotationProcessor 'androidx.lifecycle:lifecycle-compiler:2.2.0'
49+
4750
testImplementation 'junit:junit:4.12'
4851
testImplementation 'org.mockito:mockito-core:3.0.0'
4952
androidTestImplementation 'org.mockito:mockito-core:3.0.0'
5053
androidTestImplementation 'org.mockito:mockito-android:3.0.0'
5154
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
52-
api 'androidx.annotation:annotation:1.1.0'
53-
api 'androidx.lifecycle:lifecycle-extensions:2.2.0'
54-
annotationProcessor 'androidx.lifecycle:lifecycle-compiler:2.2.0'
55-
debugImplementation("androidx.test:core:1.3.0")
56-
debugImplementation("androidx.test:rules:1.3.0")
57-
debugImplementation("androidx.test:runner:1.3.0")
55+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
56+
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.1.0'
5857
}
5958

6059
buildscript {

android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/lockscreen/SDLLockScreenActivityEspressoTest.java

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,11 @@
4848
//They are ignored for CICD purposes and should be run manually during release testing
4949
@RunWith(AndroidJUnit4.class)
5050
@LargeTest
51-
@Ignore
51+
@Ignore //Remove this annotation before running these tests
5252
public class SDLLockScreenActivityEspressoTest {
5353

5454
private OnRPCNotificationListener onDDListener;
5555
private OnRPCNotificationListener onHMIListener;
56-
private OnRPCNotificationListener onSystemRequestListener;
5756

5857
@Rule
5958
public ActivityScenarioRule<SDLLockScreenActivity> activityRule =
@@ -199,9 +198,9 @@ public void onComplete(boolean success) {
199198
@Override
200199
public void run() {
201200
if (dismissEnabled) {
202-
onView(withText("Swipe down to dismiss, acknowledging that you are not the driver.")).check(matches(isDisplayed()));
201+
onView(withText(R.string.default_lockscreen_warning_message)).check(matches(isDisplayed()));
203202
} else {
204-
onView(withText("Locked for your safety")).check(matches(isDisplayed()));
203+
onView(withText(R.string.lockscreen_text)).check(matches(isDisplayed()));
205204
}
206205

207206
BroadcastReceiver receiver = new BroadcastReceiver() {
@@ -246,18 +245,8 @@ public Void answer(InvocationOnMock invocation) {
246245
}
247246
};
248247

249-
Answer<Void> onSystemRequestAnswer = new Answer<Void>() {
250-
@Override
251-
public Void answer(InvocationOnMock invocation) {
252-
Object[] args = invocation.getArguments();
253-
onSystemRequestListener = (OnRPCNotificationListener) args[1];
254-
return null;
255-
}
256-
};
257-
258248
doAnswer(onDDStatusAnswer).when(internalInterface).addOnRPCNotificationListener(eq(FunctionID.ON_DRIVER_DISTRACTION), any(OnRPCNotificationListener.class));
259249
doAnswer(onHMIStatusAnswer).when(internalInterface).addOnRPCNotificationListener(eq(FunctionID.ON_HMI_STATUS), any(OnRPCNotificationListener.class));
260-
doAnswer(onSystemRequestAnswer).when(internalInterface).addOnRPCNotificationListener(eq(FunctionID.ON_SYSTEM_REQUEST), any(OnRPCNotificationListener.class));
261250

262251
Context context = getInstrumentation().getContext();
263252

0 commit comments

Comments
 (0)