|
|
@ -25,6 +25,7 @@ import androidx.compose.ui.test.DeviceConfigurationOverride
|
|
|
|
import androidx.compose.ui.test.ForcedSize
|
|
|
|
import androidx.compose.ui.test.ForcedSize
|
|
|
|
import androidx.compose.ui.test.junit4.createAndroidComposeRule
|
|
|
|
import androidx.compose.ui.test.junit4.createAndroidComposeRule
|
|
|
|
import androidx.compose.ui.test.onNodeWithTag
|
|
|
|
import androidx.compose.ui.test.onNodeWithTag
|
|
|
|
|
|
|
|
import androidx.compose.ui.test.onRoot
|
|
|
|
import androidx.compose.ui.unit.Dp
|
|
|
|
import androidx.compose.ui.unit.Dp
|
|
|
|
import androidx.compose.ui.unit.DpSize
|
|
|
|
import androidx.compose.ui.unit.DpSize
|
|
|
|
import androidx.compose.ui.unit.dp
|
|
|
|
import androidx.compose.ui.unit.dp
|
|
|
@ -139,9 +140,6 @@ class NiaAppScreenSizesScreenshotTests {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private fun testNiaAppScreenshotWithSize(width: Dp, height: Dp, screenshotName: String) {
|
|
|
|
private fun testNiaAppScreenshotWithSize(width: Dp, height: Dp, screenshotName: String) {
|
|
|
|
// TODO: Remove this when https://issuetracker.google.com/issues/327149166 is fixed
|
|
|
|
|
|
|
|
val appTestTag = "APP"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
composeTestRule.setContent {
|
|
|
|
composeTestRule.setContent {
|
|
|
|
CompositionLocalProvider(
|
|
|
|
CompositionLocalProvider(
|
|
|
|
LocalInspectionMode provides true,
|
|
|
|
LocalInspectionMode provides true,
|
|
|
@ -164,7 +162,7 @@ class NiaAppScreenSizesScreenshotTests {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
composeTestRule.onNodeWithTag(appTestTag)
|
|
|
|
composeTestRule.onRoot()
|
|
|
|
.captureRoboImage(
|
|
|
|
.captureRoboImage(
|
|
|
|
"src/testDemo/screenshots/$screenshotName.png",
|
|
|
|
"src/testDemo/screenshots/$screenshotName.png",
|
|
|
|
roborazziOptions = DefaultRoborazziOptions,
|
|
|
|
roborazziOptions = DefaultRoborazziOptions,
|
|
|
|