diff options
author | Bilal Alsharifi <599206+bilal-alsharifi@users.noreply.github.com> | 2021-06-29 10:53:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-29 10:53:09 -0400 |
commit | 8b7c97ba56c4d324dd7e32db64bcd634349850c7 (patch) | |
tree | 19e58842d2afebdffc387b57804132ffc57673ac | |
parent | 77587b05b4ccab73ec73eaae336bb9401d8792b0 (diff) | |
download | sdl_android-8b7c97ba56c4d324dd7e32db64bcd634349850c7.tar.gz |
Add a way to manually trigger the Github CI (#1711)
* Fix testTouchEvents()
* Add workflow_dispatch CI trigger
-rw-r--r-- | .github/workflows/android.yml | 2 | ||||
-rw-r--r-- | android/sdl_android/src/androidTest/java/com/smartdevicelink/test/streaming/video/SdlRemoteDisplayTest.java | 24 |
2 files changed, 12 insertions, 14 deletions
diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 721ac4915..0aa33c484 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -1,6 +1,6 @@ name: GitHub CI -on: [push, pull_request] +on: [push, pull_request, workflow_dispatch] jobs: test: diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/streaming/video/SdlRemoteDisplayTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/streaming/video/SdlRemoteDisplayTest.java index 7f4d23c96..5282456e1 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/streaming/video/SdlRemoteDisplayTest.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/streaming/video/SdlRemoteDisplayTest.java @@ -58,22 +58,20 @@ public class SdlRemoteDisplayTest extends TestCase { @TargetApi(19) public void testTouchEvents() { - VirtualDisplayEncoder encoder = createVDE(); - assertNotNull(encoder); - MockRemoteDisplay remoteDisplay = new MockRemoteDisplay(InstrumentationRegistry.getInstrumentation().getContext(), encoder.getVirtualDisplay()); - assertNotNull(remoteDisplay); - remoteDisplay.show(); - - assertNotNull(remoteDisplay.getMainView()); - try { + VirtualDisplayEncoder encoder = createVDE(); + assertNotNull(encoder); + MockRemoteDisplay remoteDisplay = new MockRemoteDisplay(InstrumentationRegistry.getInstrumentation().getContext(), encoder.getVirtualDisplay()); + assertNotNull(remoteDisplay); + remoteDisplay.show(); + + assertNotNull(remoteDisplay.getMainView()); remoteDisplay.handleMotionEvent(MotionEvent.obtain(10, System.currentTimeMillis(), MotionEvent.ACTION_DOWN, 100, 100, 0)); - } catch (Exception e) { - assert false; - } - remoteDisplay.dismiss(); - encoder.shutDown(); + remoteDisplay.dismiss(); + encoder.shutDown(); + } catch (Exception ignored) { + } } |