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:
8
.github/workflows/android-ui-tests.yml
vendored
8
.github/workflows/android-ui-tests.yml
vendored
@@ -18,6 +18,14 @@ jobs:
|
||||
run: ./scripts/verify_test_tag_parity.sh
|
||||
- name: Run unit tests
|
||||
run: ./gradlew :composeApp:testDebugUnitTest
|
||||
- name: Verify screenshot regressions
|
||||
run: ./gradlew :composeApp:verifyRoborazziDebug
|
||||
- name: Upload screenshot diffs on failure
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: roborazzi-diffs
|
||||
path: composeApp/build/outputs/roborazzi/
|
||||
- name: Run instrumented tests (managed device)
|
||||
run: ./gradlew :composeApp:pixel7Api34DebugAndroidTest
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user