Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
Recent bookmarks controller tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Elise Richards committed Aug 23, 2021
1 parent 7f179f1 commit 8b31dba
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ class DefaultRecentBookmarksControllerTest {
newTab = true,
from = BrowserDirection.FromHome
)
activity.components.core.metrics.track(Event.BookmarkClicked)
}
verify { metrics.track(Event.BookmarkClicked) }
verify(exactly = 0) {
navController.navigateUp()
}
Expand All @@ -111,8 +111,8 @@ class DefaultRecentBookmarksControllerTest {

val directions = HomeFragmentDirections.actionGlobalBookmarkFragment(BookmarkRoot.Mobile.id)
verify {
activity.components.core.metrics.track(Event.ShowAllBookmarks)
navController.navigate(directions)
metrics.track(Event.ShowAllBookmarks)
}
verify(exactly = 0) {
navController.navigateUp()
Expand All @@ -128,11 +128,12 @@ class DefaultRecentBookmarksControllerTest {
controller.handleShowAllBookmarksClicked()

val directions = HomeFragmentDirections.actionGlobalBookmarkFragment(BookmarkRoot.Mobile.id)

verify {
activity.components.core.metrics.track(Event.ShowAllBookmarks)
controller.dismissSearchDialogIfDisplayed()
navController.navigateUp()
navController.navigate(directions)
metrics.track(Event.ShowAllBookmarks)
}
}
}

0 comments on commit 8b31dba

Please sign in to comment.