8092 Commits

Author SHA1 Message Date
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
MohitMaliFtechiz
f590988eae Disabled CI on API level 24 and 30 to test the fixes immediately. 2024-03-20 01:16:38 +05:30
Kelson
d4a3db11ce
Merge pull request #3757 from kiwix/Fix#3756
Fixed: Migration of bookmarks is not working with recent versions of custom apps.
2024-03-19 20:27:19 +01:00
MohitMaliFtechiz
affa922004 Fixed: Migration of bookmarks is not working with recent versions of custom apps.
* Recent version of custom apps usages the `assetFileDescriptor` which does not have any path that's why migration is not working in these versions of custom apps. However, with apk version of custom apps migration is working fine. So to address this issue we have adjusted our code to work with assetFileDescriptor as well.
2024-03-19 12:15:40 +01:00
Kelson
09c6621802
Merge pull request #3752 from kiwix/Fix#3751
Fixed: [Bug] Diagnostic Report not doing anything.
2024-03-19 07:57:56 +01:00
MohitMaliFtechiz
2100d1ef8e Fixed: [Bug] Diagnostic Report not doing anything.
* Changed intent type from `vnd.android.cursor.dir/email` to `text/plain` to ensure compatibility with all applications.
* Now attaching a log file containing all details. WhatsApp has a limitation on message sharing, so if details are lengthy, they might get cut off. We ensure complete details by providing the log file attachment.
* * Improved `writeLogFile` method. Now we are deleting the directory from the storage if exist which contains the previously generated logs files, since we were deleting the existing file if any are present in the storage but our fileName contains the `currentTimeMillis` so this condition will never be true, and all the logs files are stored in that directory, which takes the memory in user device, so now we are removing those logs files directly and then generating the new one.
2024-03-14 18:53:12 +05:30
Kelson
f7a34c1b42
Merge pull request #3743 from kiwix/Fix#3741
Fixed: After restoring the tab it hides a few area of the article from the top.
2024-03-14 07:25:00 +01:00
MohitMaliFtechiz
060e41096e Fixed: After restoring the tab it hides a few area of the article from the top.
* It was showing with the top margin we have set in `TabsAdapter` for not showing the top margin in tabs, and `tempWebViewForUndo` saved with that margin, so when we are showing this in our reader, it was showing with that margin. So to fix this we are removing this margin from the `tempWebViewForUndo` if `tabSwitcher` is not showing, for properly showing the webView content. If the tab switcher is showing it will work as before.
* Used the `safelyAddWebView` method when we were selecting the tab as this method is doing the same that we are doing in `selectTab` method so to reduce duplicate code we used this method.
2024-03-14 07:24:22 +01:00
Kelson
341ce65f7b
Merge pull request #3748 from kiwix/Fix#3746
Fixed: ZIM file is not deleting from LocalLibraryFragment if we do not have the storage permission in non-playstore variant, which is fine but it should ask permission.
2024-03-14 07:24:01 +01:00
MohitMaliFtechiz
b680b1afce Fixed: ZIM file is not deleting from LocalLibraryFragment if we do not have the storage permission in non-playstore variant, which is fine but it should ask permission.
* Added permission check when selecting the ZIM file to delete or share, which fixes this problem.
2024-03-14 07:23:25 +01:00
Kelson
c9f7b89d66
Merge pull request #3745 from Sagar0-0/develop
[Fix]: Read aloud will stop on close tab
2024-03-14 07:23:00 +01:00
Sagar
749530650c #3740 Read aloud will stop in closed tab 2024-03-13 21:25:33 +05:30
Sagar
cdf4a01b7d #3740 Read aloud will stop in closed tab 2024-03-12 20:21:19 +05:30
Sagar
e9768c69a7
Merge branch 'kiwix:main' into develop 2024-03-12 12:35:32 +05:30
Sagar
a1a03b2d57 #3740 Read aloud will stop in closed tab 2024-03-12 12:34:45 +05:30
Kelson
08face55e1
Merge pull request #3735 from kiwix/Fix#3734
Fixed: PlayStore reported an error for Encyclopédie médicale WikiMed app.
2024-03-11 07:45:43 +01:00
MohitMaliFtechiz
4169a79eaf Fixed: PlayStore reported an error for Encyclopédie médicale WikiMed app.
* Fixed where restarting app was not working on Android 11 and above.
2024-03-11 07:44:48 +01:00
Kelson
b678e69e9d
Merge pull request #3721 from kiwix/Fix#1270
Fixed: Lint Issue - Unconditional Logging.
2024-03-11 07:37:42 +01:00
MohitMaliFtechiz
8828a8b917 Fixed: Lint Issue - Unconditional Logging.
* Re-enabled the `LogConditional` lint check.
* Introduced a `Log` class that exclusively handles logging operations in the debug variant.
* Removed unnecessary `if (BuildConfig.DEBUG)` conditions from the project.
2024-03-11 11:46:17 +05:30
Kelson
fd20568841
Merge pull request #3733 from kiwix/Fix#3732
Fixed: Test cases are frequently failing on API level 33.
2024-03-10 17:44:36 +01:00
MohitMaliFtechiz
10e1022865 Improved the LibkiwixBookmarkTest, we are now opening the Bookmark screen via the navigation drawer instead of long clicking on the bottom_toolbar_bookmark button because sometimes the screen scrolls down and this button hides and our test case fails on API level 33.
* Improved the NoteFragmentTest. Sometimes it didn't find the `overFlowOptionMenu` since we immediately clicked on that menu while opening the readerFragment, and sometimes this menu was not shown, because it was preparing its data to show.
2024-03-09 19:39:13 +05:30
MohitMaliFtechiz
9fb5adb37a Added an condition for checking if any system dialog is visible method to handle all the dialog shown by the system. 2024-03-09 19:39:05 +05:30
MohitMaliFtechiz
606bea4405 Improved our instrumentation.sh bash script, if our test fails then after restarting the emulator if our application is installed we clear its cache data so that test cases will perform properly. We have made this change to fix a scenario that comes locally after testing so many times where downloading is stuck due to lag of emulator.
* * Improved the LibkiwixBookmarkTest. In this, before performing the test case we are removing the existing bookmarks if any so that the saved bookmark will not go outside the screen(We faced an occurrence of this type locally).
* Improved the ZIM file path in many scenarios so that the created ZIM file will show in the LocalLibraryScreen and we can delete it so that we can free up the memory.
2024-03-09 19:38:58 +05:30
MohitMaliFtechiz
d5305b6856 Improved the SearchFragmentTest that are sometimes failing on API level 30. 2024-03-09 19:38:51 +05:30
MohitMaliFtechiz
afaf1a487a Improved DownloadTest, InitialDownloadTest and ZimHostFragmentTest.
* Remove all the ZIM files showing in the LocalLibrary screen before performing the test operation, this will free up the memory and unwanted behaviour like if the any other ZIM file already contains in this screen then it can affect our these test cases.
2024-03-09 19:38:44 +05:30
MohitMaliFtechiz
291a063747 Fixed: Test cases are frequently failing on API level 33.
* Refreshed the ZIM files list before deleting/checking for downloaded ZIM files in `DownloadTest` and `InitialDownloadTest` because sometimes data doesn't show on the `LocalLibraryScreen` after downloading the ZIM file, leading to test failures.
* Hiding the `Storage Restriction` dialog in `LibkiwixBookTest` and `MimeTypeTest` to not show this dialog in these test cases.
* Improved the temporary ZIM file path in `NoteFragmentTest` to properly display the ZIM file in the LocalLibrary screen so that it can be deleted in our test case.
* Enhanced the loading of ZIM files in `LocalLibraryTest`.
2024-03-09 19:38:35 +05:30
Kelson
28945412f3
Merge pull request #3720 from kiwix/translatewiki
Localisation updates from https://translatewiki.net.
2024-03-07 21:07:29 +01:00
translatewiki.net
4f5d66dbd7 Localisation updates from https://translatewiki.net. 2024-03-07 13:07:14 +01:00
Kelson
ec3d916508
Merge pull request #3713 from kiwix/Fix#3596
Added test cases for the search functionality.
2024-03-05 14:30:36 +01:00
MohitMaliFtechiz
49e7116781 Updated the ZIM file url for downloading the ZIM file.
* Refactored the search test according to this new ZIM file.
2024-03-05 13:47:04 +01:00
MohitMaliFtechiz
63acf5768a Added test cases for the search functionality.
* In this updated test case, we have addressed scenarios involving fast typing/deleting for search queries. Additionally, we implemented a test case where the user types with both short and long delays to ensure the following:
 1. Short delay: Properly tests the cancellation of the previously searching task.
 2. Long delay: Properly executes the search query letter by letter and ensures that there is no crash during the search.
