Skip to content

Commit

Permalink
Update snapshot test
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddharth Agarwal committed Jul 24, 2024
1 parent 6a78682 commit 6243761
Show file tree
Hide file tree
Showing 23 changed files with 11 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.hisp.dhis.mobile.ui.designsystem

import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Search
Expand All @@ -9,7 +8,6 @@ import androidx.compose.material3.Icon
import androidx.compose.ui.Modifier
import org.hisp.dhis.mobile.ui.designsystem.component.AssistChip
import org.hisp.dhis.mobile.ui.designsystem.component.ColumnScreenContainer
import org.hisp.dhis.mobile.ui.designsystem.theme.Spacing
import org.junit.Rule
import org.junit.Test

Expand All @@ -20,7 +18,7 @@ class AssistChipSnapshotTest {
@Test
fun launchAssistChip() {
paparazzi.snapshot {
ColumnScreenContainer(modifier = Modifier.padding(Spacing.Spacing10)) {
ColumnScreenContainer {
AssistChip(
label = "Label",
icon = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ButtonSnapshotTest {
@Test
fun launchButtonSnapshot() {
paparazzi.snapshot {
ColumnScreenContainer() {
ColumnScreenContainer {
Title("Buttons")
SubTitle("Filled")
RowComponentContainer() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
package org.hisp.dhis.mobile.ui.designsystem

import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.CheckCircle
import androidx.compose.material.icons.filled.PhoneEnabled
import androidx.compose.material.icons.outlined.Sync
import androidx.compose.material3.Icon
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import org.hisp.dhis.mobile.ui.designsystem.component.AdditionalInfoItem
import org.hisp.dhis.mobile.ui.designsystem.component.AdditionalInfoItemColor
import org.hisp.dhis.mobile.ui.designsystem.component.CardDetail
import org.hisp.dhis.mobile.ui.designsystem.component.ColumnScreenContainer
import org.hisp.dhis.mobile.ui.designsystem.component.InfoBar
import org.hisp.dhis.mobile.ui.designsystem.component.InfoBarData
import org.hisp.dhis.mobile.ui.designsystem.theme.Spacing
import org.hisp.dhis.mobile.ui.designsystem.theme.SurfaceColor
import org.hisp.dhis.mobile.ui.designsystem.theme.TextColor
import org.junit.Rule
Expand Down Expand Up @@ -68,7 +65,7 @@ class CardDetailSnapshotTest {
@Test
fun launchCardDetail() {
paparazzi.snapshot {
ColumnScreenContainer(title = "Card Detail and Info Bar", modifier = Modifier.padding(horizontal = Spacing.Spacing16)) {
ColumnScreenContainer(title = "Card Detail and Info Bar") {
InfoBar(
InfoBarData(
text = "Not Synced",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
package org.hisp.dhis.mobile.ui.designsystem

import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.FileDownload
import androidx.compose.material3.Icon
import androidx.compose.ui.Modifier
import org.hisp.dhis.mobile.ui.designsystem.component.ColumnScreenContainer
import org.hisp.dhis.mobile.ui.designsystem.component.ExtendedFAB
import org.hisp.dhis.mobile.ui.designsystem.component.FAB
import org.hisp.dhis.mobile.ui.designsystem.component.FABStyle
import org.hisp.dhis.mobile.ui.designsystem.theme.Spacing
import org.junit.Rule
import org.junit.Test

Expand All @@ -21,7 +18,7 @@ class FABSnapshotTest {
@Test
fun launchFAB() {
paparazzi.snapshot {
ColumnScreenContainer(modifier = Modifier.padding(Spacing.Spacing10)) {
ColumnScreenContainer {
FAB(
style = FABStyle.SURFACE,
onClick = {},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.hisp.dhis.mobile.ui.designsystem

import androidx.compose.foundation.layout.padding
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.input.TextFieldValue
import org.hisp.dhis.mobile.ui.designsystem.component.AgeInputType
import org.hisp.dhis.mobile.ui.designsystem.component.ColumnScreenContainer
Expand All @@ -10,7 +8,6 @@ import org.hisp.dhis.mobile.ui.designsystem.component.InputAgeModel
import org.hisp.dhis.mobile.ui.designsystem.component.InputShellState
import org.hisp.dhis.mobile.ui.designsystem.component.SubTitle
import org.hisp.dhis.mobile.ui.designsystem.component.TimeUnitValues
import org.hisp.dhis.mobile.ui.designsystem.theme.Spacing
import org.junit.Rule
import org.junit.Test

Expand All @@ -22,7 +19,7 @@ class InputAgeSnapshotTest {
@Test
fun launchInputAgeSnapshot() {
paparazzi.snapshot {
ColumnScreenContainer(modifier = Modifier.padding(Spacing.Spacing10)) {
ColumnScreenContainer {
SubTitle("Input Age Component - Idle")
InputAge(
InputAgeModel(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package org.hisp.dhis.mobile.ui.designsystem

import androidx.compose.foundation.layout.padding
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import org.hisp.dhis.mobile.ui.designsystem.component.ColumnScreenContainer
import org.hisp.dhis.mobile.ui.designsystem.component.Indicator
import org.hisp.dhis.mobile.ui.designsystem.theme.Spacing
import org.junit.Rule
import org.junit.Test

Expand All @@ -17,7 +14,7 @@ class InputIndicatorSnapshotTest {
@Test
fun launchIndicatorInput() {
paparazzi.snapshot {
ColumnScreenContainer(modifier = Modifier.padding(Spacing.Spacing10)) {
ColumnScreenContainer {
Indicator(
title = "Heart Rate",
content = "160 bpm",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ package org.hisp.dhis.mobile.ui.designsystem

import android.graphics.Bitmap
import android.graphics.BitmapFactory
import androidx.compose.foundation.layout.padding
import androidx.compose.runtime.mutableStateListOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.asImageBitmap
import androidx.compose.ui.graphics.painter.BitmapPainter
Expand All @@ -14,7 +12,6 @@ import org.hisp.dhis.mobile.ui.designsystem.component.ColumnScreenContainer
import org.hisp.dhis.mobile.ui.designsystem.component.InputMatrix
import org.hisp.dhis.mobile.ui.designsystem.component.InputShellState
import org.hisp.dhis.mobile.ui.designsystem.component.internal.ImageCardData
import org.hisp.dhis.mobile.ui.designsystem.theme.Spacing
import org.hisp.dhis.mobile.ui.designsystem.theme.SurfaceColor
import org.junit.Rule
import org.junit.Test
Expand Down Expand Up @@ -82,7 +79,7 @@ class InputMatrixSnapshotTest {
)
}

ColumnScreenContainer(modifier = Modifier.padding(Spacing.Spacing10)) {
ColumnScreenContainer {
InputMatrix(
title = "Label",
data = inputCardData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class InputSequentialSnapshotTest {
)
}

ColumnScreenContainer(modifier = Modifier.padding(Spacing.Spacing10)) {
ColumnScreenContainer {
InputSequential(
title = "Label",
data = inputCardData,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.hisp.dhis.mobile.ui.designsystem

import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.outlined.Login
import androidx.compose.material3.Icon
Expand All @@ -16,7 +15,6 @@ import org.hisp.dhis.mobile.ui.designsystem.component.InputShellState
import org.hisp.dhis.mobile.ui.designsystem.component.InputUser
import org.hisp.dhis.mobile.ui.designsystem.component.model.InputPasswordModel
import org.hisp.dhis.mobile.ui.designsystem.component.model.InputUserModel
import org.hisp.dhis.mobile.ui.designsystem.theme.Spacing
import org.junit.Rule
import org.junit.Test

Expand All @@ -28,7 +26,7 @@ class LoginSnapshotTest {
@Test
fun launchLoginScreen() {
paparazzi.snapshot {
ColumnScreenContainer(title = "Login", modifier = Modifier.padding(Spacing.Spacing10)) {
ColumnScreenContainer(title = "Login") {
InputQRCode(
"Server URL",
inputTextFieldValue = TextFieldValue("https://play.dhis2.org/40"),
Expand Down Expand Up @@ -62,12 +60,12 @@ class LoginSnapshotTest {
imageVector = Icons.AutoMirrored.Outlined.Login,
contentDescription = "Login button",

)
)
},
modifier = Modifier.fillMaxWidth(),
enabled = true,

)
)
}
}
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6243761

Please sign in to comment.