mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 18:56:44 -04:00

Once we are happy with using Spoon we can add code that automatically takes a screenshot when tests fail. This may help us debug some of the problems we encounter running the tests on various devices. Using Spoon exposed a limitation/key behaviour of ActivityTestRule that references the intended Activity under test. To account for this behaviour I restructured DownloadTest so it simply tests the download, rather than reading the contents of the file. I also discovered that the tests would fail on wide-screens as the Home menu option moves from the overflow menu to the main menu. I've modified one test to cope. Again, once we're happy with this approach (which involves a little extra code) we can revise all the tests so they can run equally competently on various screen sizes.