Shopify / android-testify

Add screenshots to your Android tests
https://testify.dev
MIT License
231 stars 23 forks source link

201: Add example of Compose UI to Sample app #253

Closed DanielJette closed 2 years ago

DanielJette commented 2 years ago

What does this change accomplish?

Relates to https://github.com/Shopify/android-testify/issues/201

How have you achieved it?

This PR adds a new Activity, ComposeActivity, to the Sample application. ComposeActivity can be used to demonstrate how to capture and test an Activity which uses Jetpack Compose UI.

Tophat instructions

  1. Launch the app
  2. Select the overflow menu on the MainActivity
  3. Select Jetpack Compose sample
  4. Verify that the activity loads correctly
  5. Run the screenshot test:
    ./gradlew :Sample:screenshotTest -PtestClass=com.shopify.testify.sample.ComposeActivityScreenshotTest

Notice

This change must keep master in a shippable state; it may be shipped without further notice.

DanielJette commented 2 years ago

cc @udeyrishi