diff --git a/app/src/androidTest/java/org/kiwix/kiwixmobile/intro/IntroRobot.kt b/app/src/androidTest/java/org/kiwix/kiwixmobile/intro/IntroRobot.kt index 0e6c3163e..97b42342f 100644 --- a/app/src/androidTest/java/org/kiwix/kiwixmobile/intro/IntroRobot.kt +++ b/app/src/androidTest/java/org/kiwix/kiwixmobile/intro/IntroRobot.kt @@ -25,8 +25,8 @@ import org.kiwix.kiwixmobile.Findable.StringId.TextId import org.kiwix.kiwixmobile.Findable.ViewId import org.kiwix.kiwixmobile.LONG_WAIT import org.kiwix.kiwixmobile.R -import org.kiwix.kiwixmobile.main.MainRobot -import org.kiwix.kiwixmobile.main.main +import org.kiwix.kiwixmobile.main.TopLevelDestinationRobot +import org.kiwix.kiwixmobile.main.topLevel fun intro(func: IntroRobot.() -> Unit) = IntroRobot().applyWithViewHierarchyPrinting(func) @@ -49,8 +49,8 @@ class IntroRobot : BaseRobot() { } } - infix fun clickGetStarted(func: MainRobot.() -> Unit): MainRobot { + infix fun clickGetStarted(func: TopLevelDestinationRobot.() -> Unit): TopLevelDestinationRobot { clickOn(getStarted) - return main(func) + return topLevel(func) } } diff --git a/app/src/androidTest/java/org/kiwix/kiwixmobile/localFileTransfer/LocalFileTransferRobot.kt b/app/src/androidTest/java/org/kiwix/kiwixmobile/localFileTransfer/LocalFileTransferRobot.kt new file mode 100644 index 000000000..b43e2e131 --- /dev/null +++ b/app/src/androidTest/java/org/kiwix/kiwixmobile/localFileTransfer/LocalFileTransferRobot.kt @@ -0,0 +1,38 @@ +/* + * Kiwix Android + * Copyright (c) 2020 Kiwix + * 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 . + * + */ + +package org.kiwix.kiwixmobile.localFileTransfer + +import applyWithViewHierarchyPrinting +import org.kiwix.kiwixmobile.BaseRobot +import org.kiwix.kiwixmobile.Findable.StringId.TextId +import org.kiwix.kiwixmobile.R + +/** + * Authored by Ayush Shrivastava on 29/10/20 + */ + +fun localFileTransfer(func: LocalFileTransferRobot.() -> Unit) = + LocalFileTransferRobot().applyWithViewHierarchyPrinting(func) + +class LocalFileTransferRobot : BaseRobot() { + + init { + isVisible(TextId(R.string.receive_files_title)) + } +} diff --git a/app/src/androidTest/java/org/kiwix/kiwixmobile/main/MainActivityTest.java b/app/src/androidTest/java/org/kiwix/kiwixmobile/main/MainActivityTest.java deleted file mode 100644 index 5ba812bda..000000000 --- a/app/src/androidTest/java/org/kiwix/kiwixmobile/main/MainActivityTest.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Kiwix Android - * Copyright (c) 2019 Kiwix - * 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 . - * - */ - -package org.kiwix.kiwixmobile.main; - -import android.Manifest; -import androidx.test.espresso.matcher.ViewMatchers; -import androidx.test.ext.junit.runners.AndroidJUnit4; -import androidx.test.filters.LargeTest; -import androidx.test.rule.ActivityTestRule; -import androidx.test.rule.GrantPermissionRule; -import com.schibsted.spain.barista.interaction.BaristaMenuClickInteractions; -import com.schibsted.spain.barista.interaction.BaristaSleepInteractions; -import org.junit.Before; -import org.junit.Rule; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.kiwix.kiwixmobile.core.R; - -import static androidx.test.espresso.Espresso.onView; -import static androidx.test.espresso.action.ViewActions.click; -import static androidx.test.espresso.matcher.ViewMatchers.withEffectiveVisibility; -import static androidx.test.espresso.matcher.ViewMatchers.withText; -import static com.schibsted.spain.barista.interaction.BaristaClickInteractions.clickOn; -import static org.hamcrest.CoreMatchers.allOf; -import static org.kiwix.kiwixmobile.testutils.TestUtils.TEST_PAUSE_MS; -import static org.kiwix.kiwixmobile.testutils.TestUtils.getResourceString; -import static org.kiwix.kiwixmobile.utils.StandardActions.enterSettings; -import static org.kiwix.kiwixmobile.utils.StandardActions.openDrawer; - -@LargeTest -@RunWith(AndroidJUnit4.class) -public class MainActivityTest { - @Rule - public ActivityTestRule activityTestRule = - new ActivityTestRule<>(KiwixMainActivity.class); - @Rule - public GrantPermissionRule readPermissionRule = - GrantPermissionRule.grant(Manifest.permission.READ_EXTERNAL_STORAGE); - @Rule - public GrantPermissionRule writePermissionRule = - GrantPermissionRule.grant(Manifest.permission.WRITE_EXTERNAL_STORAGE); - - @Before - public void setup() { - BaristaSleepInteractions.sleep(TEST_PAUSE_MS); - onView(allOf(withText(R.string.reader), - withEffectiveVisibility(ViewMatchers.Visibility.VISIBLE))).perform(click()); - BaristaSleepInteractions.sleep(TEST_PAUSE_MS); - } - - @Test - public void navigateHelp() { - BaristaSleepInteractions.sleep(TEST_PAUSE_MS); - openDrawer(); - clickOn(R.string.menu_help); - } - - @Test - public void navigateSettings() { - BaristaSleepInteractions.sleep(TEST_PAUSE_MS); - openDrawer(); - enterSettings(); - } - - @Test - public void navigateBookmarks() { - BaristaSleepInteractions.sleep(TEST_PAUSE_MS); - openDrawer(); - BaristaMenuClickInteractions.clickMenu(getResourceString(R.string.bookmarks)); - } - - @Test - public void navigateDeviceContent() { - BaristaSleepInteractions.sleep(TEST_PAUSE_MS); - clickOn(R.string.library); - } - - @Test - public void navigateOnlineContent() { - BaristaSleepInteractions.sleep(TEST_PAUSE_MS); - clickOn(R.string.download); - } -} diff --git a/app/src/androidTest/java/org/kiwix/kiwixmobile/main/TopLevelDestinationRobot.kt b/app/src/androidTest/java/org/kiwix/kiwixmobile/main/TopLevelDestinationRobot.kt new file mode 100644 index 000000000..34ef604c3 --- /dev/null +++ b/app/src/androidTest/java/org/kiwix/kiwixmobile/main/TopLevelDestinationRobot.kt @@ -0,0 +1,121 @@ +/* + * Kiwix Android + * Copyright (c) 2019 Kiwix + * 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 . + * + */ +package org.kiwix.kiwixmobile.main + +import applyWithViewHierarchyPrinting +import org.kiwix.kiwixmobile.BaseRobot +import org.kiwix.kiwixmobile.Findable.StringId.TextId +import org.kiwix.kiwixmobile.Findable.ViewId +import org.kiwix.kiwixmobile.R +import org.kiwix.kiwixmobile.help.HelpRobot +import org.kiwix.kiwixmobile.help.help +import org.kiwix.kiwixmobile.nav.destination.library.LibraryRobot +import org.kiwix.kiwixmobile.nav.destination.library.OnlineLibraryRobot +import org.kiwix.kiwixmobile.nav.destination.library.library +import org.kiwix.kiwixmobile.nav.destination.library.onlineLibrary +import org.kiwix.kiwixmobile.nav.destination.reader.ReaderRobot +import org.kiwix.kiwixmobile.nav.destination.reader.reader +import org.kiwix.kiwixmobile.page.bookmarks.BookmarksRobot +import org.kiwix.kiwixmobile.page.bookmarks.bookmarks +import org.kiwix.kiwixmobile.page.history.HistoryRobot +import org.kiwix.kiwixmobile.page.history.history +import org.kiwix.kiwixmobile.settings.SettingsRobot +import org.kiwix.kiwixmobile.settings.settingsRobo +import org.kiwix.kiwixmobile.utils.StandardActions.openDrawer +import org.kiwix.kiwixmobile.webserver.ZimHostRobot +import org.kiwix.kiwixmobile.webserver.zimHost + +fun topLevel(func: TopLevelDestinationRobot.() -> Unit) = + TopLevelDestinationRobot().applyWithViewHierarchyPrinting(func) + +class TopLevelDestinationRobot : BaseRobot() { + + init { + isVisible(ViewId(R.id.navigation_container)) + } + + fun clickReaderOnBottomNav(func: ReaderRobot.() -> Unit) { + clickOn(ViewId(R.id.readerFragment)) + reader(func) + } + + fun clickLibraryOnBottomNav(func: LibraryRobot.() -> Unit) { + clickOn(ViewId(R.id.libraryFragment)) + library(func) + pressBack() + } + + fun clickDownloadOnBottomNav(func: OnlineLibraryRobot.() -> Unit) { + clickOn(ViewId(R.id.downloadsFragment)) + onlineLibrary(func) + pressBack() + } + + private fun inNavDrawer(navDrawerAction: () -> Unit) { + openDrawer() + navDrawerAction.invoke() + pressBack() + } + + fun clickBookmarksOnNavDrawer(func: BookmarksRobot.() -> Unit) { + inNavDrawer { + clickOn(TextId(R.string.bookmarks)) + bookmarks(func) + pressBack() + } + } + + fun clickHistoryOnSideNav(func: HistoryRobot.() -> Unit) { + inNavDrawer { + clickOn(TextId(R.string.history)) + history(func) + pressBack() + } + } + + fun clickHostBooksOnSideNav(func: ZimHostRobot.() -> Unit) { + inNavDrawer { + clickOn(TextId(R.string.menu_host_books)) + zimHost(func) + } + } + + fun clickSettingsOnSideNav(func: SettingsRobot.() -> Unit) { + inNavDrawer { + clickOn(TextId(R.string.menu_settings)) + settingsRobo(func) + } + } + + fun clickHelpOnSideNav(func: HelpRobot.() -> Unit) { + inNavDrawer { + clickOn(TextId(R.string.menu_help)) + help(func) + } + } + + fun clickSupportKiwixOnSideNav() { + inNavDrawer { + clickOn(TextId(R.string.menu_support_kiwix)) + } + } + + fun assertExternalLinkDialogDisplayed() { + isVisible(TextId(R.string.external_link_popup_dialog_title)) + } +} diff --git a/app/src/androidTest/java/org/kiwix/kiwixmobile/main/TopLevelDestinationTest.kt b/app/src/androidTest/java/org/kiwix/kiwixmobile/main/TopLevelDestinationTest.kt new file mode 100644 index 000000000..0964ec729 --- /dev/null +++ b/app/src/androidTest/java/org/kiwix/kiwixmobile/main/TopLevelDestinationTest.kt @@ -0,0 +1,61 @@ +/* + * Kiwix Android + * Copyright (c) 2019 Kiwix + * 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 . + * + */ +package org.kiwix.kiwixmobile.main + +import androidx.test.rule.ActivityTestRule +import org.junit.Rule +import org.junit.Test + +class TopLevelDestinationTest { + @Rule + @JvmField + var activityTestRule = ActivityTestRule(KiwixMainActivity::class.java) + + @Test + fun testTopLevelDestination() { + topLevel { + clickReaderOnBottomNav { + } + clickLibraryOnBottomNav { + clickFileTransferIcon { + } + } + clickDownloadOnBottomNav { + clickOnGlobeIcon { + } + } + clickBookmarksOnNavDrawer { + clickOnTrashIcon() + assertDeleteBookmarksDialogDisplayed() + } + clickHistoryOnSideNav { + clickOnTrashIcon() + assertDeleteHistoryDialogDisplayed() + } + clickHostBooksOnSideNav { + } + clickSettingsOnSideNav { + } + clickHelpOnSideNav { + } + clickSupportKiwixOnSideNav() + assertExternalLinkDialogDisplayed() + pressBack() + } + } +} diff --git a/app/src/androidTest/java/org/kiwix/kiwixmobile/nav/destination/library/LibraryRobot.kt b/app/src/androidTest/java/org/kiwix/kiwixmobile/nav/destination/library/LibraryRobot.kt new file mode 100644 index 000000000..3dd8f9ade --- /dev/null +++ b/app/src/androidTest/java/org/kiwix/kiwixmobile/nav/destination/library/LibraryRobot.kt @@ -0,0 +1,39 @@ +/* + * Kiwix Android + * Copyright (c) 2020 Kiwix + * 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 . + * + */ + +package org.kiwix.kiwixmobile.nav.destination.library + +import applyWithViewHierarchyPrinting +import org.kiwix.kiwixmobile.BaseRobot +import org.kiwix.kiwixmobile.Findable.ViewId +import org.kiwix.kiwixmobile.R +import org.kiwix.kiwixmobile.localFileTransfer.LocalFileTransferRobot +import org.kiwix.kiwixmobile.localFileTransfer.localFileTransfer + +fun library(func: LibraryRobot.() -> Unit) = LibraryRobot().applyWithViewHierarchyPrinting(func) + +class LibraryRobot : BaseRobot() { + init { + isVisible(ViewId(R.id.get_zim_nearby_device)) + } + + fun clickFileTransferIcon(func: LocalFileTransferRobot.() -> Unit) { + clickOn(ViewId(R.id.get_zim_nearby_device)) + localFileTransfer(func) + } +} diff --git a/app/src/androidTest/java/org/kiwix/kiwixmobile/nav/destination/library/OnlineLibraryRobot.kt b/app/src/androidTest/java/org/kiwix/kiwixmobile/nav/destination/library/OnlineLibraryRobot.kt new file mode 100644 index 000000000..784f90263 --- /dev/null +++ b/app/src/androidTest/java/org/kiwix/kiwixmobile/nav/destination/library/OnlineLibraryRobot.kt @@ -0,0 +1,40 @@ +/* + * Kiwix Android + * Copyright (c) 2020 Kiwix + * 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 . + * + */ + +package org.kiwix.kiwixmobile.nav.destination.library + +import applyWithViewHierarchyPrinting +import org.kiwix.kiwixmobile.BaseRobot +import org.kiwix.kiwixmobile.Findable.ViewId +import org.kiwix.kiwixmobile.R +import org.kiwix.kiwixmobile.language.LanguageRobot +import org.kiwix.kiwixmobile.language.language + +fun onlineLibrary(func: OnlineLibraryRobot.() -> Unit) = + OnlineLibraryRobot().applyWithViewHierarchyPrinting(func) + +class OnlineLibraryRobot : BaseRobot() { + init { + isVisible(ViewId(R.id.libraryList)) + } + + fun clickOnGlobeIcon(func: LanguageRobot.() -> Unit) { + clickOn(ViewId(R.id.select_language)) + language(func) + } +} diff --git a/app/src/androidTest/java/org/kiwix/kiwixmobile/main/MainRobot.kt b/app/src/androidTest/java/org/kiwix/kiwixmobile/nav/destination/reader/ReaderRobot.kt similarity index 71% rename from app/src/androidTest/java/org/kiwix/kiwixmobile/main/MainRobot.kt rename to app/src/androidTest/java/org/kiwix/kiwixmobile/nav/destination/reader/ReaderRobot.kt index 25740cc1c..c41633d6d 100644 --- a/app/src/androidTest/java/org/kiwix/kiwixmobile/main/MainRobot.kt +++ b/app/src/androidTest/java/org/kiwix/kiwixmobile/nav/destination/reader/ReaderRobot.kt @@ -1,6 +1,6 @@ /* * Kiwix Android - * Copyright (c) 2019 Kiwix + * Copyright (c) 2020 Kiwix * 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 @@ -15,16 +15,18 @@ * along with this program. If not, see . * */ -package org.kiwix.kiwixmobile.main +package org.kiwix.kiwixmobile.nav.destination.reader + +import applyWithViewHierarchyPrinting import org.kiwix.kiwixmobile.BaseRobot import org.kiwix.kiwixmobile.Findable.ViewId import org.kiwix.kiwixmobile.R -fun main(func: MainRobot.() -> Unit) = MainRobot().apply(func) +fun reader(func: ReaderRobot.() -> Unit) = ReaderRobot().applyWithViewHierarchyPrinting(func) -class MainRobot : BaseRobot() { +class ReaderRobot : BaseRobot() { init { - isVisible(ViewId(R.id.navigation_container)) + isVisible(ViewId(R.id.activity_main_root)) } } diff --git a/app/src/androidTest/java/org/kiwix/kiwixmobile/page/bookmarks/BookmarksRobot.kt b/app/src/androidTest/java/org/kiwix/kiwixmobile/page/bookmarks/BookmarksRobot.kt new file mode 100644 index 000000000..769cb2062 --- /dev/null +++ b/app/src/androidTest/java/org/kiwix/kiwixmobile/page/bookmarks/BookmarksRobot.kt @@ -0,0 +1,43 @@ +/* + * Kiwix Android + * Copyright (c) 2020 Kiwix + * 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 . + * + */ + +package org.kiwix.kiwixmobile.page.bookmarks + +import applyWithViewHierarchyPrinting +import com.schibsted.spain.barista.assertion.BaristaVisibilityAssertions.assertDisplayed +import org.kiwix.kiwixmobile.BaseRobot +import org.kiwix.kiwixmobile.Findable.StringId.ContentDesc +import org.kiwix.kiwixmobile.Findable.StringId.TextId +import org.kiwix.kiwixmobile.R + +fun bookmarks(func: BookmarksRobot.() -> Unit) = + BookmarksRobot().applyWithViewHierarchyPrinting(func) + +class BookmarksRobot : BaseRobot() { + init { + assertDisplayed(R.string.bookmarks_from_current_book) + } + + fun clickOnTrashIcon() { + clickOn(ContentDesc(R.string.pref_clear_all_bookmarks_title)) + } + + fun assertDeleteBookmarksDialogDisplayed() { + isVisible(TextId(R.string.delete_bookmarks)) + } +} diff --git a/app/src/androidTest/java/org/kiwix/kiwixmobile/page/history/HistoryRobot.kt b/app/src/androidTest/java/org/kiwix/kiwixmobile/page/history/HistoryRobot.kt new file mode 100644 index 000000000..ece1534d6 --- /dev/null +++ b/app/src/androidTest/java/org/kiwix/kiwixmobile/page/history/HistoryRobot.kt @@ -0,0 +1,42 @@ +/* + * Kiwix Android + * Copyright (c) 2020 Kiwix + * 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 . + * + */ + +package org.kiwix.kiwixmobile.page.history + +import applyWithViewHierarchyPrinting +import com.schibsted.spain.barista.assertion.BaristaVisibilityAssertions.assertDisplayed +import org.kiwix.kiwixmobile.BaseRobot +import org.kiwix.kiwixmobile.Findable.StringId.ContentDesc +import org.kiwix.kiwixmobile.Findable.StringId.TextId +import org.kiwix.kiwixmobile.R + +fun history(func: HistoryRobot.() -> Unit) = HistoryRobot().applyWithViewHierarchyPrinting(func) + +class HistoryRobot : BaseRobot() { + init { + assertDisplayed(R.string.history_from_current_book) + } + + fun clickOnTrashIcon() { + clickOn(ContentDesc(R.string.pref_clear_all_bookmarks_title)) + } + + fun assertDeleteHistoryDialogDisplayed() { + isVisible(TextId(R.string.delete_history)) + } +} diff --git a/app/src/androidTest/java/org/kiwix/kiwixmobile/webserver/ZimHostRobot.kt b/app/src/androidTest/java/org/kiwix/kiwixmobile/webserver/ZimHostRobot.kt new file mode 100644 index 000000000..683c195fb --- /dev/null +++ b/app/src/androidTest/java/org/kiwix/kiwixmobile/webserver/ZimHostRobot.kt @@ -0,0 +1,32 @@ +/* + * Kiwix Android + * Copyright (c) 2020 Kiwix + * 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 . + * + */ + +package org.kiwix.kiwixmobile.webserver + +import applyWithViewHierarchyPrinting +import org.kiwix.kiwixmobile.BaseRobot +import org.kiwix.kiwixmobile.Findable.StringId.TextId +import org.kiwix.kiwixmobile.R + +fun zimHost(func: ZimHostRobot.() -> Unit) = ZimHostRobot().applyWithViewHierarchyPrinting(func) + +class ZimHostRobot : BaseRobot() { + init { + isVisible(TextId(R.string.menu_host_books)) + } +}