paparazzi: add a test for month header

This commit is contained in:
Harsh Shandilya 2022-06-25 19:01:02 +05:30
parent 088d8606a6
commit f4253bfc2b
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80
3 changed files with 28 additions and 0 deletions

View file

@ -0,0 +1,28 @@
package dev.msfjarvis.claw.android.tests
import androidx.compose.material3.MaterialTheme
import app.cash.paparazzi.Paparazzi
import dev.msfjarvis.claw.android.ui.decorations.MonthHeader
import dev.msfjarvis.claw.common.theme.DarkThemeColors
import dev.msfjarvis.claw.common.theme.LightThemeColors
import java.time.Month
import org.junit.Rule
import org.junit.Test
class MonthHeaderTest {
@get:Rule val paparazzi = Paparazzi()
@Test
fun light_mode() {
paparazzi.snapshot {
MaterialTheme(colorScheme = LightThemeColors) { MonthHeader(Month.APRIL) }
}
}
@Test
fun dark_mode() {
paparazzi.snapshot {
MaterialTheme(colorScheme = DarkThemeColors) { MonthHeader(Month.JANUARY) }
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB