mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-15 18:12:54 +00:00
Bug 1859564 - Context menus TestRail matching
This commit is contained in:
parent
7a8ea95ed6
commit
2d55fe6f6b
@ -76,7 +76,7 @@ class ComposeContextMenusTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun verifyContextOpenLinkNewTab() {
|
||||
fun verifyOpenLinkNewTabContextMenuOptionTest() {
|
||||
val pageLinks =
|
||||
TestAssetHelper.getGenericAsset(mockWebServer, 4)
|
||||
val genericURL =
|
||||
@ -99,7 +99,7 @@ class ComposeContextMenusTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun verifyContextOpenLinkPrivateTab() {
|
||||
fun verifyOpenLinkInNewPrivateTabContextMenuOptionTest() {
|
||||
val pageLinks =
|
||||
TestAssetHelper.getGenericAsset(mockWebServer, 4)
|
||||
val genericURL =
|
||||
@ -121,7 +121,7 @@ class ComposeContextMenusTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun verifyContextCopyLink() {
|
||||
fun verifyCopyLinkContextMenuOptionTest() {
|
||||
val pageLinks =
|
||||
TestAssetHelper.getGenericAsset(mockWebServer, 4)
|
||||
val genericURL =
|
||||
@ -141,29 +141,7 @@ class ComposeContextMenusTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun verifyContextCopyLinkNotDisplayedAfterApplied() {
|
||||
val pageLinks = TestAssetHelper.getGenericAsset(mockWebServer, 4)
|
||||
val genericURL = TestAssetHelper.getGenericAsset(mockWebServer, 3)
|
||||
|
||||
navigationToolbar {
|
||||
}.enterURLAndEnterToBrowser(pageLinks.url) {
|
||||
longClickPageObject(itemWithText("Link 3"))
|
||||
verifyContextMenuForLocalHostLinks(genericURL.url)
|
||||
clickContextMenuItem("Copy link")
|
||||
verifySnackBarText("Link copied to clipboard")
|
||||
}.openNavigationToolbar {
|
||||
}.visitLinkFromClipboard {
|
||||
verifyUrl(genericURL.url.toString())
|
||||
}.openComposeTabDrawer(composeTestRule) {
|
||||
}.openNewTab {
|
||||
}
|
||||
navigationToolbar {
|
||||
verifyClipboardSuggestionsAreDisplayed(shouldBeDisplayed = false)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun verifyContextShareLink() {
|
||||
fun verifyShareLinkContextMenuOptionTest() {
|
||||
val pageLinks =
|
||||
TestAssetHelper.getGenericAsset(mockWebServer, 4)
|
||||
val genericURL =
|
||||
@ -182,7 +160,7 @@ class ComposeContextMenusTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun verifyContextOpenImageNewTab() {
|
||||
fun verifyOpenImageNewTabContextMenuOptionTest() {
|
||||
val pageLinks =
|
||||
TestAssetHelper.getGenericAsset(mockWebServer, 4)
|
||||
val imageResource =
|
||||
@ -201,7 +179,7 @@ class ComposeContextMenusTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun verifyContextCopyImageLocation() {
|
||||
fun verifyCopyImageLocationContextMenuOptionTest() {
|
||||
val pageLinks =
|
||||
TestAssetHelper.getGenericAsset(mockWebServer, 4)
|
||||
val imageResource =
|
||||
@ -221,7 +199,7 @@ class ComposeContextMenusTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun verifyContextSaveImage() {
|
||||
fun verifySaveImageContextMenuOptionTest() {
|
||||
val pageLinks =
|
||||
TestAssetHelper.getGenericAsset(mockWebServer, 4)
|
||||
val imageResource =
|
||||
@ -244,7 +222,7 @@ class ComposeContextMenusTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun verifyContextMixedVariations() {
|
||||
fun verifyContextMenuLinkVariationsTest() {
|
||||
val pageLinks =
|
||||
TestAssetHelper.getGenericAsset(mockWebServer, 4)
|
||||
val genericURL =
|
||||
@ -267,7 +245,7 @@ class ComposeContextMenusTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun verifyContextMixedVariationsInPDFTest() {
|
||||
fun verifyPDFContextMenuLinkVariationsTest() {
|
||||
val genericURL =
|
||||
TestAssetHelper.getGenericAsset(mockWebServer, 3)
|
||||
|
||||
@ -287,7 +265,7 @@ class ComposeContextMenusTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun verifyContextOpenLinkInAppTest() {
|
||||
fun verifyOpenLinkInAppContextMenuOptionTest() {
|
||||
val defaultWebPage = TestAssetHelper.getExternalLinksAsset(mockWebServer)
|
||||
|
||||
navigationToolbar {
|
||||
|
@ -10,7 +10,6 @@ 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.ext.settings
|
||||
@ -70,8 +69,9 @@ class ContextMenusTest {
|
||||
mockWebServer.shutdown()
|
||||
}
|
||||
|
||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/243837
|
||||
@Test
|
||||
fun verifyContextOpenLinkNewTab() {
|
||||
fun verifyOpenLinkNewTabContextMenuOptionTest() {
|
||||
val pageLinks =
|
||||
TestAssetHelper.getGenericAsset(mockWebServer, 4)
|
||||
val genericURL =
|
||||
@ -93,8 +93,9 @@ class ContextMenusTest {
|
||||
}
|
||||
}
|
||||
|
||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/244655
|
||||
@Test
|
||||
fun verifyContextOpenLinkPrivateTab() {
|
||||
fun verifyOpenLinkInNewPrivateTabContextMenuOptionTest() {
|
||||
val pageLinks =
|
||||
TestAssetHelper.getGenericAsset(mockWebServer, 4)
|
||||
val genericURL =
|
||||
@ -115,8 +116,9 @@ class ContextMenusTest {
|
||||
}
|
||||
}
|
||||
|
||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/243832
|
||||
@Test
|
||||
fun verifyContextCopyLink() {
|
||||
fun verifyCopyLinkContextMenuOptionTest() {
|
||||
val pageLinks =
|
||||
TestAssetHelper.getGenericAsset(mockWebServer, 4)
|
||||
val genericURL =
|
||||
@ -135,31 +137,9 @@ class ContextMenusTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Ignore("Failing, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1807268")
|
||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/243838
|
||||
@Test
|
||||
fun verifyContextCopyLinkNotDisplayedAfterApplied() {
|
||||
val pageLinks = TestAssetHelper.getGenericAsset(mockWebServer, 4)
|
||||
val genericURL = TestAssetHelper.getGenericAsset(mockWebServer, 3)
|
||||
|
||||
navigationToolbar {
|
||||
}.enterURLAndEnterToBrowser(pageLinks.url) {
|
||||
longClickPageObject(itemWithText("Link 3"))
|
||||
verifyContextMenuForLocalHostLinks(genericURL.url)
|
||||
clickContextMenuItem("Copy link")
|
||||
verifySnackBarText("Link copied to clipboard")
|
||||
}.openNavigationToolbar {
|
||||
}.visitLinkFromClipboard {
|
||||
verifyUrl(genericURL.url.toString())
|
||||
}.openTabDrawer {
|
||||
}.openNewTab {
|
||||
}
|
||||
navigationToolbar {
|
||||
verifyClipboardSuggestionsAreDisplayed(shouldBeDisplayed = false)
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun verifyContextShareLink() {
|
||||
fun verifyShareLinkContextMenuOptionTest() {
|
||||
val pageLinks =
|
||||
TestAssetHelper.getGenericAsset(mockWebServer, 4)
|
||||
val genericURL =
|
||||
@ -177,8 +157,9 @@ class ContextMenusTest {
|
||||
}
|
||||
}
|
||||
|
||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/243833
|
||||
@Test
|
||||
fun verifyContextOpenImageNewTab() {
|
||||
fun verifyOpenImageNewTabContextMenuOptionTest() {
|
||||
val pageLinks =
|
||||
TestAssetHelper.getGenericAsset(mockWebServer, 4)
|
||||
val imageResource =
|
||||
@ -196,8 +177,9 @@ class ContextMenusTest {
|
||||
}
|
||||
}
|
||||
|
||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/243834
|
||||
@Test
|
||||
fun verifyContextCopyImageLocation() {
|
||||
fun verifyCopyImageLocationContextMenuOptionTest() {
|
||||
val pageLinks =
|
||||
TestAssetHelper.getGenericAsset(mockWebServer, 4)
|
||||
val imageResource =
|
||||
@ -216,8 +198,9 @@ class ContextMenusTest {
|
||||
}
|
||||
}
|
||||
|
||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/243835
|
||||
@Test
|
||||
fun verifyContextSaveImage() {
|
||||
fun verifySaveImageContextMenuOptionTest() {
|
||||
val pageLinks =
|
||||
TestAssetHelper.getGenericAsset(mockWebServer, 4)
|
||||
val imageResource =
|
||||
@ -239,8 +222,9 @@ class ContextMenusTest {
|
||||
}
|
||||
}
|
||||
|
||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/352050
|
||||
@Test
|
||||
fun verifyContextMixedVariations() {
|
||||
fun verifyContextMenuLinkVariationsTest() {
|
||||
val pageLinks =
|
||||
TestAssetHelper.getGenericAsset(mockWebServer, 4)
|
||||
val genericURL =
|
||||
@ -262,8 +246,9 @@ class ContextMenusTest {
|
||||
}
|
||||
}
|
||||
|
||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/2333840
|
||||
@Test
|
||||
fun verifyContextMixedVariationsInPDFTest() {
|
||||
fun verifyPDFContextMenuLinkVariationsTest() {
|
||||
val genericURL =
|
||||
TestAssetHelper.getGenericAsset(mockWebServer, 3)
|
||||
|
||||
@ -282,8 +267,9 @@ class ContextMenusTest {
|
||||
}
|
||||
}
|
||||
|
||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/832094
|
||||
@Test
|
||||
fun verifyContextOpenLinkInAppTest() {
|
||||
fun verifyOpenLinkInAppContextMenuOptionTest() {
|
||||
val defaultWebPage = TestAssetHelper.getExternalLinksAsset(mockWebServer)
|
||||
|
||||
navigationToolbar {
|
||||
|
@ -29,6 +29,7 @@ import org.mozilla.fenix.helpers.TestHelper.setTextToClipBoard
|
||||
import org.mozilla.fenix.helpers.TestHelper.verifySnackBarText
|
||||
import org.mozilla.fenix.ui.robots.EngineShortcut
|
||||
import org.mozilla.fenix.ui.robots.homeScreen
|
||||
import org.mozilla.fenix.ui.robots.navigationToolbar
|
||||
import org.mozilla.fenix.ui.robots.searchScreen
|
||||
import java.util.Locale
|
||||
|
||||
@ -507,6 +508,7 @@ class SettingsSearchTest {
|
||||
}
|
||||
|
||||
// TestRail link: https://testrail.stage.mozaws.net/index.php?/cases/view/412927
|
||||
@Ignore("Failing, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1807268")
|
||||
@Test
|
||||
fun verifyShowClipboardSuggestionsToggleTest() {
|
||||
val link = "https://www.mozilla.org/en-US/"
|
||||
@ -516,6 +518,21 @@ class SettingsSearchTest {
|
||||
}.openNavigationToolbar {
|
||||
verifyClipboardSuggestionsAreDisplayed(link, true)
|
||||
}.visitLinkFromClipboard {
|
||||
waitForPageToLoad()
|
||||
}.openTabDrawer {
|
||||
}.openNewTab {
|
||||
}
|
||||
navigationToolbar {
|
||||
// After visiting the link from clipboard it shouldn't be displayed again
|
||||
verifyClipboardSuggestionsAreDisplayed(shouldBeDisplayed = false)
|
||||
}.goBackToHomeScreen {
|
||||
setTextToClipBoard(appContext, link)
|
||||
}.openTabDrawer {
|
||||
}.openNewTab {
|
||||
}
|
||||
navigationToolbar {
|
||||
verifyClipboardSuggestionsAreDisplayed(link, true)
|
||||
}.goBackToHomeScreen {
|
||||
}.openThreeDotMenu {
|
||||
}.openSettings {
|
||||
}.openSearchSubMenu {
|
||||
@ -525,7 +542,10 @@ class SettingsSearchTest {
|
||||
exitMenu()
|
||||
}
|
||||
homeScreen {
|
||||
}.openNavigationToolbar {
|
||||
}.openTabDrawer {
|
||||
}.openNewTab {
|
||||
}
|
||||
navigationToolbar {
|
||||
verifyClipboardSuggestionsAreDisplayed(link, false)
|
||||
}
|
||||
}
|
||||
|
@ -147,23 +147,6 @@ class NavigationToolbarRobot {
|
||||
class Transition {
|
||||
private lateinit var sessionLoadedIdlingResource: SessionLoadedIdlingResource
|
||||
|
||||
fun goBackToWebsite(interact: BrowserRobot.() -> Unit): BrowserRobot.Transition {
|
||||
openEditURLView()
|
||||
clearAddressBarButton().click()
|
||||
assertTrue(
|
||||
mDevice.findObject(
|
||||
UiSelector()
|
||||
.resourceId("$packageName:id/mozac_browser_toolbar_edit_url_view")
|
||||
.textContains(""),
|
||||
).waitForExists(waitingTime),
|
||||
)
|
||||
|
||||
goBackButton()
|
||||
|
||||
BrowserRobot().interact()
|
||||
return BrowserRobot.Transition()
|
||||
}
|
||||
|
||||
fun enterURLAndEnterToBrowser(
|
||||
url: Uri,
|
||||
interact: BrowserRobot.() -> Unit,
|
||||
@ -298,8 +281,9 @@ class NavigationToolbarRobot {
|
||||
return BrowserRobot.Transition()
|
||||
}
|
||||
|
||||
fun goBack(interact: HomeScreenRobot.() -> Unit): HomeScreenRobot.Transition {
|
||||
goBackButton()
|
||||
fun goBackToHomeScreen(interact: HomeScreenRobot.() -> Unit): HomeScreenRobot.Transition {
|
||||
mDevice.pressBack()
|
||||
mDevice.waitForWindowUpdate(packageName, waitingTimeShort)
|
||||
|
||||
HomeScreenRobot().interact()
|
||||
return HomeScreenRobot.Transition()
|
||||
@ -425,7 +409,6 @@ private fun tabsCounter() =
|
||||
mDevice.findObject(By.res("$packageName:id/counter_root"))
|
||||
private fun fillLinkButton() = onView(withId(R.id.fill_link_from_clipboard))
|
||||
private fun clearAddressBarButton() = itemWithResId("$packageName:id/mozac_browser_toolbar_clear_view")
|
||||
private fun goBackButton() = mDevice.pressBack()
|
||||
private fun readerViewToggle() =
|
||||
onView(withParent(withId(R.id.mozac_browser_toolbar_page_actions)))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user