1656 Commits

Author SHA1 Message Date
Isaac Hutt
46727a98a5
Update README.md 2017-11-28 00:56:31 +00:00
mhutti1
94c79b5830 Disable jni mocking temporarily 2017-11-27 20:16:25 +00:00
Isaac Hutt
c74a488b76 Update build.gradle 2017-11-27 00:04:55 +00:00
mhutti1
924cb73a85 Update gradle config 2017-11-27 00:04:55 +00:00
mhutti1
afaa1ab727 Fix small Zim manager issues 2017-11-26 20:14:27 +00:00
mhutti1
6aebb7356b Wipe book database on this update 2017-11-09 19:20:27 +00:00
Kelson
2ded689524 Merge pull request #278 from kiwix/julianharty/fix_contributors
Fixed my typo in my email address (oops)
2017-10-09 21:41:28 +02:00
Julian Harty
462d6c1fe7 Fixed my typo in my email address (oops) 2017-10-09 20:25:34 +01:00
Emmanuel Engelhart
6c9cc433a5 UI strings update 2017-10-05 15:37:18 +01:00
mhutti1
ebf995b3f7 Move download completion logic to onComplete subscription 2017-10-05 15:07:56 +01:00
mhutti1
d214ff9450 Bump kiwixlib version 2017-10-05 14:45:59 +01:00
Julian Harty
b3ff110314 Adding Joe and Julian as contributors. 2017-10-04 14:32:44 +01:00
Julian Harty
86f0da12c6 Added limited (basic) Http request and response logging to augment the
current logging used in the DownloadService. Hopefully the extra log
messages will help us debug problems when tests fail, particularly
remotely e.g. on BitBar's TestDroid service.

The logs are local to the device and don't contain any sensitive
additional information. The extra information helps diagnose
network issues when they occur during testing.
2017-10-04 14:05:57 +01:00
Kelson
09f9ab8d45 Merge pull request #269 from kiwix/video_night-mode
Fix night-mode for videos #266
2017-10-04 09:39:33 +02:00
Emmanuel Engelhart
3ea91e3173 Fix night-mode for videos #266 2017-10-01 14:33:18 +02:00
Julian Harty
1d1691cd55 I was irked by having a compile dependency on a testing library.
Addressing the cause took several hours, it seemed to be there to
address other side-effects. In the end I discovered we had incompatible
library versions which weren't reconciled by Gradle unless the
extraneous dependency was there.

The error was described in
https://sites.google.com/a/android.com/tools/tech-docs/new-build-system/user-guide#TOC-Resolving-conflicts-between-main-and-test-APK

The resolution was to align the version numbers for various Android
support libraries to a common value: 25.4.0 for now although there are
newer versions so we might want to migrate to the current releases soon.
I applied the concepts others use, which is to specify the version once
and use it throughout, see
https://segunfamisa.com/posts/android-gradle-extra-properties for a
concise example.

For info on the latest support and testing libraries see
https://developer.android.com/topic/libraries/support-library/revisions.html

https://developer.android.com/topic/libraries/testing-support-library/release-notes.html

We might also want to update our builds to the latest release of
Espresso.
2017-09-22 16:53:27 +04:00
Joseph Reeve
37fabe1bc3 A few changes as per Julian's comments 2017-09-22 15:15:12 +04:00
Joseph Reeve
1fda455f88 Added some logging 2017-09-22 15:15:12 +04:00
Matthieu Gautier
61ec22a88b Support absolute path when specifying zim_file in info.json for custom app.
Test if the zim_file path is existing. If yes, it is used as it is.

If not, we assume it is a local path relative to the custom directory
(as before).
2017-09-05 14:35:23 +01:00
Kelson
f3e7ec90da Merge pull request #256 from kiwix/CONTRIBUTING.md
First version of CONTRIBUTING.md
2017-08-31 08:11:07 +02:00
kelson42
7f72b2480b Fix first link 2017-08-31 07:58:00 +02:00
kelson42
ae5516d8ae First version of CONTRIBUTING.md 2017-08-31 07:58:00 +02:00
Julian Harty
7d677f34d1 Removed unnecessary imports. 2017-08-30 13:01:01 +03:00
Julian Harty
ad660920b5 The main change is to add support for Spoon to take screenshots.
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.
2017-08-30 13:01:01 +03:00
Joseph Reeve
5b93fae272 Added a TODO 2017-08-25 19:21:15 +01:00
Joseph Reeve
e787105961 A few more minor logging changes 2017-08-25 19:21:15 +01:00
Joseph Reeve
0fa2d4e66c Minor logging changes 2017-08-25 19:21:15 +01:00
Julian Harty
9350a1cdbb Thanks to an answer to my question on StackOverflow, learned to use @SdkSuppress which
works well.
2017-08-24 20:38:40 +01:00
Julian Harty
dde6c77aab Establish a baseline for improving the automated Espresso tests.
Javscript-Bridge tests don't pass on pre-KITKAT, probably as the runtime
predates the Google Chrome engine added in KITKAT. I've implemented a
way to 'pass' the test for now, in future I hope to be able to control
which tests run at runtime.

