From 5e2b7b1dd299657f2e70c8286965ed56cf14a06f Mon Sep 17 00:00:00 2001 From: AndiAJ Date: Fri, 17 Nov 2023 14:53:49 +0200 Subject: [PATCH] Bug 1864829 - New Firefox suggest related UI smoke tests --- .../java/org/mozilla/fenix/ui/SearchTest.kt | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/SearchTest.kt b/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/SearchTest.kt index c2bc8cae492f..d7651650792d 100644 --- a/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/SearchTest.kt +++ b/mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/ui/SearchTest.kt @@ -809,4 +809,51 @@ class SearchTest { } } } + + // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2348361 + @SmokeTest + @Test + fun verifyFirefoxSuggestSponsoredSearchResultsTest() { + runWithCondition(appContext.settings().enableFxSuggest) { + navigationToolbar { + }.clickUrlbar { + typeSearch(searchTerm = "Amazon") + verifySearchEngineSuggestionResults( + rule = activityTestRule, + searchSuggestions = arrayOf( + "Firefox Suggest", + "Amazon.com - Official Site", + "Sponsored", + ), + searchTerm = "Amazon", + ) + } + } + } + + // TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2348374 + @SmokeTest + @Test + fun verifyFirefoxSuggestNonSponsoredSearchResultsTest() { + runWithCondition(appContext.settings().enableFxSuggest) { + navigationToolbar { + }.clickUrlbar { + typeSearch(searchTerm = "Marvel") + verifySearchEngineSuggestionResults( + rule = activityTestRule, + searchSuggestions = arrayOf( + "Firefox Suggest", + "Wikipedia - Marvel Cinematic Universe", + ), + searchTerm = "Marvel", + ) + verifySuggestionsAreNotDisplayed( + rule = activityTestRule, + searchSuggestions = arrayOf( + "Sponsored", + ), + ) + } + } + } } -- 2.11.4.GIT