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.
* 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.
* 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.
During tests, activities were not closed properly causing increasing
memory usage, which resulted in failing tests because of
out of memory errors.
This has been fixed by using the test orchestrator which runs
each test in its own instrumentation instance.
Removed the instrumentationTest flavor and replaced it by using the
default debug build type. The flavor was used to keep the required
permissions during testing separate from release versions. This can
also be accomplished using the debug build type.
The PagerSlidingTabStrip from astuetz doesn't work with the new
android build tools. As the project seems dead, I replaced it with
PagerTabStrip from the support library.