Commit Graph

6 Commits

Author SHA1 Message Date
DoomMortal 5299e8e607 Migration Tests to AndroidX
Fix import statements to AndroidX
2020-04-26 19:13:07 +02:00
Martijn Brekhof f024c13ca5 Implemented UI tests for PlaylistFragment (#658) 2019-09-30 12:35:17 +01:00
Martijn Brekhof 3b2447607b Implemented support for handling multiple playlists in tests (#657)
Added support for handling multiple playlists in the Mock TCP server.
Refactored SlideUpPanelTests to support the new playlist handler.

Some code cleanup and enhancements
- Removed throw exception declarations from methods that never throw the exception.
- Changed deleting the test database on the test device to delete all databases.
  The former method of only deleting the test database resulted in many old databases
  that were not removed when the test run crashed.
- Enhanced robustness of testing async code by explicitly waiting for a view
  to reach a certain state.
2019-07-03 18:54:51 +01:00
Martijn Brekhof d1d8412654 Refactored unit tests (#643)
* Removed redundant configureHostInfo
  It was only used to set the Kodi backend version which is also
  set using setKodiMajorVersion.

* Removed unused annotations and throwables

* Improved robustness of SlideUpPanelTests
  Replaced explicit sleeps with the waitForView action.
  Fixed issue in waitForView action as it required the UI
  to be idle which is mostly not the case for the bottom
  panel with the progress indicator.

* Improved robustness of eventserver
  When eventserver handles a wrong payload this should not crash
  but simply show a log message and let the actual test fail.
2019-06-11 08:47:11 +01:00
Martijn Brekhof bdefeafc3b Implemented integration tests for the control pad (#476)
* Added two abstract methods setSharedPreferences and
     configureHostInfo to allow test classes extending
     AbstractTestClass to set preferences or change the host info.
   * Implemented a mock event server to test event server commands
   * Implemented a handler to handle JSON input events over HTTP
2017-10-24 19:36:38 +01:00
Martijn Brekhof dbd08c07aa Implemented unit/integration tests for the now playing panel (#420)
* Fixed issue with opening drawer and Espresso not waiting for
    when drawer was actually opened.
  * Implemented new handlers for MockTcpServer to test
    media control functions.
  * Decreased delay for sending reponses in MockTcpServer from
    1 sec to 100 ms. This was needed to prevent race conditions with
    the progress bar that increases automatically once per second.
2017-07-17 19:07:11 +01:00