Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Fast Feedback Loops with Previews & Screenshot ...

Fast Feedback Loops with Previews & Screenshot Tests

A short presentation about how to Use Previews and Screenshot Tests to get fast feedback loops when implementing UI with Jetpack Compose

The full recording is here
https://www.youtube.com/watch?v=SphQelcGdHk

Sergio Sastre Flórez

January 30, 2025
Tweet

More Decks by Sergio Sastre Flórez

Other Decks in Technology

Transcript

  1. @Gio_Sastre Content ) { fun ContentSubscriptionScreenPreview ( @Composable } @Preview

    AppTheme { } fun ContentSubscriptionScreen ( @Composable subscriptions : ImmutableList<SubscriptionItem> , ) { } @Preview
  2. @Gio_Sastre Content ) { fun ContentSubscriptionScreenPreview ( @Composable } @Preview

    ContentSubscriptionScreen ( subscriptions ) val subscriptions = … AppTheme { } fun ContentSubscriptionScreen ( @Composable subscriptions : ImmutableList<SubscriptionItem> , ) { } @Preview
  3. @Gio_Sastre Content ) { fun ContentSubscriptionScreenPreview ( @Composable } @Preview

    ContentSubscriptionScreen ( subscriptions ) val subscriptions = … AppTheme { } Header ( … ) fun ContentSubscriptionScreen ( @Composable subscriptions : ImmutableList<SubscriptionItem> , ) { } @Preview
  4. @Gio_Sastre Content ) { fun ContentSubscriptionScreenPreview ( @Composable } @Preview

    ContentSubscriptionScreen ( subscriptions ) val subscriptions = … AppTheme { } Header ( … ) SubscriptionsLazyColumn ( items = subscriptions ) { … } fun ContentSubscriptionScreen ( @Composable subscriptions : ImmutableList<SubscriptionItem> , ) { } @Preview
  5. @Gio_Sastre Content ) { fun ContentSubscriptionScreenPreview ( @Composable } @Preview

    ContentSubscriptionScreen ( subscriptions ) val subscriptions = … AppTheme { } Header ( … ) SubscriptionsLazyColumn ( items = subscriptions ) { … } BuySubscriptionButton ( enabled = true ) fun ContentSubscriptionScreen ( @Composable subscriptions : ImmutableList<SubscriptionItem> , ) { } @Preview
  6. @Gio_Sastre @Preview Content ) { fun ContentSubscriptionScreenPreview ( @Composable }

    @Preview ContentSubscriptionScreen ( subscriptions ) val subscriptions = … AppTheme { } Header ( … ) SubscriptionsLazyColumn ( items = subscriptions ) { … } BuySubscriptionButton ( enabled = true ) fun ContentSubscriptionScreen ( @Composable subscriptions : ImmutableList<SubscriptionItem> , ) { }
  7. @Gio_Sastre @Preview Content ) { fun ContentSubscriptionScreenPreview ( @Composable }

    @Preview ContentSubscriptionScreen ( subscriptions ) val subscriptions = … AppTheme { }
  8. @Gio_Sastre @Preview ( fontScale = 1.3f ) @Preview Content )

    { fun ContentSubscriptionScreenPreview ( @Composable } @Preview ContentSubscriptionScreen ( subscriptions ) val subscriptions = … AppTheme { }
  9. @Gio_Sastre @Preview ( fontScale = 1.3f ) S C R

    O L L A B L E @Preview Content ) { fun ContentSubscriptionScreenPreview ( @Composable } @Preview ContentSubscriptionScreen ( subscriptions ) val subscriptions = … AppTheme { }
  10. Roborazzi Paparazzi Compose Preview @Gio_Sastre Auto-generate tests from @Previews @Previews

    source location Fully automated screenshotTest only main Fully automated screenshotTest androidTest
  11. Roborazzi Paparazzi Compose Preview @Gio_Sastre Auto-generate tests from @Previews @Previews

    source location Fully automated screenshotTest only + main screenshotTest androidTest main Fully automated screenshotTest androidTest