2940 Commits

Author SHA1 Message Date
MohitMaliFtechiz
0613d36ab9 Added KiwixRoomDatabaseTest, ObjectBoxToRoomMigratorTest, RecentSearchRoomDaoTest for testing all the scenarios of migration and saving the recent searches in room database.
* Improved the SaveSearchToRecentsTest.
* Removed unused code from project.
2024-05-29 14:36:59 +05:30
MohitMaliFtechiz
1e632d0412 Fixed flaky SearchFragmentTest that occasionally fails due to search_src_text not found error. 2024-05-28 17:58:19 +05:30
MohitMaliFtechiz
489e1f2c4f Fixed: Broken fullscreen mode with 3.10.
* Fixed the fullScreen mode not properly working on Android 11 and above(It was showing the blue line on the top), and also not showing the navigation options so that the user can close the `fullScreenMode` while pressing the back button in the navigation. Now it started showing the `fullScreenMode` like in earlier version of kiwix.
* Also improved the `fullScreenMode` for lower versions of Android. We have created an extension function so that we can easily reuse the code when we open/close the `fullScreenMode` for a video.
* Fixed the BottomToolbar's options was showing when the application is in the background in `fullScreenMode` and the user opens again the application.
* When the application is running in the `fullScreenmode` and we close the `fullScreenMode` of a video so at that time BottomToolbar's option was showing. So we have fixed that.
2024-05-21 15:50:35 +05:30
translatewiki.net
ff6226f153 Localisation updates from https://translatewiki.net. 2024-05-20 14:07:17 +02:00
MohitMaliFtechiz
eb011e5c32 Corrected the fileName in SearchFragmentTest. 2024-05-20 12:05:44 +05:30
MohitMaliFtechiz
2137f47147 Added the accessibility check in remaining test cases.
* Added the `contentDescription` to AddNoteDialog's `close` image.
2024-05-20 12:05:32 +05:30
MohitMaliFtechiz
ff5f9fe162 Added the androidx.test.espresso:espresso-accessibility dependency to test the accessibility issues in our application.
* This testing library only work with `ViewAction` like if we perform any click on any screen then it starts checking the accessibility issues, so we have modify our test cases according to this.
* Suppress a few known accessibility issue e.g. on `LocalFileTransfer` screen we have a `skip` text which we are not using but it is giving the error for that.
* Fixed the `TouchTargetIssue` in ZimHostFragment.
* Added the `contentDescription` to search recyclerView.
2024-05-20 12:05:13 +05:30
MohitMaliFtechiz
037d02ab8c Added the contentDescription for views and suppressed this lint warning for some views since we are setting the contentDescription for those views in the code. 2024-05-20 11:59:13 +05:30
MohitMaliFtechiz
1df7a0b27a Fixed the application was crashing when we frequently searching and clicking on any article.
* Added test cases for testing this scenario.
2024-05-17 18:06:05 +05:30
MohitMaliFtechiz
e914b25957 Fixed the test cases that were failing if testPauseAndResumeInOtherLanguage failed due to any reason. Because the language remains changed and other test cases will fail. Like it was failed in this PR on API level 30.
* Also, improved our `DownloadTest`, because after changing the language of the application online content will change according to the new language so now we are using a generic approach for downloading the zim file.
2024-05-17 14:45:14 +05:30
MohitMaliFtechiz
680628f339 Fixed: Unable to restart download after pausing.
* It was due to we were using the hardcoded string for checking the pause state of downloading so pausing and resuming are working fine in the English version and do not work in other languages.
* Added test cases for checking this scenario so that we can avoid this type of errors in the future.
2024-05-16 11:45:20 +05:30
MohitMaliFtechiz
ed0ffad86c Uploading nightly APK with released signature.
* Uploading nightly APK with a released signature so that APK can update, if a user downloads the new version of nightly like our released APK.
* Modified the nightly CI for this change.
2024-05-14 15:34:27 +05:30
MohitMaliFtechiz
1b596ecb0d Added test cases for testing the deep linking in our application.
* Testing for both `file` and `content` scheme type uris.
2024-05-10 15:04:47 +05:30
MohitMaliFtechiz
31078e3dce Fixed: Zim files are not opening with kiwix when clicking from the storage.
* Corrected the deep linking for `content` type scheme.
* Improved the handling of zim files if user opens from the storage and our application is not in background.
* Improved the opening of Zim files when we open directly from storage.
* Also, added necessary comments on the changes to properly understand why we have done these changes.
2024-05-10 15:04:36 +05:30
MohitMaliFtechiz
ffcfa9f837 Removed the URL type deep link since we are mainly using deep links for opening zim files in the application, and URLs type deep links are for downloading the content not for opening the ZIM files so we are removing these deep links from our application. 2024-05-09 21:09:58 +05:30
MohitMaliFtechiz
96debf9e53 Added test case for testing splitted zim file with zero size file. 2024-05-08 14:07:47 +02:00
MohitMaliFtechiz
c0912dee89 Simplified the creation of splitted zim file. 2024-05-08 14:07:47 +02:00
MohitMaliFtechiz
b8971e1b64 Error on opening a split zim file on external storage.
* Added test cases for testing that the ZimFileReader can open the splitted zim file or not.
2024-05-08 14:07:47 +02:00
MohitMaliFtechiz
4a5033fb7c Fixed: The Delete icon is showing wrong content description on the notes and history screen.
* Added correct description to delete button on HistoryFragment, and NotesFragment.
* Refactored the test case according to this new change.
* Sometimes actionOnItemAtPosition method gives an internal error, and does not perform the desired operation and fails the NoteFragmentTest. So we have moved it inside the testFlakyView method so that if there is any internal error occurs it retries this action.
2024-05-08 14:57:35 +05:30
MohitMaliFtechiz
119fca00d3 Fixed, selecting language was not working because the clickable area became short due to our change because we have changed the height to wrap_content. 2024-05-07 18:03:13 +05:30
MohitMaliFtechiz
cf8093d259 Fixed: Low contrast issues reported by the playstore.
* Changed the background color of `ErrorActivity` and checkbox to resolve the issue.
* Added the background color in `IntroFragment` for resolving the issue, it is exact same design as previous.
* Changed the tint color of `ic_feedback_orange_24dp` image to resolve the low contrast issue.
* Changed the height of item_language item to wrap content instead of a fix height which prevent the expansion of layout if there is more content.
2024-05-07 16:11:29 +05:30
translatewiki.net
a09cc2dec4 Localisation updates from https://translatewiki.net. 2024-05-07 12:11:20 +05:30
MohitMaliFtechiz
284c1bf925 Fixed: Touch target size issue reported by the playstore.
* Fixed the touch target issue occurring in the HelpFragment screen. Added the `minWidth` and `minHeight`. For manintaing the current design we have done some modification in this screen like adding the padding and `scaleType` otherwise the design was looking very bigger then previous.
* Changed the width of `page_switch` to `wrapContent` instead of fixed width which prevents to expansion of the view if there is more content to display.
* Increase the height of SearchView's editText to resolve the `Touch target issue`.
* Added the minHeight for `deviceName` to touch target issue. Also, added the contentDescription for this textView.
* Moved the "Device Name" string to strings.xml file since it was hardcoded here.
* Added `minHeight` for showing link textView in external link popup.
2024-05-03 14:44:11 +02:00
MohitMaliFtechiz
cb6c9e0f88 Fixed: Content labeling issue reported by the playstore.
* Added the content description for `send report` image, and fixed the sizing issues of `send feedback` and `send report` textView so that user can easily click on these views.
* Added content description for `File transfer list recyclerview`.
* There is only one accessibility warning left which is `Multiple items have the same description` it is because recyclerview items have the same content description and we can ignore this type of error because 2 views can have the same content description because their functionality can be same.
2024-04-30 21:35:18 +05:30
MohitMaliFtechiz
89a5a9ade5 Added the test cases, for testing the scenario where the zim file was not properly loading after opening the note on the notes screen to ensure that this functionality should work properly. 2024-04-30 12:19:35 +05:30
MohitMaliFtechiz
a246c932ad Removed the existBook method from KiwixReaderFragment sine we moved this in CoreReaderFragment.
* Improved the UI to not show the webView options for deleted zim files.
2024-04-29 19:33:44 +05:30
MohitMaliFtechiz
010052a3a0 Fixed: Sometimes setting the org.kiwix.libzim.Archive.setNativeArchive crashes the application.
* We are now creating the ZimFileReader object on the background thread to not block the UI thread which sometimes causing the ANR because UI was frozen due to creation of ZimFileReader with large file.
* Refactored our functionality to support this new change.
* Refactored the test cases according to this functionality.
2024-04-26 19:16:09 +05:30
MohitMaliFtechiz
ebfea07fd4 Fixed: PlayStore reported UninitializedPropertyAccessException when launching the KiwixMainActivity.
* The error was occurring when launching the `KiwixMainActivity`. At this moment, `coreComponent` was in creation process so it is not initialized at this moment, and we are passing this component in our `KiwixMainActivity` through interface for injection of this activity. But we are not using `coreComponent` object in our `KiwixMainActivity` so passing it to the activity is unused because we are injecting this activity through `cachedComponent`, and this unused object causing the error. So we have removed this interface from our `BaseActivity` and directly injecting `KiwixMainActivity` in via `cachedComponent`.
2024-04-17 20:33:09 +05:30
MohitMaliFtechiz
1251dc403e Improved KiwixSplashActivityTest which failed once on CI. 2024-04-12 20:33:06 +05:30
MohitMaliFtechiz
3a0054e97d Improved ZimHostFragmentTest which sometimes unable to find the "PROCEED" button. 2024-04-12 18:11:33 +05:30
MohitMaliFtechiz
8c72d404bb Improved the systemDialog checking method, Last CI was failed due to a system dialog is visible but with some different title so closing the system dialog code does not work. So we have improved a bit this method because most of the system dialog have the "WAIT","Wait","OK" or "Ok" button in it. 2024-04-12 17:51:12 +05:30
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
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
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
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
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
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
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