|
48 | 48 | //They are ignored for CICD purposes and should be run manually during release testing |
49 | 49 | @RunWith(AndroidJUnit4.class) |
50 | 50 | @LargeTest |
51 | | -@Ignore |
| 51 | +@Ignore //Remove this annotation before running these tests |
52 | 52 | public class SDLLockScreenActivityEspressoTest { |
53 | 53 |
|
54 | 54 | private OnRPCNotificationListener onDDListener; |
55 | 55 | private OnRPCNotificationListener onHMIListener; |
56 | | - private OnRPCNotificationListener onSystemRequestListener; |
57 | 56 |
|
58 | 57 | @Rule |
59 | 58 | public ActivityScenarioRule<SDLLockScreenActivity> activityRule = |
@@ -199,9 +198,9 @@ public void onComplete(boolean success) { |
199 | 198 | @Override |
200 | 199 | public void run() { |
201 | 200 | 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())); |
203 | 202 | } else { |
204 | | - onView(withText("Locked for your safety")).check(matches(isDisplayed())); |
| 203 | + onView(withText(R.string.lockscreen_text)).check(matches(isDisplayed())); |
205 | 204 | } |
206 | 205 |
|
207 | 206 | BroadcastReceiver receiver = new BroadcastReceiver() { |
@@ -246,18 +245,8 @@ public Void answer(InvocationOnMock invocation) { |
246 | 245 | } |
247 | 246 | }; |
248 | 247 |
|
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 | | - |
258 | 248 | doAnswer(onDDStatusAnswer).when(internalInterface).addOnRPCNotificationListener(eq(FunctionID.ON_DRIVER_DISTRACTION), any(OnRPCNotificationListener.class)); |
259 | 249 | 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)); |
261 | 250 |
|
262 | 251 | Context context = getInstrumentation().getContext(); |
263 | 252 |
|
|
0 commit comments