mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-15 18:12:54 +00:00
[fenix] Move verifyRecentlyClosedTabsListTest UI test from SmokeTest class
This commit is contained in:
parent
6083d27476
commit
c9a18b8b03
@ -38,6 +38,7 @@ class HistoryTest {
|
|||||||
/* ktlint-disable no-blank-line-before-rbrace */ // This imposes unreadable grouping.
|
/* ktlint-disable no-blank-line-before-rbrace */ // This imposes unreadable grouping.
|
||||||
private lateinit var mockWebServer: MockWebServer
|
private lateinit var mockWebServer: MockWebServer
|
||||||
private var historyListIdlingResource: RecyclerViewIdlingResource? = null
|
private var historyListIdlingResource: RecyclerViewIdlingResource? = null
|
||||||
|
private var recentlyClosedTabsListIdlingResource: RecyclerViewIdlingResource? = null
|
||||||
|
|
||||||
@get:Rule
|
@get:Rule
|
||||||
val activityTestRule = HomeActivityTestRule()
|
val activityTestRule = HomeActivityTestRule()
|
||||||
@ -67,6 +68,10 @@ class HistoryTest {
|
|||||||
if (historyListIdlingResource != null) {
|
if (historyListIdlingResource != null) {
|
||||||
IdlingRegistry.getInstance().unregister(historyListIdlingResource!!)
|
IdlingRegistry.getInstance().unregister(historyListIdlingResource!!)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (recentlyClosedTabsListIdlingResource != null) {
|
||||||
|
IdlingRegistry.getInstance().unregister(recentlyClosedTabsListIdlingResource!!)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -283,4 +288,28 @@ class HistoryTest {
|
|||||||
verifyShareTabUrl()
|
verifyShareTabUrl()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
// This test verifies the Recently Closed Tabs List and items
|
||||||
|
fun verifyRecentlyClosedTabsListTest() {
|
||||||
|
val website = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
||||||
|
|
||||||
|
homeScreen {
|
||||||
|
}.openNavigationToolbar {
|
||||||
|
}.enterURLAndEnterToBrowser(website.url) {
|
||||||
|
mDevice.waitForIdle()
|
||||||
|
}.openTabDrawer {
|
||||||
|
closeTab()
|
||||||
|
}.openTabDrawer {
|
||||||
|
}.openRecentlyClosedTabs {
|
||||||
|
waitForListToExist()
|
||||||
|
recentlyClosedTabsListIdlingResource =
|
||||||
|
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.recently_closed_list), 1)
|
||||||
|
IdlingRegistry.getInstance().register(recentlyClosedTabsListIdlingResource!!)
|
||||||
|
verifyRecentlyClosedTabsMenuView()
|
||||||
|
IdlingRegistry.getInstance().unregister(recentlyClosedTabsListIdlingResource!!)
|
||||||
|
verifyRecentlyClosedTabsPageTitle("Test_Page_1")
|
||||||
|
verifyRecentlyClosedTabsUrl(website.url)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -680,30 +680,6 @@ class SmokeTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
// This test verifies the Recently Closed Tabs List and items
|
|
||||||
fun verifyRecentlyClosedTabsListTest() {
|
|
||||||
val website = TestAssetHelper.getGenericAsset(mockWebServer, 1)
|
|
||||||
|
|
||||||
homeScreen {
|
|
||||||
}.openNavigationToolbar {
|
|
||||||
}.enterURLAndEnterToBrowser(website.url) {
|
|
||||||
mDevice.waitForIdle()
|
|
||||||
}.openTabDrawer {
|
|
||||||
closeTab()
|
|
||||||
}.openTabDrawer {
|
|
||||||
}.openRecentlyClosedTabs {
|
|
||||||
waitForListToExist()
|
|
||||||
recentlyClosedTabsListIdlingResource =
|
|
||||||
RecyclerViewIdlingResource(activityTestRule.activity.findViewById(R.id.recently_closed_list), 1)
|
|
||||||
IdlingRegistry.getInstance().register(recentlyClosedTabsListIdlingResource!!)
|
|
||||||
verifyRecentlyClosedTabsMenuView()
|
|
||||||
IdlingRegistry.getInstance().unregister(recentlyClosedTabsListIdlingResource!!)
|
|
||||||
verifyRecentlyClosedTabsPageTitle("Test_Page_1")
|
|
||||||
verifyRecentlyClosedTabsUrl(website.url)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
// Verifies the Open in a new tab option from the Recently Closed Tabs overflow menu
|
// Verifies the Open in a new tab option from the Recently Closed Tabs overflow menu
|
||||||
fun openRecentlyClosedTabsInNewTabTest() {
|
fun openRecentlyClosedTabsInNewTabTest() {
|
||||||
|
Loading…
Reference in New Issue
Block a user