7778 Commits

Author SHA1 Message Date
MohitMaliFtechiz
248dd79a27 Fixed allocate_buffer_size on CI.
* The allocated buffer size exceeded due to the retry policy of our test cases. When we retry a test, more objects are allocated to memory, causing this issue.
* When retrying a test case that failed initially, the "MANAGE_EXTERNAL_STORAGE" permission dialog appears on the window due to clearing the preferences in our test case. Therefore, we have removed that code from our test cases.
* Enhanced the test code to detect the views inside the dialogs since our test cases fail due to these dialog's views, which take a moment to appear on the window, making our test cases flaky on CI. This is also the reason for allocating more objects in memory when we retry the test case.
* Improved the `LocalFileTransferTest` as it sometimes fails on API level 33 due to the unavailability of WIFI. When WIFI is not available, the "Enable WIFI P2P" dialog appears on the window, causing our test case to fail. Subsequently, our RetryRule attempts to run this test case again, leading to the allocation of more objects in memory.
* Created a `testFlakyView` function this function is helpful in testing the flakyViews.
2024-04-12 16:57:08 +05:30
Kelson
a9f17432e4
Merge pull request #3782 from kiwix/Fix#3781
Fixed: Sometimes all the test cases crash on first time and some fail due to the navigation drawer being visible on the window. (Android 13).
2024-04-10 17:43:13 +02:00
MohitMaliFtechiz
94e02c3585 Fixed a few flaky test cases which sometimes fails on CI. 2024-04-10 19:02:36 +05:30
MohitMaliFtechiz
00580d5afa Increased ram, cores and heap-size for API level 30 emulator for better test performance.
* Improved test performance.
2024-04-10 19:02:25 +05:30
MohitMaliFtechiz
f90d92e1e4 Improved ObjectBoxToLibkiwixMigratorTest to not show the PlayStoreRestrictionDialog while running the other test cases, also removed the duplicate code from few test cases. 2024-04-10 19:02:07 +05:30
MohitMaliFtechiz
50ea34228e Improved the Refreshing data check for loading the ZIM files from phones storage.
* Improved the `LanguageFragmentTest` slightly to wait for the searched language to appear at the top of the list.
* Running the CI on `aosp_atd` instead of `google_apis`.
2024-04-10 19:01:51 +05:30
MohitMaliFtechiz
1a5575c800 Waiting until the scanning process is running before deleting the ZIM files in the local library screen since it takes a few seconds to load the ZIM files that are available in storage.
* Closing the tabs if visible in `NavigationHistoryTest`, since sometimes tabs are visible in this test case, and the test case does not find the views and fails.
2024-04-10 19:01:30 +05:30
MohitMaliFtechiz
82a82106cb Improved the closeSystemDialogs method since it was not closing the system dialogs on Android 11 and above. So we have improved this method to close the system dialogs on Android 11 and above by clicking on dialog's button instead of sending broadcast to system.
* Added wait before deleting the ZIM files in the local library screen since it takes a few seconds to load the ZIM files that are available in storage.
2024-04-10 19:01:21 +05:30
MohitMaliFtechiz
dfdbc1be35 Fixed: Sometimes all the test cases crash on first time and some fail due to the navigation drawer being visible on the window. (Android 13).
* We are clearing the data of application on 2nd and 3rd run, and the test cases are running normally so now we are clearing the application data on first run as well.
* Additionally, we've implemented drawer closure in `LanguageFragmentTest`, `LocalFileTransferTest`, and `NoteFragmentTest`. These tests sometimes encountered an open navigation drawer due to test failures or process crashes.
* Enhancements have been made to the `testShowCaseFeatureShowOnce` test case. It's now independent of other test cases, ensuring it remains unaffected in the event of a test process crash or failure.
2024-04-10 18:59:06 +05:30
Kelson
db10e1e7ba
Merge pull request #3777 from Sagar0-0/develop
#3764 Added ripple into FIND IN PAGE
2024-04-09 14:50:02 +02:00
Sagar
dad5e7a319 #3764 Added ripple into FIND IN PAGE 2024-04-08 23:57:42 +05:30
Sagar
75a7068a04 #3764 Added ripple into FIND IN PAGE 2024-04-05 17:18:48 +05:30
Sagar
6113822aaf #3764 Added ripple into FIND IN PAGE 2024-04-05 15:02:49 +05:30
Sagar
c3d1c72923
Merge branch 'kiwix:main' into develop 2024-04-05 15:02:19 +05:30
Kelson
0e8de98ebc
Merge pull request #3780 from kiwix/Fix#3779
Fixed: The wrong message appears while committing the code, if Lint/Static analysis has failed.
2024-04-04 07:18:14 +02:00
MohitMaliFtechiz
61f87f1b13 Fixed: The wrong message appears while committing the code, if Lint/Static analysis has failed.
* Refactored the error message to show the correct information to the developers, since our projects needs JDK11 to run so we have added this JDK version in error message. Also, corrected the gradle wrapper version in this message.
2024-04-04 07:17:51 +02:00
Kelson
18f7876f64
Merge pull request #3775 from kiwix/Fix#3774
Fixed: If restoring the tabs fails it shows the message in English language even if you are using the application in other languages.
2024-04-04 07:16:53 +02:00
MohitMaliFtechiz
2704c787aa Fixed: If restoring the tabs fails it shows the message in English language even if you are using the application in other languages.
* Fixed a static toast which is showing when there is an error in restoring the tabs. We have moved this static error message to our string file so that it will be translated in every language and user will see the error message in their own language.
2024-04-04 07:16:34 +02:00
Kelson
65bb979b51
Merge pull request #3778 from kiwix/Fix#3776
Added information about JDK configuration to the README file.
2024-04-04 07:16:13 +02:00
MohitMaliFtechiz
45be2860bb Added information about JDK configuration to the README file.
* Our project requires `Java 11` to run. Therefore, developers should set the `Gradle JDK` to `Java 11`. We have included this information in the `Build Instructions` section of the `README` file.
2024-04-04 07:16:03 +02:00
Kelson
f0af00b7f2
Merge pull request #3773 from kiwix/Fix#3647
Fixed: Spurious message: "Error: Loading article (Url: https://uploadwikimedia.org/wikipedia/commons/6/65/Lock-green.svg"
2024-04-04 07:14:04 +02:00
MohitMaliFtechiz
3820fee220 Fixed: Spurious message: "Error: Loading article (Url: https://upload.wikimedia.org/wikipedia/commons/6/65/Lock-green.svg"
* The error toast message is no longer displayed if a URL fails to load. Instead, a debug error message is logged.
* Restricting the loading of external resources when rendering the pages.
2024-04-04 07:13:46 +02:00
Kelson
fd9b39baa4
Merge pull request #3768 from kiwix/Fix#3755
Fixed: Processing of special characters / URL encoded links is not working as expected.
2024-04-04 07:13:03 +02:00
MohitMaliFtechiz
36d0c1193b Improved adding the query params in the URL only for those URLs that has the query params.
* Removing the URL decoding to verify whether the query string is present in the URL or not. This is because we only need to append the query string for URLs that contain "?", not for those containing "%3F" (indicating direct paths to ZIM entries). We decoded the URL to evaluate this condition, which inadvertently added "?" at the end of the URL unnecessarily. This is redundant as we extract the query string only after "?", and encoded URLs do not include "?".
* Added more test cases for all the scenarios.
2024-04-04 07:12:24 +02:00
MohitMaliFtechiz
4d29224881 Fixed: Processing of special characters / URL encoded links is not working as expected.
* Now our application is processing URL like kiwix-server.
* Added a test case for testing few scenarios of special characters/URL encoded.
2024-04-04 07:12:24 +02:00
Kelson
937876648f
Merge pull request #3771 from kiwix/Fix#3769
Fixed: Improved the creation of logDirectory on lower devices (Below Android 10).
2024-04-04 07:11:39 +02:00
MohitMaliFtechiz
47e371e5ba Fixed: Improved the creation of logDirectory on lower devices (Below Android 10).
* Efficiently creating the log file directory so that it will work on every Android version.
2024-04-02 16:52:45 +05:30
Sagar
43474734e4 #3764 Added ripple into FIND IN PAGE 2024-04-01 19:56:15 +05:30
Kelson
e623ca7d75
Merge pull request #3766 from kiwix/Fix#3765
Fixed: Bookmarks should show in new version of kiwix(`3.10.0`) even the bookmarks related files exist or not in fileSystem.
2024-03-23 14:25:08 +01:00
MohitMaliFtechiz
57dc7766d2 Fixed: Bookmarks should show in new version of kiwix(3.10.0) even the bookmarks related files exists or not in fileSystem.
* Adding the bookmarks in libkiwix even if the bookmark related files exists or not in fileSystem. This will ensure all the bookmarks will show on the bookmark screen, and it will improve the user experience.
* Implemented test cases to verify this functionality and to test the migration for new custom apps.
2024-03-22 17:13:32 +05:30
Kelson
c439e304b0
Merge pull request #3763 from kiwix/Fix#3762
Fixed: Opening ZIM file from history that does not exist in fileSystem leads to execpected UI behavior (When already a ZIM file opened in the reader).
2024-03-22 03:27:39 +01:00
MohitMaliFtechiz
677a481ef5 Fixed: Opening ZIM file from history that does not exist in fileSystem leads to execpected UI behavior (When already a ZIM file opened in the reader).
* The issue occurs because we are not opening the zim file in the reader because it does not exist in the fileSystem but we are loading the saved URL in webView of that file which does not exist. So when we are switching between fragments then we are opening the previously saved zim file but with the wrong URL which leads to this unexpected behavior. So to fix this we are closing the previously opened book if the new zim file does not exist in the fileSystem.
2024-03-22 03:27:22 +01:00
Kelson
a0a0558ee8
Merge pull request #3761 from kiwix/update_changelog_of_3.10.0
Updated CHANGELOG file for `3.10.0`.
2024-03-22 03:25:09 +01:00
MohitMaliFtechiz
5fe30554e7 Updated CHANGELOG file for 3.10.0. 2024-03-22 03:23:39 +01:00
Kelson
f32257462e
Merge pull request #3760 from kiwix/update_kiwix_version_to_3.10.0
Updated kiwix version to `3.10.0`.
2024-03-22 03:22:37 +01:00
MohitMaliFtechiz
cf6e2849fe Updated kiwix version to 3.10.0. 2024-03-22 03:21:58 +01:00
Kelson
d26c1d7daf
Merge pull request #3742 from kiwix/translatewiki
Localisation updates from https://translatewiki.net.
2024-03-21 13:26:54 +01:00
translatewiki.net
5d6ac2f48c Localisation updates from https://translatewiki.net. 2024-03-21 13:09:18 +01:00
Kelson
e220708710
Merge pull request #3758 from kiwix/Issue#2096
Fixed the CI on api level 33 and reduce the CI timing.
2024-03-20 15:53:16 +01:00
MohitMaliFtechiz
c120caacaa Re-enabled the CI on API level 24 and 30. 2024-03-20 11:34:46 +05:30
MohitMaliFtechiz
33799a1725 Improved KiwixReaderFragmentTest, since sometimes tabs become visible at startup which leads to the other test failures. 2024-03-20 02:17:46 +05:30
MohitMaliFtechiz
59cd4cffe3 Disabling animation on emulator since espresso sometimes giving error due to animation. 2024-03-20 01:17:55 +05:30
MohitMaliFtechiz
47b4d5bf62 Improved DownloadTest and InitialDownloadTest which sometimes failing due to file_management_no_files view not error.
* Improved ObjectBoxToLibkiwixMigratorTest which sometime crashed due to process crashing.
2024-03-20 01:17:43 +05:30
MohitMaliFtechiz
affecf72eb Improved the SearchFragmentTest. 2024-03-20 01:17:35 +05:30
MohitMaliFtechiz
4746e7b3cd Restricting the testDocumentProviderContentQuery and testExtractDocumentId test cases on API level 33. Since In this version, numerous security updates have been included, preventing us from modifying the default behavior of ContentResolver. 2024-03-20 01:17:27 +05:30
MohitMaliFtechiz
f6fc167595 Improved the ObjectBoxToLibkiwixMigratorTest test case, as it occasionally crashes during testing on API level 33 due to emulator lag on google_apis. The extensive data migration exacerbates the emulator's performance issues, leading to crashes during subsequent test processes. To address this issue, we have reduced the migration volume from 10K to 1K. Also, improved the ObjectBoxToLibkiwixMigratorTest. 2024-03-20 01:17:19 +05:30
MohitMaliFtechiz
aaafa97690 We are removing the ZimHostFragment test from the API level 33 because, most of the time, the emulator does not have WiFi service. Running this test on this emulator is not worthwhile, as we are testing this code on WiFi. 2024-03-20 01:17:11 +05:30
MohitMaliFtechiz
2e9d429099 Improved our ZimHostFragmentTest test to boost the test case speed. It was running in 2 minutes, but after this change, it now completes in 27 seconds. 2024-03-20 01:17:02 +05:30
MohitMaliFtechiz
7a0ab97b01 Improved ObjectBoxToLibkiwixMigratorTest for clearing the previous saved bookmarks.
* Refresh the data before checking the loaded data in DownloadTest.
* Increasing the Retry count for loading data and downloading start to properly work with low internet connection.
2024-03-20 01:16:55 +05:30
MohitMaliFtechiz
a0ef56205b Improved the deleting of zim files in localibrary, since we already pause for a second to check if the delete dialog is displayed or not, and again we are waiting before clicking on it. The same issue for while clicking on the PlayStoreRestrictionDialogTest where we are first waiting for the dialog to visible and then waiting for clicking on it. So we have removed the second wait since this dialog is displaying in both test cases.
* Improved the TopLevelDestinationTest. Because we were testing the drawer options fragments (Settings, Bookmarks etc) from the download screen and when we pressed the back button it came to the download screen and refreshed its data due to this our next functionality had to wait to finish this. Now we are testing all the navigation screens from the LocalLibraryScreen which makes this test case faster.
2024-03-20 01:16:44 +05:30