-
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.
[ANDROAPP-5165] Add custom colors to tags (#282)
* [ANDROAPP-5165] Add custom colors to tags Signed-off-by: Pablo <[email protected]> * [ANDROAPP-5165] Add success tag type and circular small progress indicator Signed-off-by: Pablo <[email protected]> * add snapshot tests Signed-off-by: Pablo <[email protected]> * add snapshot images Signed-off-by: Pablo <[email protected]> * ktlint Signed-off-by: Pablo <[email protected]> * fix merge with develop Signed-off-by: Pablo <[email protected]> * fix snapshot images Signed-off-by: Pablo <[email protected]> * restore image Signed-off-by: Pablo <[email protected]> --------- Signed-off-by: Pablo <[email protected]>
- Loading branch information
Showing
9 changed files
with
179 additions
and
7 deletions.
There are no files selected for viewing
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
54 changes: 54 additions & 0 deletions
54
...roidUnitTest/kotlin/org/hisp/dhis/mobile/ui/designsystem/ProgressIndicatorSnapshotTest.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,54 @@ | ||
package org.hisp.dhis.mobile.ui.designsystem | ||
|
||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.ui.Modifier | ||
import org.hisp.dhis.mobile.ui.designsystem.component.ColumnComponentContainer | ||
import org.hisp.dhis.mobile.ui.designsystem.component.ProgressIndicator | ||
import org.hisp.dhis.mobile.ui.designsystem.component.ProgressIndicatorType | ||
import org.hisp.dhis.mobile.ui.designsystem.theme.Spacing | ||
import org.junit.Rule | ||
import org.junit.Test | ||
|
||
class ProgressIndicatorSnapshotTest { | ||
|
||
@get:Rule | ||
val paparazzi = paparazzi() | ||
|
||
@Test | ||
fun launchChip() { | ||
paparazzi.snapshot { | ||
ColumnComponentContainer(modifier = Modifier.padding(Spacing.Spacing10)) { | ||
ProgressIndicator( | ||
type = ProgressIndicatorType.LINEAR, | ||
progress = 0.25f, | ||
hasError = false, | ||
) | ||
ProgressIndicator( | ||
type = ProgressIndicatorType.LINEAR, | ||
progress = 0.25f, | ||
hasError = true, | ||
) | ||
ProgressIndicator( | ||
type = ProgressIndicatorType.CIRCULAR, | ||
progress = 0.25f, | ||
hasError = false, | ||
) | ||
ProgressIndicator( | ||
type = ProgressIndicatorType.CIRCULAR, | ||
progress = 0.25f, | ||
hasError = true, | ||
) | ||
ProgressIndicator( | ||
type = ProgressIndicatorType.CIRCULAR_SMALL, | ||
progress = 0.25f, | ||
hasError = false, | ||
) | ||
ProgressIndicator( | ||
type = ProgressIndicatorType.CIRCULAR_SMALL, | ||
progress = 0.25f, | ||
hasError = true, | ||
) | ||
} | ||
} | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...system/src/androidUnitTest/kotlin/org/hisp/dhis/mobile/ui/designsystem/TagSnapshotTest.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,30 @@ | ||
package org.hisp.dhis.mobile.ui.designsystem | ||
|
||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.ui.Modifier | ||
import org.hisp.dhis.mobile.ui.designsystem.component.ColumnComponentContainer | ||
import org.hisp.dhis.mobile.ui.designsystem.component.Tag | ||
import org.hisp.dhis.mobile.ui.designsystem.component.TagType | ||
import org.hisp.dhis.mobile.ui.designsystem.theme.Spacing | ||
import org.junit.Rule | ||
import org.junit.Test | ||
|
||
class TagSnapshotTest { | ||
|
||
@get:Rule | ||
val paparazzi = paparazzi() | ||
|
||
@Test | ||
fun launchChip() { | ||
paparazzi.snapshot { | ||
ColumnComponentContainer(modifier = Modifier.padding(Spacing.Spacing10)) { | ||
TagType.entries.forEach { | ||
Tag( | ||
label = "Label", | ||
type = it, | ||
) | ||
} | ||
} | ||
} | ||
} | ||
} |
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
Binary file modified
BIN
-33.1 KB
(0.38%)
...p.dhis.mobile.ui.designsystem_NavigationBarSnapShotTest_launchNavigationBar.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
...g.hisp.dhis.mobile.ui.designsystem_ProgressIndicatorSnapshotTest_launchChip.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
...hots/images/org.hisp.dhis.mobile.ui.designsystem_TagSnapshotTest_launchChip.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.