//paparazzi/app.cash.paparazzi
Package-level declarations¶
Types¶
Name | Summary |
---|---|
DeviceConfig | [jvm] class DeviceConfig(val screenHeight: Int = 1280, val screenWidth: Int = 768, val xdpi: Int = 320, val ydpi: Int = 320, val orientation: ScreenOrientation = ScreenOrientation.PORTRAIT, val uiMode: UiMode = UiMode.NORMAL, val nightMode: NightMode = NightMode.NOTNIGHT, val density: Density = Density.XHIGH, val fontScale: Float = 1.0f, val layoutDirection: LayoutDirection = LayoutDirection.LTR, val locale: String? = null, val ratio: ScreenRatio = ScreenRatio.NOTLONG, val size: ScreenSize = ScreenSize.NORMAL, val keyboard: Keyboard = Keyboard.NOKEY, val touchScreen: TouchScreen = TouchScreen.FINGER, val keyboardState: KeyboardState = KeyboardState.SOFT, val softButtons: Boolean = true, val navigation: Navigation = Navigation.NONAV, val screenRound: ScreenRound? = null, val released: String = "November 13, 2012") Provides FolderConfiguration and HardwareConfig for various devices. Also provides utility methods to parse build.prop and attrs.xml to generate the appropriate maps. |
Environment | [jvm] class Environment(val appTestDir: String, val packageName: String, val compileSdkVersion: Int, val resourcePackageNames: List<String>, val localResourceDirs: List<String>, val moduleResourceDirs: List<String>, val libraryResourceDirs: List<String>, val allModuleAssetDirs: List<String>, val libraryAssetDirs: List<String>) |
Flags | [jvm] object Flags |
HtmlReportWriter | [jvm] class HtmlReportWriter@JvmOverloadsconstructor(runName: String = defaultRunName(), rootDirectory: File = File(System.getProperty("paparazzi.report.dir")), snapshotRootDirectory: File = File(System.getProperty("paparazzi.snapshot.dir"))) : SnapshotHandler Creates an HTML report that avoids writing files that have already been written. |
InstantAnimationsRule | [jvm] class InstantAnimationsRule : TestRule Sets animation duration scale to 0 so all animations run instantly. Use this with Paparazzi to skip animations and snapshot their terminal state. |
Paparazzi | [jvm] class Paparazzi@JvmOverloadsconstructor(environment: Environment = detectEnvironment(), deviceConfig: DeviceConfig = DeviceConfig.NEXUS_5, theme: String = "android:Theme.Material.NoActionBar.Fullscreen", renderingMode: SessionParams.RenderingMode = RenderingMode.NORMAL, appCompatEnabled: Boolean = true, maxPercentDifference: Double = 0.1, snapshotHandler: SnapshotHandler = determineHandler(maxPercentDifference), renderExtensions: Set<RenderExtension> = setOf(), supportsRtl: Boolean = false, showSystemUi: Boolean = false, validateAccessibility: Boolean = false, useDeviceResolution: Boolean = false) : TestRule |
PaparazziSdk | [jvm] class PaparazziSdk@JvmOverloadsconstructor(environment: Environment = detectEnvironment(), deviceConfig: DeviceConfig = DeviceConfig.NEXUS_5, theme: String = "android:Theme.Material.NoActionBar.Fullscreen", renderingMode: SessionParams.RenderingMode = RenderingMode.NORMAL, appCompatEnabled: Boolean = true, renderExtensions: Set<RenderExtension> = setOf(), supportsRtl: Boolean = false, showSystemUi: Boolean = false, validateAccessibility: Boolean = false, useDeviceResolution: Boolean = false, onNewFrame: (BufferedImage) -> Unit) |
RenderExtension | [jvm] interface RenderExtension An extension for overlaying additional information on top of each rendered frame. |
Snapshot | [jvm] class Snapshot(val name: String?, val testName: TestName, val timestamp: Date, val tags: List<String> = listOf(), val file: String? = null) |
SnapshotHandler | [jvm] interface SnapshotHandler : Closeable |
SnapshotVerifier | [jvm] class SnapshotVerifier@JvmOverloadsconstructor(maxPercentDifference: Double, rootDirectory: File = File(System.getProperty("paparazzi.snapshot.dir"))) : SnapshotHandler |
TestName | [jvm] class TestName(val packageName: String, val className: String, val methodName: String) |
Functions¶
Name | Summary |
---|---|
detectEnvironment | [jvm] fun detectEnvironment(): Environment |