mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
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:
parent
bde09072fb
commit
22dd69cabb
13 changed files with 225 additions and 81 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue