-
Notifications
You must be signed in to change notification settings - Fork 656
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0eb1931
commit c13fae8
Showing
4 changed files
with
50 additions
and
1 deletion.
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
47 changes: 47 additions & 0 deletions
47
...eet/src/test/java/com/stripe/android/common/ui/ElementsBottomSheetLayoutScreenshotTest.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,47 @@ | ||
package com.stripe.android.common.ui | ||
|
||
import androidx.compose.foundation.layout.fillMaxSize | ||
import androidx.compose.foundation.layout.padding | ||
import androidx.compose.material.ExperimentalMaterialApi | ||
import androidx.compose.material.ModalBottomSheetValue | ||
import androidx.compose.material.Text | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.unit.dp | ||
import com.stripe.android.screenshottesting.PaparazziRule | ||
import com.stripe.android.screenshottesting.SystemAppearance | ||
import com.stripe.android.uicore.elements.bottomsheet.rememberStripeBottomSheetState | ||
import org.junit.Rule | ||
import org.junit.Test | ||
|
||
@OptIn(ExperimentalMaterialApi::class) | ||
class ElementsBottomSheetLayoutScreenshotTest { | ||
@get:Rule | ||
val paparazzi = PaparazziRule( | ||
SystemAppearance.entries, | ||
boxModifier = Modifier | ||
.padding(0.dp) | ||
.fillMaxSize(), | ||
) | ||
|
||
@Test | ||
fun testExpanded() { | ||
paparazzi.snapshot { | ||
Text( | ||
text = "My screen", | ||
modifier = Modifier.padding(20.dp) | ||
) | ||
|
||
ElementsBottomSheetLayout( | ||
state = rememberStripeBottomSheetState( | ||
initialValue = ModalBottomSheetValue.Expanded, | ||
), | ||
onDismissed = {}, | ||
) { | ||
Text( | ||
text = "My bottom sheet", | ||
modifier = Modifier.padding(20.dp) | ||
) | ||
} | ||
} | ||
} | ||
} |
Binary file added
BIN
+6.3 KB
...d.common.ui_ElementsBottomSheetLayoutScreenshotTest_testExpanded[DarkTheme].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.61 KB
....common.ui_ElementsBottomSheetLayoutScreenshotTest_testExpanded[LightTheme].png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.