No issue: refactor verifyLinkFromClipboardNotDisplayedTest UI test
This commit is contained in:
parent
324e0cfac7
commit
cf70dd11ca
|
@ -135,7 +135,6 @@ class ContextMenusTest {
|
|||
|
||||
navigationToolbar {
|
||||
}.enterURLAndEnterToBrowser(pageLinks.url) {
|
||||
mDevice.waitForIdle()
|
||||
longClickMatchingText("Link 3")
|
||||
verifyLinkContextMenuItems(genericURL.url)
|
||||
clickContextCopyLink()
|
||||
|
@ -145,7 +144,9 @@ class ContextMenusTest {
|
|||
verifyUrl(genericURL.url.toString())
|
||||
}.openTabDrawer {
|
||||
}.openNewTab {
|
||||
verifyFillLinkButton()
|
||||
}
|
||||
navigationToolbar {
|
||||
verifyClipboardSuggestionsAreDisplayed(shouldBeDisplayed = false)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ class NavigationToolbarRobot {
|
|||
readerViewToggle().click()
|
||||
}
|
||||
|
||||
fun verifyClipboardSuggestionsAreDisplayed(link: String, shouldBeDisplayed: Boolean) {
|
||||
fun verifyClipboardSuggestionsAreDisplayed(link: String = "", shouldBeDisplayed: Boolean) {
|
||||
when (shouldBeDisplayed) {
|
||||
true -> {
|
||||
assertTrue(
|
||||
|
|
|
@ -187,7 +187,6 @@ class SearchRobot {
|
|||
onView(withContentDescription(expectedText))
|
||||
}
|
||||
fun verifyDefaultSearchEngine(expectedText: String) = assertDefaultSearchEngine(expectedText)
|
||||
fun verifyFillLinkButton() = assertFillLinkButton()
|
||||
|
||||
fun verifyEnginesListShortcutContains(rule: ComposeTestRule, searchEngineName: String) = assertEngineListShortcutContains(rule, searchEngineName)
|
||||
|
||||
|
@ -534,12 +533,6 @@ private fun assertTranslatedFocusedNavigationToolbar(toolbarHintString: String)
|
|||
).waitForExists(waitingTime),
|
||||
)
|
||||
|
||||
private fun assertFillLinkButton() {
|
||||
mDevice.waitForIdle()
|
||||
onView(withId(R.id.fill_link_from_clipboard))
|
||||
.check(matches(withEffectiveVisibility(ViewMatchers.Visibility.GONE)))
|
||||
}
|
||||
|
||||
private val awesomeBar =
|
||||
mDevice.findObject(UiSelector().resourceId("$packageName:id/mozac_browser_toolbar_edit_url_view"))
|
||||
|
||||
|
|
Loading…
Reference in New Issue