For #27135 - Correctly report top sites for a11y services
This commit is contained in:
parent
dbc05b4aa5
commit
9a99666d2b
|
@ -39,7 +39,7 @@ class TopSiteItemViewHolder(
|
|||
private val binding = TopSiteItemBinding.bind(view)
|
||||
|
||||
init {
|
||||
binding.topSiteItem.setOnLongClickListener {
|
||||
itemView.setOnLongClickListener {
|
||||
interactor.onTopSiteMenuOpened()
|
||||
TopSites.longPress.record(TopSites.LongPressExtra(topSite.name()))
|
||||
|
||||
|
@ -72,7 +72,7 @@ class TopSiteItemViewHolder(
|
|||
}
|
||||
|
||||
fun bind(topSite: TopSite, position: Int) {
|
||||
binding.topSiteItem.setOnClickListener {
|
||||
itemView.setOnClickListener {
|
||||
interactor.onSelectTopSite(topSite, position)
|
||||
}
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ class TopSiteItemViewHolderTest {
|
|||
fun `calls interactor on click`() {
|
||||
TopSiteItemViewHolder(binding.root, lifecycleOwner, interactor).bind(pocket, position = 0)
|
||||
|
||||
binding.topSiteItem.performClick()
|
||||
binding.root.performClick()
|
||||
verify { interactor.onSelectTopSite(pocket, position = 0) }
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ class TopSiteItemViewHolderTest {
|
|||
every { testContext.components.analytics } returns mockk(relaxed = true)
|
||||
TopSiteItemViewHolder(binding.root, lifecycleOwner, interactor).bind(pocket, position = 0)
|
||||
|
||||
binding.topSiteItem.performLongClick()
|
||||
binding.root.performLongClick()
|
||||
verify { interactor.onTopSiteMenuOpened() }
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue