Bug 1860973 - TestRail matching changes
parent
c5d6930584
commit
e9dc813213
@ -1,91 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.fenix.ui
|
||||
|
||||
import androidx.compose.ui.test.junit4.AndroidComposeTestRule
|
||||
import okhttp3.mockwebserver.MockWebServer
|
||||
import org.junit.After
|
||||
import org.junit.Before
|
||||
import org.junit.Ignore
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.mozilla.fenix.customannotations.SmokeTest
|
||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
||||
import org.mozilla.fenix.helpers.TestAssetHelper
|
||||
import org.mozilla.fenix.helpers.TestHelper
|
||||
import org.mozilla.fenix.ui.robots.browserScreen
|
||||
import org.mozilla.fenix.ui.robots.homeScreen
|
||||
import org.mozilla.fenix.ui.robots.searchScreen
|
||||
|
||||
class AddToHomeScreenTest {
|
||||
private lateinit var mockWebServer: MockWebServer
|
||||
|
||||
@get:Rule
|
||||
val composeTestRule =
|
||||
AndroidComposeTestRule(HomeActivityTestRule.withDefaultSettingsOverrides()) { it.activity }
|
||||
|
||||
@Before
|
||||
fun setUp() {
|
||||
mockWebServer = MockWebServer().apply {
|
||||
dispatcher = AndroidAssetDispatcher()
|
||||
start()
|
||||
}
|
||||
}
|
||||
|
||||
@After
|
||||
fun tearDown() {
|
||||
mockWebServer.shutdown()
|
||||
}
|
||||
|
||||
// Verifies the Add to home screen option in a tab's 3 dot menu
|
||||
@SmokeTest
|
||||
@Test
|
||||
fun mainMenuAddToHomeScreenTest() {
|
||||
val website = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||
val shortcutTitle = TestHelper.generateRandomString(5)
|
||||
|
||||
homeScreen {
|
||||
}.openNavigationToolbar {
|
||||
}.enterURLAndEnterToBrowser(website.url) {
|
||||
}.openThreeDotMenu {
|
||||
expandMenu()
|
||||
}.openAddToHomeScreen {
|
||||
clickCancelShortcutButton()
|
||||
}
|
||||
|
||||
browserScreen {
|
||||
}.openThreeDotMenu {
|
||||
expandMenu()
|
||||
}.openAddToHomeScreen {
|
||||
verifyShortcutTextFieldTitle("Test_Page_1")
|
||||
addShortcutName(shortcutTitle)
|
||||
clickAddShortcutButton()
|
||||
clickAddAutomaticallyButton()
|
||||
}.openHomeScreenShortcut(shortcutTitle) {
|
||||
verifyUrl(website.url.toString())
|
||||
verifyTabCounter("1")
|
||||
}
|
||||
}
|
||||
|
||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/414970
|
||||
@Ignore("Failure, more details at: https://bugzilla.mozilla.org/show_bug.cgi?id=1830005")
|
||||
@SmokeTest
|
||||
@Test
|
||||
fun addPrivateBrowsingShortcutFromHomeScreenCFRTest() {
|
||||
homeScreen {
|
||||
}.triggerPrivateBrowsingShortcutPrompt {
|
||||
verifyNoThanksPrivateBrowsingShortcutButton(composeTestRule)
|
||||
verifyAddPrivateBrowsingShortcutButton(composeTestRule)
|
||||
clickAddPrivateBrowsingShortcutButton(composeTestRule)
|
||||
clickAddAutomaticallyButton()
|
||||
}.openHomeScreenShortcut("Private ${TestHelper.appName}") {}
|
||||
searchScreen {
|
||||
verifySearchView()
|
||||
}.dismissSearchBar {
|
||||
verifyCommonMythsLink()
|
||||
}
|
||||
}
|
||||
}
|
@ -1,100 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.fenix.ui
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import androidx.test.uiautomator.UiDevice
|
||||
import okhttp3.mockwebserver.MockWebServer
|
||||
import org.junit.After
|
||||
import org.junit.Before
|
||||
import org.junit.Ignore
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
||||
import org.mozilla.fenix.ui.robots.homeScreen
|
||||
|
||||
/**
|
||||
* Tests for verifying the main three dot menu options
|
||||
*
|
||||
*/
|
||||
|
||||
class SettingsDeveloperToolsTest {
|
||||
private lateinit var mDevice: UiDevice
|
||||
private lateinit var mockWebServer: MockWebServer
|
||||
|
||||
@get:Rule
|
||||
val activityTestRule = HomeActivityTestRule()
|
||||
|
||||
@Before
|
||||
fun setUp() {
|
||||
mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
|
||||
mockWebServer = MockWebServer().apply {
|
||||
dispatcher = AndroidAssetDispatcher()
|
||||
start()
|
||||
}
|
||||
}
|
||||
|
||||
@After
|
||||
fun tearDown() {
|
||||
mockWebServer.shutdown()
|
||||
}
|
||||
|
||||
// Walks through settings developer tools menu and sub-menus to ensure all items are present
|
||||
@Test
|
||||
fun settingsDeveloperToolsItemsTest() {
|
||||
homeScreen {
|
||||
}.openThreeDotMenu {
|
||||
}.openSettings {
|
||||
verifyRemoteDebuggingButton()
|
||||
}
|
||||
}
|
||||
|
||||
// DEVELOPER TOOLS
|
||||
@Ignore("This is a stub test, ignore for now")
|
||||
@Test
|
||||
fun turnOnRemoteDebuggingViaUsb() {
|
||||
// Open terminal
|
||||
// Verify USB debugging is off
|
||||
// Open 3dot (main) menu
|
||||
// Select settings
|
||||
// Toggle Remote debugging via USB to 'on'
|
||||
// Open terminal
|
||||
// Verify USB debugging is on
|
||||
}
|
||||
|
||||
// ABOUT
|
||||
@Ignore("This is a stub test, ignore for now")
|
||||
@Test
|
||||
fun verifyHelpRedirect() {
|
||||
// Open 3dot (main) menu
|
||||
// Select settings
|
||||
// Click on "Help"
|
||||
// Verify redirect to: https://support.mozilla.org/
|
||||
}
|
||||
|
||||
@Ignore("This is a stub test, ignore for now")
|
||||
@Test
|
||||
fun verifyRateOnGooglePlayRedirect() {
|
||||
// Open 3dot (main) menu
|
||||
// Select settings
|
||||
// Click on "Rate on Google Play"
|
||||
// Verify Android "Open with Google Play Store" sub menu
|
||||
}
|
||||
|
||||
@Ignore("This is a stub test, ignore for now")
|
||||
@Test
|
||||
fun verifyAboutFirefoxPreview() {
|
||||
// Open 3dot (main) menu
|
||||
// Select settings
|
||||
// Click on "Verify About Firefox Preview"
|
||||
// Verify about page contains....
|
||||
// Build #
|
||||
// Version #
|
||||
// "Firefox Preview is produced by Mozilla"
|
||||
// Day, Date, timestamp
|
||||
// "Open source libraries we use"
|
||||
}
|
||||
}
|
@ -1,68 +0,0 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
package org.mozilla.fenix.ui
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import androidx.test.uiautomator.UiDevice
|
||||
import okhttp3.mockwebserver.MockWebServer
|
||||
import org.junit.After
|
||||
import org.junit.Before
|
||||
import org.junit.Ignore
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.mozilla.fenix.helpers.AndroidAssetDispatcher
|
||||
import org.mozilla.fenix.helpers.HomeActivityTestRule
|
||||
|
||||
/**
|
||||
* Tests for verifying the main three dot menu options
|
||||
*
|
||||
*/
|
||||
|
||||
class SettingsSyncTest {
|
||||
private lateinit var mDevice: UiDevice
|
||||
private lateinit var mockWebServer: MockWebServer
|
||||
|
||||
@get:Rule
|
||||
val activityTestRule = HomeActivityTestRule()
|
||||
|
||||
@Before
|
||||
fun setUp() {
|
||||
mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation())
|
||||
mockWebServer = MockWebServer().apply {
|
||||
dispatcher = AndroidAssetDispatcher()
|
||||
start()
|
||||
}
|
||||
}
|
||||
|
||||
@After
|
||||
fun tearDown() {
|
||||
mockWebServer.shutdown()
|
||||
}
|
||||
|
||||
// Walks through settings sync menu and sub-menus to ensure all items are present
|
||||
@Ignore("This is a stub test, ignore for now")
|
||||
@Test
|
||||
fun settingsSyncItemsTest() {
|
||||
// SYNC
|
||||
|
||||
// Open 3dot (main) menu
|
||||
// Select settings
|
||||
// Verify header: "Turn on Sync"
|
||||
// Verify description: "Sync bookmarks, history, and more with your Firefox Account"
|
||||
}
|
||||
|
||||
// SYNC
|
||||
@Ignore("This is a stub test, ignore for now")
|
||||
@Test
|
||||
fun turnOnSync() {
|
||||
// Note this requires a test Firefox Account and a desktop
|
||||
// Open 3dot (main) menu
|
||||
// Select settings
|
||||
// Click on "Turn on Sync"
|
||||
// Open Firefox on laptop and go to https://firefox.com/pair
|
||||
// Pair with QR code and/or alternate method
|
||||
// Verify pairing
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue