Commit Graph

6 Commits

Author SHA1 Message Date
Martijn Brekhof c44a5f0612 Fixed test setup
* Reverted gradle plugin upgrade to prevent forcing users to
  upgrade to Android Studio 4 preview version.
* Refactored TVShowsActivityTests into using the AndroidX libs.
* Updated test setup to handle saving tab state in abstract list fragment.
2020-04-26 19:13:07 +02: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 d634d9455e Refactored instrumentation tests to support RecyclerViews
* Fixed Espresso not waiting on ViewPager switching
* Removed BaseMediaActivityTests abstract class.
  Unfortunately the click action on list items now requires
  a unique item to be able to select the item to click.
  Therefore the tests from BaseMediaActivityTests have been
  moved to the specific test classes. This made the
  BaseMediaActivityTests class obsolete.
* Removed dependency on Context class in AddonsHandler and inlined
  the json data to allow the AddonsHandler to be initialized before
  the test activity is started. This was needed to have the
  AddonsActivityTests directly start the AddonsActivity, instead of
  first starting MoviesActivity and from there start the AddonsActivity.
2018-09-09 14:09:59 +01:00
Martijn Brekhof ff67880999 Fixed issue testing TVShowActivity (#528)
As we now use a nested scroll view the tests for TV shows all
failed because the scroll action was performed on a normal scroll
view only. This has simply been fixed by implementing a custom action
that also accepts a nested scroll view.
2018-04-06 19:13:14 +01:00
Martijn Brekhof 2ed968456a Upgraded butterknife to 8.8.1 (#524)
Refactored MusicListFragment and PVRListFragment to use AbstractTabsFragment
Fixed scrolling in a nested scroll view using espresso
Fixed issue with setting and checking Kodi major version
2018-04-05 18:22:20 +01:00
Martijn Brekhof 1cb77876be Implemented testing actionbar state (#382)
* Added JSON datafiles for TV shows and music videos
   * Implemented instrumentations tests for MoviesActivity, MusicActivity,
     TVShowActivity, and AddonsActivity.
   * Moved RestoreSearchQueryViewPagerTest to music package as it uses
     the MusicActivity
   * Moved RestoreSearchQueryListFragmentTest to movies packages as it
     uses the MoviesActivity
   * Added scripts to get JSON data for music videos, addons, and TV shows
   * Added sequence diagram for BaseMediaActivity to clarify new setup
   * Refactored BaseMediaActivity to comply with diagram
   * Refactored SyncMusicVideos and SyncTVShows so we can use the same code
     for adding test data as we use for adding real data.
   * Removed unused StringBuffer and synchronize block in MockTcpServer
2017-04-29 16:08:15 +01:00