2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-19 09:25:34 +00:00
* For https://github.com/mozilla-mobile/fenix/issues/11631: Move report site issue extension to main menu.

* For https://github.com/mozilla-mobile/fenix/issues/11631: Update UI test for installing add-on.
This commit is contained in:
Mihai Adrian Carare 2020-10-20 09:34:54 +03:00 committed by GitHub
parent 85d7bb0baf
commit 274ab54236
2 changed files with 10 additions and 2 deletions

View File

@ -14,6 +14,7 @@ import androidx.test.espresso.UiController
import androidx.test.espresso.ViewAction
import androidx.test.espresso.action.ViewActions
import androidx.test.espresso.action.ViewActions.click
import androidx.test.espresso.action.ViewActions.swipeDown
import androidx.test.espresso.assertion.ViewAssertions
import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.contrib.RecyclerViewActions
@ -532,6 +533,6 @@ private fun assertOpenInAppButton() {
private fun addonsManagerButton() = onView(withText("Add-ons Manager"))
private fun clickAddonsManagerButton() {
onView(withText("Add-ons")).click()
addonsManagerButton().click()
onView(withId(R.id.mozac_browser_menu_menuView)).perform(swipeDown())
onView(withText("Add-ons")).check(matches(isCompletelyDisplayed())).click()
}

View File

@ -18,11 +18,13 @@ import mozilla.components.browser.menu.item.BrowserMenuHighlightableItem
import mozilla.components.browser.menu.item.BrowserMenuImageSwitch
import mozilla.components.browser.menu.item.BrowserMenuImageText
import mozilla.components.browser.menu.item.BrowserMenuItemToolbar
import mozilla.components.browser.menu.item.WebExtensionPlaceholderMenuItem
import mozilla.components.browser.session.Session
import mozilla.components.browser.session.SessionManager
import mozilla.components.browser.state.selector.findTab
import mozilla.components.browser.state.store.BrowserStore
import mozilla.components.concept.storage.BookmarksStorage
import mozilla.components.feature.webcompat.reporter.WebCompatReporterFeature
import mozilla.components.support.ktx.android.content.getColorFromAttr
import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.R
@ -188,6 +190,7 @@ class DefaultToolbarMenu(
settings,
if (shouldDeleteDataOnQuit) deleteDataOnQuit else null,
BrowserMenuDivider(),
reportSiteIssuePlaceholder,
findInPage,
addToTopSites,
addToHomescreen.apply { visible = ::canAddToHomescreen },
@ -283,6 +286,10 @@ class DefaultToolbarMenu(
onItemTapped.invoke(ToolbarMenu.Item.FindInPage)
}
private val reportSiteIssuePlaceholder = WebExtensionPlaceholderMenuItem(
id = WebCompatReporterFeature.WEBCOMPAT_REPORTER_EXTENSION_ID
)
private val saveToCollection = BrowserMenuImageText(
label = context.getString(R.string.browser_menu_save_to_collection_2),
imageResource = R.drawable.ic_tab_collection,