Android Test Support Library 1.0 adds the ability to approve permissions
as part of the test. I've implemented two calls to apply the
permissions; it's hard to tell if these work especially as the dialog
still appears in the GUI on my Galaxy S6 running Android 6.0.1 however
the tests generally complete OK and the app does have access to the
SDCARD to read and write as far as I can tell. We may want to revisit
the application logic that asks-for and checks the permissions at some
point.

I needed to update the versions of Espresso and several testing
libraries. These exposed a problem which has been addressed in the app's
build.gradle. With future releases of the libraries and/or the Android
testing frameworks this workaround might not be needed in future.
2017-08-24 15:17:19 +01:00
Julian Harty
3e84659549 Replaced chuck with chunk in this code. A minor change. 2017-08-23 15:11:53 +01:00
mhutti1
1975a7c2f3 Basic deeplinking 2017-08-20 16:07:12 -04:00
Julian Harty
5a7bcfbc98 Added guard code as sometimes the error message is null. 2017-08-17 16:51:56 -04:00
Julian Harty
e28a04542f Added two build variants to help us control the scope of our testing of
network operations. This is the initial skeleton that proves the
approach can work. Future work will enable us to control whether to
fully mock network operatins, have a local download server, or use the
public kiwix download server.
2017-08-17 16:51:56 -04:00
Isaac Hutt
aced181a3e Update and rename README to README.md 2017-08-17 09:15:51 -04:00
mhutti1
956272811e Some work on Download Service 2017-08-16 13:12:21 -04:00
Julian Harty
8629e78511 Fixed a hard to find quirk where the tests ran on devices that don't
have a hardware menu key, but failed on those that did. Espresso
contains two similar calls to launch the menu. Either are OK on devices
that don't have a menu key (the vast majority of devices) so this bug
was latent until I tested on a wider mix of devices.

See
https://developer.android.com/training/testing/espresso/recipes.html#matching-view-inside-action-bar
and keep reading until you reach the example for "contextual action
bar".

See also https://github.com/kiwix/kiwix-android/issues/213 for the
historical context where this problem was initially exposed. It took
working with Isaac in person for us to discover the cause.
2017-08-15 16:48:08 -04:00
mhutti1
45d9e2a730 Default and remove preference for fulltext search 2017-08-15 11:54:49 -04:00
Julian Harty
b9c009a2e0 We now inject the network state so that the rest of the test is able to
run. See https://github.com/kiwix/kiwix-android/issues/227 for more
detail.
2017-08-15 11:00:04 -04:00
Kelson
58ebdce8ab Merge pull request #231 from kiwix/2.3_changelog
Changelog 2.3 update
2017-08-13 14:05:17 -04:00
Isaac Hutt
e7ca257305 Update CHANGELOG 2017-08-13 12:01:20 -04:00
Kelson
e8ee618257 Changelog 2.3 update 2017-08-13 17:54:21 +02:00
Isaac Hutt
7eeeb983c2 Merge pull request #230 from kiwix/mhutti1/crashfixes
Set vanilla version code/name from properties if possible
2017-08-12 16:44:01 -04:00
mhutti1
290f62f54e Set vanilla version code/name from properties if possible 2017-08-12 16:32:49 -04:00
Isaac Hutt
19f39ac069 Merge pull request #229 from kiwix/mhutti1/crashfixes
Download service is correctly restared on crash
2017-08-12 16:13:46 -04:00
mhutti1
a4e13b591b Download service is correctly restared on crash 2017-08-12 16:00:48 -04:00
Isaac Hutt
8a3fa8153a Merge pull request #228 from kiwix/bottombar
Added bottombar as optional feature #165
2017-08-10 11:00:38 -04:00
Isaac Hutt
3f1bb11876 Merge branch 'master' into bottombar 2017-08-10 10:16:27 -04:00
mhutti1
de7445f75c Add bottombar to settings menu 2017-08-10 09:57:39 -04:00
mhutti1
709aa86d16 Hide bottombar in fullscreen 2017-08-09 19:24:18 -04:00
mhutti1
9d8a8dc404 Bottom bar scrolls out of view when in scroll mode 2017-08-09 15:21:00 -04:00