P8: Roborazzi golden image pipeline live
Records initial golden set + wires verifyRoborazziDebug into CI. Diffs
uploaded as artifact on failure. ScreenshotTests @Ignore removed.
Root cause of the prior RoboMonitoringInstrumentation:102 failure:
createComposeRule() launches ActivityScenarioRule<ComponentActivity>
which fires a MAIN/LAUNCHER intent, but the merged unit-test manifest
declares androidx.activity.ComponentActivity without a LAUNCHER filter,
so Robolectric's PM returns "Unable to resolve activity for Intent".
Fix: switch to the standalone captureRoboImage(path) { composable }
helper from roborazzi-compose, which registers
RoborazziTransparentActivity with Robolectric's shadow PackageManager
at runtime and bypasses ActivityScenario entirely.
Also pin roborazzi outputDir to src/androidUnitTest/roborazzi so
goldens live in git (not build/) and survive gradle clean.
36 goldens, 540KB total.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -222,3 +222,12 @@ compose.desktop {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Roborazzi screenshot-regression plugin (P8). Pin the golden-image
|
||||
// output directory inside the test source set so goldens live in git
|
||||
// alongside the tests themselves. Anything under build/ is gitignored
|
||||
// and gets blown away by `gradle clean` — not where committed goldens
|
||||
// belong.
|
||||
roborazzi {
|
||||
outputDir.set(layout.projectDirectory.dir("src/androidUnitTest/roborazzi"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user