airbnb / Showkase

🔦 Showkase is an annotation-processor based Android library that helps you organize, discover, search and visualize Jetpack Compose UI elements
https://medium.com/airbnb-engineering/introducing-showkase-a-library-to-organize-discover-and-visualize-your-jetpack-compose-elements-d5c34ef01095
Apache License 2.0
2.1k stars 107 forks source link

Add extra metadata to Paparazzi+Showkase artifact for parsing runs information #301

Closed vinaygaba closed 1 year ago

vinaygaba commented 1 year ago

In this PR, I use the name property in the paparazzi snapshot method so that it gets saved in the runs.js file that paparazzi generates. This makes it easier to parse information about the component that was tested in case anyone wants to post-process the paparazzi results. This is what paparazzi will now generate after the tests are run

window.runs["20230207181143_91ec51"] = [
  {
+    "name": "Chips**Basic Chip**Default Style",
     "testName": "com.airbnb.android.showkase.screenshot.testing.paparazzi.sample.MyPaparazziShowkaseScreenshotTest_PaparazziShowkaseTest#test_previews[1.Chips**Basic Chip**Default Style,1.Pixel5,1.Ltr,1.DEFAULT]",
     "timestamp": "2023-02-08T02:11:47.886Z",
     "tags": [],
     "file": "images/6685a9301cca807aeb25fdcd5c4784385e32c4f1.png"
  }
];

@airbnb/showkase-maintainers