ivy-wallet
ivy-wallet copied to clipboard
Setup Paparazzi screenshot tests
Please confirm the following
- [X] I checked the current issues for duplicate issues.
What would you like to improve?
Setup Paparazzi https://github.com/cashapp/paparazzi
Because...
Protects us from UI regressions like #2903 and also will catch runtime crashes in the Compose UI.
Description
Setup as expected and execute in the CI. Make a new workflow that's called "Paparazzi screenshot tests" https://github.com/cashapp/paparazzi
Success Criteria
- Git LFS setup
- Proper Paparazzi setup as described in https://github.com/cashapp/paparazzi
- Being able to repord and verify Paparazzi
- CI workflow that run the paparazzi tests
Thank you @ILIYANGERMANOV for raising Issue #2923! 🚀 What's next? Read our Contribution Guidelines 📚.
Tagging @ILIYANGERMANOV for review & approval 👀
I'm on it
Thank you for your interest @Vivekban! 🎉 Issue #2923 is assigned to you. You can work on it! ✅
If you don't want to work on it now, please un-assign yourself so other contributors can take it.
Also, make sure to read our Contribution Guidelines.
@ILIYANGERMANOV I am having trouble integrating paparazzi dependency, below is error log, any idea on fixing issue
Could not resolve all files for configuration ':classpath'.
> Could not find com.android.tools.build:gradle:8.1.1.
Searched in the following locations:
- https://plugins.gradle.org/m2/com/android/tools/build/gradle/8.1.1/gradle-8.1.1.pom
Required by:
project : > app.cash.paparazzi:app.cash.paparazzi.gradle.plugin:1.3.2 > app.cash.paparazzi:paparazzi-gradle-plugin:1.3.2
> Could not find com.android.tools:sdk-common:31.1.2.
Searched in the following locations:
- https://plugins.gradle.org/m2/com/android/tools/sdk-common/31.1.2/sdk-common-31.1.2.pom
Required by:
project : > app.cash.paparazzi:app.cash.paparazzi.gradle.plugin:1.3.2 > app.cash.paparazzi:paparazzi-gradle-plugin:1.3.2`
Hey @Vivekban can you please submit a draft PR? I'll try to help you out when I see the code
@ILIYANGERMANOV Please find the draft PR here https://github.com/Ivy-Apps/ivy-wallet/pull/2978
Thanks
Hey @Vivekban any updates on this one? I commented what might be causing the build errors
@ILIYANGERMANOV Still working on this, will update you shortly.
@ILIYANGERMANOV Hello sorry for the delay! I saw you already did this task here https://github.com/Ivy-Apps/ivy-wallet/pull/3042/files
Just one thing we can run Paparazzi with JUnit-5 by using junit-vintage without downgrading it. Check here for a sample https://github.com/Ivy-Apps/ivy-wallet/pull/3148/files#diff-697f70cdd88ba88fe77eebda60c7e143f6ad1286bca75017421e93ad84fb87df
Let me know If I have to do anything related to this.
@Vivekban no worries, let's keep JUnit4 because it's more stable and integrates better with the IDE and the other testing frameworks. I prefer JUnit4 because:
- the TestParameterInjector is better
- you can run specific tests in the IDE w/o bugs
- most of the Android world doesn't integrate well with JUnit5 and Kotest
- We already migrated to JUnit4 and it's going well even with property-based tests
Feel free to fix the Paparazzi for legacy screens and add some for Home/Accounts if you're up to
Sure, I will add for the remaining screens.
@ILIYANGERMANOV Check this PR https://github.com/Ivy-Apps/ivy-wallet/pull/3158
I have added changes to an account module, do let me know if everything is right? Is yes I will add for other modules and legacy screens.
@ILIYANGERMANOV Please review this PR I have added tests for 5 more modules.
https://github.com/Ivy-Apps/ivy-wallet/pull/3161