Configuration.UI_MODE_NIGHT_YES->true// dark theme is set
@ -68,6 +74,7 @@ class SettingsBasicsTest {
verifySearchEngineList()
verifyShowSearchSuggestions()
verifyShowSearchShortcuts()
verifyShowClipboardSuggestions()
verifySearchBrowsingHistory()
verifySearchBookmarks()
@ -76,7 +83,7 @@ class SettingsBasicsTest {
verifyThemes()
}.goBack{
}.openAccessibilitySubMenu{
verifyAutomaticFontSizing()
verifyAutomaticFontSizingMenuItems()
}.goBack{
// drill down to submenu
}.openDefaultBrowserSubMenu{
@ -86,49 +93,75 @@ class SettingsBasicsTest {
}
}
@Ignore("This is a stub test, ignore for now")
@Test
funselectNewDefaultSearchEngine(){
// Open 3dot (main) menu
// Select settings
// Select "Search engine"
// Choose: DuckDuckGo
// Back arrow to Home
// Verify DuckDuckGo icon in Navigation bar
// Goes through the settings and changes the default search engine, then verifies it has changed.
homeScreen{
}.openThreeDotMenu{
}.openSettings{
}.openSearchSubMenu{
changeDefaultSearchEngine("DuckDuckGo")
}.goBack{
}.goBack{
verifyDefaultSearchEngine("DuckDuckGo")
}
}
@Ignore("This is a stub test, ignore for now")
@Ignore("This test works locally, fails on firebase. https://github.com/mozilla-mobile/fenix/issues/8174")
@Test
funtoggleSearchSuggestions(){
// Enter: "mozilla" in navigation bar
// Verify more than one suggesion provided
// Open 3dot (main) menu
// Select settings
// Select "Search engine"
// Toggle 'Show search suggestions' to 'off'
// Back arrow twice to home screen
// Enter: "mozilla" in navigation bar
// Verify no suggestions provided
// Goes through the settings and changes the search suggestion toggle, then verifies it changes.
homeScreen{
}.openNavigationToolbar{
verifySearchSuggestionsAreMoreThan(1,"mozilla")
}.goBack{
}.openThreeDotMenu{
}.openSettings{
}.openSearchSubMenu{
disableShowSearchSuggestions()
}.goBack{
}.goBack{
}.openNavigationToolbar{
verifySearchSuggestionsAreEqualTo(0,"mozilla")
}
}
@Ignore("This is a stub test, ignore for now")
@Test
funtoggleShowVisitedSitesAndBookmarks(){
// Visit 3 static sites
// Bookmark 2 of them
// Open 3dot (main) menu
// Enter navigation bar and verify visited sites appear
// Verify bookmarks exist
// Open 3dot (main) menu
// Select settings
// Select "Search engine"
// Toggle off "Show visited sites and bookmarks"
// Back arrow twice to home screen
// Verify history and bookmarks are gone
// Bookmarks a few websites, toggles the history and bookmarks setting to off, then verifies if the visited and bookmarked websites do not show in the suggestions.
valpage1=getGenericAsset(mockWebServer,1)
valpage2=getGenericAsset(mockWebServer,2)
valpage3=getGenericAsset(mockWebServer,3)
homeScreen{
}.openNavigationToolbar{
}.enterURLAndEnterToBrowser(page1.url){
verifyPageContent(page1.content)
}.openThreeDotMenu{
clickAddBookmarkButton()
}
navigationToolbar{
}.enterURLAndEnterToBrowser(page2.url){
verifyPageContent(page2.content)
}.openThreeDotMenu{
clickAddBookmarkButton()
}
navigationToolbar{
}.enterURLAndEnterToBrowser(page3.url){
verifyPageContent(page3.content)
}
navigationToolbar{
verifyNoHistoryBookmarks()
}
}
@Test
funchangeThemeSetting(){
// Goes through the settings and changes the default search engine, then verifies it changes.
homeScreen{
}.openThreeDotMenu{
}.openSettings{
@ -141,40 +174,48 @@ class SettingsBasicsTest {
}
}
@Ignore("This is a stub test, ignore for now")
@Test
funchangeAccessibiltySettings(){
// Open 3dot (main) menu
// Select settings
// Select Accessibility
// Verify header: "Automatic Font Sizing"
// Verify description: "Font size will match your Android settings. Disable to manage font size here"
// Verify toggle is set to 'on' by default
// Toggle font size to off
// Verify that new sub-menu items appear....
// Verify header: "Font Size"
// Verify description: "Make text on websites larger or smaller"
// Verify slider bar exists
// Verify slider bar default value set to 100%
// Verify sample text "The quick brown fox..." appears 4 times
// Move slider bar to 180%
// Verify that text grows to 180%
// Back error twice to home screen
// Open static website in navigation bar
// Verify that text is now at 180%
// Select settings
// Select Accessibility
// Toggle font size back to 'off'
// Verify that "Font Size" header, description, slider bar and sample text all disappear
// Goes through the settings and changes the default text on a webpage, then verifies if the text has changed.
if(currentTextSizePercentage!=textSizePercentage)throwAssertionError("The textview has a text size percentage of $currentTextSizePercentage, and does not match $textSizePercentage")