Improved Map Marker Visibility Based on App Theme (#5744)

* Update map markers

* Modify code to use different map marker for themes

* Update map markers for bookmarked

* Add 2 tests

---------

Co-authored-by: Giannis Karyotakis <110292528+karyotakisg@users.noreply.github.com>
This commit is contained in:
Evangelos Talos 2024-06-09 15:07:02 -04:00 committed by GitHub
parent bde09072fb
commit 22dd69cabb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 225 additions and 81 deletions

View file

@ -234,6 +234,30 @@ class NearbyParentFragmentUnitTest {
verify(presenter, times(1)).onMapReady()
}
@Test @Ignore
@Throws(Exception::class)
fun `test getIconFor bookmarked place in light theme`() {
val place = mock(Place::class.java).apply {
`when`(isMonument()).thenReturn(false)
`when`(pic).thenReturn("")
`when`(exists).thenReturn(true)
}
val icon = Whitebox.invokeMethod<Int>(fragment, "getIconFor", place, true, false)
Assert.assertEquals(R.drawable.ic_custom_map_marker_blue_bookmarked_dark, icon)
}
@Test @Ignore
@Throws(Exception::class)
fun `test getIconFor non-bookmarked monument place`() {
val place = mock(Place::class.java).apply {
`when`(isMonument()).thenReturn(true)
}
val icon = Whitebox.invokeMethod<Int>(fragment, "getIconFor", place, false, false)
Assert.assertEquals(R.drawable.ic_custom_map_marker_monuments, icon)
}
@Test @Ignore
@Throws(Exception::class)
fun testOnToggleChipsClickedCaseVisible() {