mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-15 18:12:54 +00:00
Bug 1847916 - Refactor and re-enable toggleSearchBookmarksTest & toggleSearchHistoryTest
This commit is contained in:
parent
33c0e9765c
commit
b004af3611
@ -621,6 +621,30 @@ class ComposeSearchTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Test that verifies the Firefox Suggest results in a general search context
|
||||||
|
@Test
|
||||||
|
fun firefoxSuggestHeaderForBrowsingDataSuggestionsTest() {
|
||||||
|
val firstPage = TestAssetHelper.getGenericAsset(searchMockServer, 1)
|
||||||
|
val secondPage = TestAssetHelper.getGenericAsset(searchMockServer, 2)
|
||||||
|
|
||||||
|
createTabItem(firstPage.url.toString())
|
||||||
|
createBookmarkItem(secondPage.url.toString(), secondPage.title, 1u)
|
||||||
|
|
||||||
|
homeScreen {
|
||||||
|
}.openSearch {
|
||||||
|
typeSearch("generic")
|
||||||
|
verifySearchEngineSuggestionResults(
|
||||||
|
rule = activityTestRule,
|
||||||
|
searchSuggestions = arrayOf(
|
||||||
|
"Firefox Suggest",
|
||||||
|
firstPage.url.toString(),
|
||||||
|
secondPage.url.toString(),
|
||||||
|
),
|
||||||
|
searchTerm = "generic",
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun verifySearchTabsItemsTest() {
|
fun verifySearchTabsItemsTest() {
|
||||||
navigationToolbar {
|
navigationToolbar {
|
||||||
|
@ -12,6 +12,8 @@ import org.mozilla.fenix.customannotations.SmokeTest
|
|||||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||||
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
import org.mozilla.fenix.helpers.HomeActivityIntentTestRule
|
||||||
import org.mozilla.fenix.helpers.MockBrowserDataHelper.addCustomSearchEngine
|
import org.mozilla.fenix.helpers.MockBrowserDataHelper.addCustomSearchEngine
|
||||||
|
import org.mozilla.fenix.helpers.MockBrowserDataHelper.createBookmarkItem
|
||||||
|
import org.mozilla.fenix.helpers.MockBrowserDataHelper.createHistoryItem
|
||||||
import org.mozilla.fenix.helpers.SearchDispatcher
|
import org.mozilla.fenix.helpers.SearchDispatcher
|
||||||
import org.mozilla.fenix.helpers.TestAssetHelper.getGenericAsset
|
import org.mozilla.fenix.helpers.TestAssetHelper.getGenericAsset
|
||||||
import org.mozilla.fenix.helpers.TestHelper.appContext
|
import org.mozilla.fenix.helpers.TestHelper.appContext
|
||||||
@ -23,7 +25,6 @@ import org.mozilla.fenix.helpers.TestHelper.setTextToClipBoard
|
|||||||
import org.mozilla.fenix.helpers.TestHelper.verifySnackBarText
|
import org.mozilla.fenix.helpers.TestHelper.verifySnackBarText
|
||||||
import org.mozilla.fenix.ui.robots.EngineShortcut
|
import org.mozilla.fenix.ui.robots.EngineShortcut
|
||||||
import org.mozilla.fenix.ui.robots.homeScreen
|
import org.mozilla.fenix.ui.robots.homeScreen
|
||||||
import org.mozilla.fenix.ui.robots.navigationToolbar
|
|
||||||
import org.mozilla.fenix.ui.robots.searchScreen
|
import org.mozilla.fenix.ui.robots.searchScreen
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
|
|
||||||
@ -138,31 +139,11 @@ class SettingsSearchTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("Failing, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1807268")
|
|
||||||
@Test
|
@Test
|
||||||
fun toggleSearchHistoryTest() {
|
fun toggleOffHistorySearchSuggestionsTest() {
|
||||||
val page1 = getGenericAsset(mockWebServer, 1)
|
val websiteURL = getGenericAsset(mockWebServer, 1).url.toString()
|
||||||
|
|
||||||
navigationToolbar {
|
createHistoryItem(websiteURL)
|
||||||
}.enterURLAndEnterToBrowser(page1.url) {
|
|
||||||
}.openTabDrawer {
|
|
||||||
closeTab()
|
|
||||||
}
|
|
||||||
|
|
||||||
homeScreen {
|
|
||||||
}.openSearch {
|
|
||||||
typeSearch("test")
|
|
||||||
verifySearchEngineSuggestionResults(
|
|
||||||
activityTestRule,
|
|
||||||
"Firefox Suggest",
|
|
||||||
page1.title,
|
|
||||||
searchTerm = "test",
|
|
||||||
)
|
|
||||||
}.clickSearchSuggestion("Test_Page_1") {
|
|
||||||
verifyUrl(page1.url.toString())
|
|
||||||
}.openTabDrawer {
|
|
||||||
closeTab()
|
|
||||||
}
|
|
||||||
|
|
||||||
homeScreen {
|
homeScreen {
|
||||||
}.openThreeDotMenu {
|
}.openThreeDotMenu {
|
||||||
@ -178,46 +159,16 @@ class SettingsSearchTest {
|
|||||||
verifyNoSuggestionsAreDisplayed(
|
verifyNoSuggestionsAreDisplayed(
|
||||||
activityTestRule,
|
activityTestRule,
|
||||||
"Firefox Suggest",
|
"Firefox Suggest",
|
||||||
"Test_Page_1",
|
websiteURL,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Ignore("Failing, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1807268")
|
|
||||||
@Test
|
@Test
|
||||||
fun toggleSearchBookmarksTest() {
|
fun toggleOffBookmarksSearchSuggestionsTest() {
|
||||||
val website = getGenericAsset(mockWebServer, 1)
|
val website = getGenericAsset(mockWebServer, 1)
|
||||||
|
|
||||||
navigationToolbar {
|
createBookmarkItem(website.url.toString(), website.title, 1u)
|
||||||
}.enterURLAndEnterToBrowser(website.url) {
|
|
||||||
}.openThreeDotMenu {
|
|
||||||
}.bookmarkPage {
|
|
||||||
}.openTabDrawer {
|
|
||||||
closeTab()
|
|
||||||
}
|
|
||||||
|
|
||||||
homeScreen {
|
|
||||||
}.openThreeDotMenu {
|
|
||||||
}.openHistory {
|
|
||||||
verifyHistoryListExists()
|
|
||||||
clickDeleteHistoryButton("Test_Page_1")
|
|
||||||
exitMenu()
|
|
||||||
}
|
|
||||||
|
|
||||||
homeScreen {
|
|
||||||
}.openSearch {
|
|
||||||
typeSearch("test")
|
|
||||||
verifySearchEngineSuggestionResults(
|
|
||||||
activityTestRule,
|
|
||||||
"Firefox Suggest",
|
|
||||||
website.title,
|
|
||||||
searchTerm = "test",
|
|
||||||
)
|
|
||||||
}.clickSearchSuggestion("Test_Page_1") {
|
|
||||||
verifyUrl(website.url.toString())
|
|
||||||
}.openTabDrawer {
|
|
||||||
closeTab()
|
|
||||||
}
|
|
||||||
|
|
||||||
homeScreen {
|
homeScreen {
|
||||||
}.openThreeDotMenu {
|
}.openThreeDotMenu {
|
||||||
|
Loading…
Reference in New Issue
Block a user