* We are downloading the "stack exchange" ZIM file in our test case because this ZIM file yields many search results. Therefore, we download and perform all search operations on this file to simulate a real-world scenario, as our test ZIM file only contains three search results.
* The temporary ZIM file is deleted after performing the test to free up device storage.
2024-03-05 13:47:04 +01:00
Kelson
a1eae97278
Merge pull request #3729 from kiwix/Fix#3728
Fixed: The WiFi hotspot no longer starts automatically after granting notification permission in Android 13 and above.
2024-03-05 13:46:30 +01:00
MohitMaliFtechiz
b5c99ca583 Fixed: The WiFi hotspot no longer starts automatically after granting notification permission in Android 13 and above.
* We implemented the `registerForActivityResult` method to handle notification permission, ensuring the hotspot starts seamlessly upon permission grant.
* Improved the permission-asking scenario. Before it ask once for notification permission and at the second time it shows the custom dialog that shows why we need this permission. But we can ask permission twice in our application so we have improved the asking of permission. If the user denies this permission then we show the custom dialog with message why we need this permission.
2024-03-05 08:24:57 +01:00
Kelson
f483ff1392
Merge pull request #3725 from kiwix/Fix#2795
Fixed: [Bug] Pop-up Function does not work correctly (fails to automatically “detect” headword and show results).
2024-03-05 08:20:00 +01:00
MohitMaliFtechiz
0a8735cbb1 Fixed: [Bug] Pop-up Function does not work correctly (fails to automatically “detect” headword and show results).
* Fixed the scenario where "Search kiwix" on any text does not show the expected result. Because we were passing the activity's intent instead of the actual intent we are getting to open the search, which leads to unexpected results. So now we are passing the actual intent to process the request that fixes this issue.
*  Fixed one more scenario that occurred after placing this fix, where one more instance is created of the search screen because the activity has the intent with this type, and we are processing this intent in our `onViewCreated` for the scenario where our application launched(it is not running in the background). So when we close the search screen for then our `onViewCreated` method is called, and the activity has the intent so it creates one more search instance. So to fix this issue we are setting both intents as null after using them.
2024-03-05 08:19:28 +01:00
Kelson
a53e86e027
Merge pull request #3731 from kiwix/Fix#3730
Upgraded many dependencies of our project.
2024-03-05 08:18:01 +01:00
MohitMaliFtechiz
f2e44e02c4 Upgraded many dependencies of our project.
* Upgraded test cases and project dependencies.
* Refactor test cases and project code according to the new changes in dependencies.
2024-03-04 21:18:04 +05:30