-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Pablo <[email protected]>
- Loading branch information
Showing
8 changed files
with
108 additions
and
2 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
...roidUnitTest/kotlin/org/hisp/dhis/mobile/ui/designsystem/LocationBarButtonSnapshotTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package org.hisp.dhis.mobile.ui.designsystem | ||
|
||
import org.hisp.dhis.mobile.ui.designsystem.component.LocationBar | ||
import org.junit.Rule | ||
import org.junit.Test | ||
|
||
class LocationBarButtonSnapshotTest { | ||
@get:Rule | ||
val paparazzi = paparazzi() | ||
|
||
@Test | ||
fun launchSearchBarButtonTest() { | ||
paparazzi.snapshot { | ||
LocationBar( | ||
currentResults = emptyList(), | ||
onBackClicked = {}, | ||
onClearLocation = {}, | ||
onSearchLocation = {}, | ||
onLocationSelected = {}, | ||
) | ||
} | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
...roidUnitTest/kotlin/org/hisp/dhis/mobile/ui/designsystem/LocationBarSearchSnapshotTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package org.hisp.dhis.mobile.ui.designsystem | ||
|
||
import org.hisp.dhis.mobile.ui.designsystem.component.LocationBar | ||
import org.hisp.dhis.mobile.ui.designsystem.component.SearchBarMode | ||
import org.hisp.dhis.mobile.ui.designsystem.component.model.LocationItemModel | ||
import org.junit.Rule | ||
import org.junit.Test | ||
|
||
class LocationBarSearchSnapshotTest { | ||
@get:Rule | ||
val paparazzi = paparazzi() | ||
|
||
@Test | ||
fun launchSearchBarButtonTest() { | ||
paparazzi.snapshot { | ||
LocationBar( | ||
currentResults = listOf( | ||
LocationItemModel.StoredResult( | ||
"Location Item title", | ||
"Location Item address", | ||
0.0, | ||
0.0 | ||
), | ||
LocationItemModel.SearchResult( | ||
"Location Item title 2", | ||
"Location Item address 2", | ||
0.0, | ||
0.0 | ||
) | ||
), | ||
mode = SearchBarMode.SEARCH, | ||
onBackClicked = {}, | ||
onClearLocation = {}, | ||
onSearchLocation = {}, | ||
onLocationSelected = {}, | ||
) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...ile.ui.designsystem_LocationBarButtonSnapshotTest_launchSearchBarButtonTest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...ile.ui.designsystem_LocationBarSearchSnapshotTest_launchSearchBarButtonTest.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.