Fix images not shown in screenshots (DEV) #3318
Fix images not shown in screenshots (DEV) #3318
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UA approved, no text changes to review
Corona-Warn-App/src/androidTest/java/de/rki/coronawarnapp/bugreporting/DebugLogFragmentTest.kt
Outdated
Show resolved
Hide resolved
@LukasLechnerDev Please run the firebase_screenshots job in CI to make sure these changes did not break anything? |
@mtwalli Screenshots are now here: https://126387-268027139-gh.circle-artifacts.com/0/zips/CWA-Android-Screenshots-789d4dcd64e53da7742cd44f73adf6caf1a92420.zip. Images are now all visible as far as I can tell, but the weird "grey pressed state" issue is still there. |
Thanks!, Did you figure out why the pressed state are appearing in screens ? |
No, unfortunately not. It doesn't happen locally on my devices, so its very hard to fix for me. I guess a potential solution would be to tweak the device on which the screenshots are taken in the CI pipeline (maybe try other Android Versions or a different device altogether, etc. ) |
…enshots' into dev/fix-images-not-shown-in-screenshots
…hub.com/corona-warn-app/cwa-app-android into dev/fix-images-not-shown-in-screenshots
This reverts commit fdb7b7b.
…hub.com/corona-warn-app/cwa-app-android into dev/fix-images-not-shown-in-screenshots
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Kudos, SonarCloud Quality Gate passed! |
Some images in
ImageView
s don't show up in our screenshot tests.We could fix this by replacing these
ImageView
s withAppCompatImageView
s.However, there could be other issues as well, so I decided against this solution and instead now launch the fragments in our screenshot tests in an
AppCompatActivity
.The issue described was related to not using
AppCompatActivity
, because we usedFragmentScenario
which uses the non-AppCompatActivity
calledEmptyFragmentActivity
. Unfortunately, its not possible to use customActivities
withFragmentScenario
=> https://issuetracker.google.com/issues/121347222That's why we now use
ActivityScenario
and provide our own EmptyAppCompatActivity
.Now all images show up.
TODO before merging
firebase_screenshots
in CI pipeline)