mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-16 19:05:27 -04:00
Removed unused files
As we are already testing the downloads in DownloadTest, InitialDownloadTest and this test files are unused now so we are removing these.
This commit is contained in:
parent
838b217596
commit
d7a9e9323a
@ -1,101 +0,0 @@
|
|||||||
// /*
|
|
||||||
// * Kiwix Android
|
|
||||||
// * Copyright (c) 2019 Kiwix <android.kiwix.org>
|
|
||||||
// * This program is free software: you can redistribute it and/or modify
|
|
||||||
// * it under the terms of the GNU General Public License as published by
|
|
||||||
// * the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// * (at your option) any later version.
|
|
||||||
// *
|
|
||||||
// * This program is distributed in the hope that it will be useful,
|
|
||||||
// * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// * GNU General Public License for more details.
|
|
||||||
// *
|
|
||||||
// * You should have received a copy of the GNU General Public License
|
|
||||||
// * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
// *
|
|
||||||
// */
|
|
||||||
//
|
|
||||||
package org.kiwix.kiwixmobile.zimManager
|
|
||||||
//
|
|
||||||
// import androidx.test.filters.SdkSuppress
|
|
||||||
// import attempt
|
|
||||||
// import okhttp3.mockwebserver.MockResponse
|
|
||||||
// import org.junit.Ignore
|
|
||||||
// import org.junit.Test
|
|
||||||
// import org.kiwix.kiwixmobile.BaseActivityTest
|
|
||||||
// import org.kiwix.kiwixmobile.KiwixMockServer
|
|
||||||
// import org.kiwix.kiwixmobile.core.CoreApp
|
|
||||||
// import org.kiwix.kiwixmobile.core.data.remote.KiwixService.LIBRARY_NETWORK_PATH
|
|
||||||
// import org.kiwix.kiwixmobile.core.entity.LibraryNetworkEntity
|
|
||||||
// import org.kiwix.kiwixmobile.core.utils.SharedPreferenceUtil
|
|
||||||
// import org.kiwix.sharedFunctions.book
|
|
||||||
// import org.kiwix.sharedFunctions.libraryNetworkEntity
|
|
||||||
// import org.kiwix.sharedFunctions.metaLinkNetworkEntity
|
|
||||||
// import java.util.concurrent.TimeUnit.SECONDS
|
|
||||||
//
|
|
||||||
// class ZimManageActivityTest : BaseActivityTest<ZimManageActivity>() {
|
|
||||||
//
|
|
||||||
// override var activityRule = activityTestRule<ZimManageActivity> {
|
|
||||||
// CoreApp.coreComponent = testComponent()
|
|
||||||
// }
|
|
||||||
// private val book = book()
|
|
||||||
//
|
|
||||||
// private val mockServer = KiwixMockServer().apply {
|
|
||||||
// map(
|
|
||||||
// LIBRARY_NETWORK_PATH to libraryNetworkEntity(listOf(book)),
|
|
||||||
// book.networkPath to metaLinkNetworkEntity()
|
|
||||||
// )
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// @Test
|
|
||||||
// @Ignore("Ignored due to flakiness on nightly build")
|
|
||||||
// fun testZimManageDataFlow() {
|
|
||||||
// SharedPreferenceUtil(activityRule.activity).putPrefWifiOnly(false)
|
|
||||||
// zimManage {
|
|
||||||
// clickOnOnline {
|
|
||||||
// clickOnSearch()
|
|
||||||
// searchFor(book(title = "zzzzz"))
|
|
||||||
// waitForEmptyView()
|
|
||||||
// searchFor(book)
|
|
||||||
// pressBack()
|
|
||||||
// pressBack()
|
|
||||||
// forceResponse("012345678901234567890123456789012345678901234567890123456789012345678")
|
|
||||||
// attempt(10) {
|
|
||||||
// clickOn(book)
|
|
||||||
// clickStop()
|
|
||||||
// clickNegativeDialogButton()
|
|
||||||
// clickStop()
|
|
||||||
// clickPositiveDialogButton()
|
|
||||||
// }
|
|
||||||
// forceResponse("01234")
|
|
||||||
// clickOn(book)
|
|
||||||
// waitForEmptyView()
|
|
||||||
// }
|
|
||||||
// clickOnDevice {
|
|
||||||
// longClickOn(book)
|
|
||||||
// clickCloseActionMode()
|
|
||||||
// longClickOn(book)
|
|
||||||
// clickDelete()
|
|
||||||
// clickNegativeDialogButton()
|
|
||||||
// longClickOn(book)
|
|
||||||
// clickDelete()
|
|
||||||
// clickPositiveDialogButton()
|
|
||||||
// waitForEmptyView()
|
|
||||||
// }
|
|
||||||
// clickOnOnline {
|
|
||||||
// } clickOnLanguageIcon { }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// private fun forceResponse(body: String) {
|
|
||||||
// mockServer.forceResponse(
|
|
||||||
// MockResponse()
|
|
||||||
// .setBody(body)
|
|
||||||
// .throttleBody(1L, 1L, SECONDS)
|
|
||||||
// )
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// private val LibraryNetworkEntity.Book.networkPath
|
|
||||||
// get() = "/${url.substringAfterLast("/")}"
|
|
||||||
// }
|
|
@ -1,106 +0,0 @@
|
|||||||
// /*
|
|
||||||
// * Kiwix Android
|
|
||||||
// * Copyright (c) 2019 Kiwix <android.kiwix.org>
|
|
||||||
// * This program is free software: you can redistribute it and/or modify
|
|
||||||
// * it under the terms of the GNU General Public License as published by
|
|
||||||
// * the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// * (at your option) any later version.
|
|
||||||
// *
|
|
||||||
// * This program is distributed in the hope that it will be useful,
|
|
||||||
// * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// * GNU General Public License for more details.
|
|
||||||
// *
|
|
||||||
// * You should have received a copy of the GNU General Public License
|
|
||||||
// * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
// *
|
|
||||||
// */
|
|
||||||
package org.kiwix.kiwixmobile.zimManager
|
|
||||||
//
|
|
||||||
// import applyWithViewHierarchyPrinting
|
|
||||||
// import org.kiwix.kiwixmobile.BaseRobot
|
|
||||||
// import org.kiwix.kiwixmobile.Findable.StringId.TextId
|
|
||||||
// import org.kiwix.kiwixmobile.Findable.Text
|
|
||||||
// import org.kiwix.kiwixmobile.Findable.ViewId
|
|
||||||
// import org.kiwix.kiwixmobile.LONG_WAIT
|
|
||||||
// import org.kiwix.kiwixmobile.R
|
|
||||||
// import org.kiwix.kiwixmobile.VERY_LONG_WAIT
|
|
||||||
// import org.kiwix.kiwixmobile.core.entity.LibraryNetworkEntity.Book
|
|
||||||
// import org.kiwix.kiwixmobile.language.LanguageRobot
|
|
||||||
// import org.kiwix.kiwixmobile.language.language
|
|
||||||
//
|
|
||||||
// fun zimManage(func: ZimManageRobot.() -> Unit) =
|
|
||||||
// ZimManageRobot().applyWithViewHierarchyPrinting(func)
|
|
||||||
//
|
|
||||||
// class ZimManageRobot : BaseRobot() {
|
|
||||||
// init {
|
|
||||||
// isVisible(ViewId(R.id.manageViewPager), VERY_LONG_WAIT)
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// fun clickOnOnline(func: LibraryRobot.() -> Unit): LibraryRobot {
|
|
||||||
// clickOnTab(R.string.remote_zims)
|
|
||||||
// return library(func)
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// fun clickOnDevice(func: DeviceRobot.() -> Unit): DeviceRobot {
|
|
||||||
// clickOnTab(R.string.local_zims)
|
|
||||||
// return device(func)
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// private fun library(func: LibraryRobot.() -> Unit) = LibraryRobot().apply(func)
|
|
||||||
// inner class LibraryRobot : BaseRobot() {
|
|
||||||
// init {
|
|
||||||
// isVisible(ViewId(R.id.libraryList))
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// fun clickOn(book: Book) {
|
|
||||||
// clickOn(Text(book.title))
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// fun clickOnSearch() {
|
|
||||||
// clickOn(ViewId(R.id.action_search), LONG_WAIT)
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// fun searchFor(book: Book) {
|
|
||||||
// isVisible(ViewId(R.id.search_src_text)).text = book.title
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// fun waitForEmptyView() {
|
|
||||||
// isVisible(ViewId(R.id.libraryErrorText), VERY_LONG_WAIT)
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// fun clickStop() {
|
|
||||||
// clickOn(ViewId(R.id.stop), LONG_WAIT)
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// infix fun clickOnLanguageIcon(function: LanguageRobot.() -> Unit): LanguageRobot {
|
|
||||||
// TextId(R.string.remote_zims)
|
|
||||||
// clickOn(ViewId(R.id.select_language))
|
|
||||||
// return language(function)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// private fun device(func: DeviceRobot.() -> Unit) = DeviceRobot().apply(func)
|
|
||||||
// inner class DeviceRobot : BaseRobot() {
|
|
||||||
// init {
|
|
||||||
// isVisible(ViewId(R.id.zimfilelist))
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// fun longClickOn(book: Book) {
|
|
||||||
// longClickOn(Text(book.title))
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// fun clickCloseActionMode() {
|
|
||||||
// clickOn(ViewId(R.id.action_mode_close_button))
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// fun clickDelete() {
|
|
||||||
// clickOn(ViewId(R.id.zim_file_delete_item))
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// fun waitForEmptyView() {
|
|
||||||
// isVisible(ViewId(R.id.file_management_no_files))
|
|
||||||
// isVisible(ViewId(R.id.go_to_downloads_button_no_files))
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
Loading…
x
Reference in New Issue
Block a user