mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-17 15:26:23 +00:00
[fenix] For https://github.com/mozilla-mobile/fenix/issues/27135 - Correctly report top sites for a11y services
This commit is contained in:
parent
c1afe4be80
commit
e473136c8b
@ -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
Block a user