cb6d9e61d1
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2.1 KiB
2.1 KiB
name, kind, lang, domain, version, purity, signature, description, tags, params, output, uses_functions, uses_types, returns, returns_optional, error_type, imports, tested, tests, test_file_path, file_path, notes
| name | kind | lang | domain | version | purity | signature | description | tags | params | output | uses_functions | uses_types | returns | returns_optional | error_type | imports | tested | tests | test_file_path | file_path | notes | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| gradle_screenshot_test | function | bash | infra | 1.0.0 | impure | gradle_screenshot_test(project_dir: string, module: string, flag: string) -> int | Corre screenshot tests Roborazzi de Composables (JVM, no necesita emulador). |
|
|
Stdout build log. Si verify y diff: linea 'DIFF: <path>'. Si record: linea 'RECORDED: <path>'. Exit 0 OK, 1 mismatch. |
|
false | error_go_core | false | bash/functions/infra/gradle_screenshot_test.sh | Roborazzi corre en JVM (Robolectric) — rapido, no necesita emulador. Goldens viven en src/test/snapshots/ y se commitean al repo. App debe declarar plugin io.github.takahirom.roborazzi en build.gradle.kts. |
Ejemplo
# Verificar screenshots (modo CI)
bash bash/functions/infra/gradle_screenshot_test.sh /path/to/MyApp
# Modulo no-default
bash bash/functions/infra/gradle_screenshot_test.sh /path/to/MyApp feature_login
# Re-grabar goldens tras cambio de UI intencional
bash bash/functions/infra/gradle_screenshot_test.sh /path/to/MyApp app --record
Salida
| Situacion | Salida |
|---|---|
| Verify OK | log de Gradle, exit 0 |
| Verify FAIL | log + DIFF: <project>/<module>/build/outputs/roborazzi/, exit 1 |
| Record OK | log + RECORDED: <project>/<module>/src/test/snapshots/, exit 0 |
Notas
Source-able y ejecutable directo. Sourcear gradle_run.sh resuelve JAVA_HOME y ANDROID_HOME de forma identica al resto de funciones gradle_*.