mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-10 15:11:58 +01:00
start kotlin/jetpack compose rewrite
replace the flutter project with a gradle/compose android app: - nix flake dev shell (jdk21, android sdk 35, build-tools 37, gradle) - material3 app with a placeholder screen - roborazzi/robolectric screenshot tests with one golden - carry over the existing launcher/notification assets
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package com.subtracks.ui
|
||||
|
||||
import androidx.activity.ComponentActivity
|
||||
import androidx.compose.ui.test.junit4.createAndroidComposeRule
|
||||
import androidx.compose.ui.test.onRoot
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
import com.github.takahirom.roborazzi.RobolectricDeviceQualifiers
|
||||
import com.github.takahirom.roborazzi.captureRoboImage
|
||||
import com.subtracks.ui.theme.SubtracksTheme
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.robolectric.annotation.Config
|
||||
import org.robolectric.annotation.GraphicsMode
|
||||
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
@GraphicsMode(GraphicsMode.Mode.NATIVE)
|
||||
@Config(qualifiers = RobolectricDeviceQualifiers.PixelXL)
|
||||
class HelloScreenshotTest {
|
||||
@get:Rule
|
||||
val composeRule = createAndroidComposeRule<ComponentActivity>()
|
||||
|
||||
@Test
|
||||
fun hello() {
|
||||
composeRule.setContent {
|
||||
SubtracksTheme {
|
||||
HelloScreen()
|
||||
}
|
||||
}
|
||||
composeRule.onRoot().captureRoboImage("src/test/screenshots/hello.png")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
sdk=34
|
||||
Reference in New Issue
Block a user