Migration to AndroidX
- Update to API level 29
- Update Java sourcecode and xml import statements
- Upgrade Butterknife Version 10 AndroidX support
- Set Java 8 compile options due Butterknife needs it
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.
* Fixed tests to determine which Kodi version Kore is connected too.
This caused the long press tests to fail as Kore didn't see v17 as
the version that should use the new JSON RPC call.
* Refactored setting the Kodi version during testing to also set the
correct version in the database, instead of only setting it in the HostInfo
instance.
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.
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
* 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
* Fixed issue with selecting tabs
* Fixed issue with switching host on other thread than UI thread
* Fixed concurrent modification exception in JSONConnectionHandlerManager
* Fixed issue with drawer not closing
* Fixes issue with running method only supported on API 21 and higher
* 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.
* 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
This introduces the MVC model to details fragments. It moves as much
view and control code out of the concrete fragments into the abstract
classes.
* Added UML class and sequence diagrams under doc/diagrams to clarify
the new setup
* Introduces new abstract classes
* AbstractFragment class to hold the DataHolder
* AbstractInfoFragment class to display media information
* AbstractAddtionalInfoFragment class to allow *InfoFragments
to add additional UI elements and propagate refresh requests.
See for an example TVShowInfoFragment which adds
TVShowProgressFragment to display next episodes and season
progression.
* Introduces new RefreshItem class to encapsulate all refresh
functionality from AbstractDetailsFragment
* Introduces new SharedElementTransition utility class to encapsulate
all shared element transition code
* Introduces new CastFragment class to encapsulate all code for
displaying casts reducing code duplication
* Introduces DataHolder class to replace passing the ViewHolder from
the *ListFragment to the *DetailsFragment or *InfoFragment
* Refactored AbstractDetailsFragment into two classes:
o AbstractDetailsFragment: for fragments requiring a tab bar
o AbstractInfoFragment: for fragments showing media information
We used to use <NAME>DetailsFragments for both fragments that show
generic
info about some media item and fragments that hold all details for
some media item.
For example, artist details showed artist info and used tabs to
show artist albums and songs as well. Now Details fragments are
used to show all details, Info fragments only show media item
information like description, title, rating, etc.
* Moved swiperefreshlayout code from AbstractCursorListFragment to
AbstractListFragment
* Refactored MediaProviderMusicTest splitting it up into separate classes
* Updated integration tests for MediaProvider
* Added tests to check displayartist
* Added tests to check various artists albums
* Updated travis build to include running local tests for each PR
* Removed unused methods from Utils.java
* Moved all resources required by both local and instrumentation tests
to testUtils
* Added proguard rules for the test builds to prevent proguard from discarding
the junit classes
* Song lists for artist, album, and overall now shows the artist name for each individual song
* Added display artist column to songs table. This required a DB upgrade and users should
do a refresh for music items to be able to see the display artist in the song lists.
This applies the fix for issue #219 Incomplete libraries for movies and
TV shows.
For music items this was already fixed in PR #236
See commit 7330f85241
* Added perl tools to generate json files for music and movie data
* Upgraded build tools version, sdk compile version, and support libraries
as this is required by the test packages.
* Added new product flavor instrumentationTest to make sure assets and settings
required for testing do not also ship with a release version of Kore