-
Notifications
You must be signed in to change notification settings - Fork 628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue 3243 #3338
Fix issue 3243 #3338
Conversation
349b92a
to
b784a9e
Compare
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 but we need to improve a few bits:
- Build gradle setup must be just applying
ivy.feature
w/o additional configuration - Ideally, we should be able to apply
@IvyPreviews
to a regular preview in the main source set and it to work. - The screenshots must be both in Light & Dark mode
As a rule of thumb, the simpler the dev experience the better. In an ideal world, as a dev I want to get screenshot tests by just making a preview with @IvyPreview
@isaacnguyen0809 just to confirm, we don't use Git LFS, right? Because it wants us to pay
screen/budgets/src/screenshotTestDebug/kotlin/BudgetScreenPreviewTest.kt
Show resolved
Hide resolved
shared/ui/testing/src/main/java/com/ivy/ui/testing/IvyPreviews.kt
Outdated
Show resolved
Hide resolved
screen/accounts/src/screenshotTestDebug/kotlin/AccountTabPreview.kt
Outdated
Show resolved
Hide resolved
screen/accounts/src/screenshotTestDebug/kotlin/AccountTabPreview.kt
Outdated
Show resolved
Hide resolved
413b8a4
to
84b5eeb
Compare
@isaacnguyen0809 can you also change the name of the GitHub Actions workflow to "Screenshot tests" |
Done |
…t test for AccountTab screen, add git ignore for generate screenshot location
…e base screenshot
…Src, move @IvyPreviews to :shared:ui:core
3594606
to
e9852f6
Compare
@ILIYANGERMANOV I have just updated the CI docs. Please review the entire PR to see if any further adjustments are needed. Let me know. |
Hey @isaacnguyen0809 the CI isn't passing. Fix that I guess we can merge |
@ILIYANGERMANOV https://github.com/Ivy-Apps/ivy-wallet/actions/runs/10005833216/job/27657304552?pr=3338 Artifact download URL: https://github.com/Ivy-Apps/ivy-wallet/actions/runs/10005833216/artifacts/1718465769 You can check reports in |
f149c35
to
236241d
Compare
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.
@isaacnguyen0809 I'm mobile only and can't investigate but here are a few reasons why it passes locally but fails on CI:
- Flaky previews: common culprits
LocalDate.now()
,Locale.default()
and all other device-related stuff - Again why do we need the damn
screenshotDebug
source set? I don't like it and it complicates matters without obvious benefit
Suggestions:
- Check the GitHub Actions logs and try to understand what's different?
- Is there a single screenshot test that passes successfully on the CI?
- If yes, then the setup is correct and the failing tests are flaky and must be removed or fixed.
- If no, the setup is broken
screen/attributions/src/screenshotTestDebug/kotlin/AttributionScreenPreviewTest.kt
Show resolved
Hide resolved
@isaacnguyen0809 to fix the CI can you try regenerating all screenshots? Also did you update the Paparazzi scripts in the |
I have done it all. I also tried setting it up to run on one module to see where the problem was. And the result is like the link I attached above. I also just found a ticket that seems to be similar to the problem we are having https://issuetracker.google.com/issues/348590914?pli=1 You can see that they are almost the same but they will not be able to pass the test. So I think the problem is due to rendering on each environment. Maybe that's why we failed |
Got it. Paparazzi has a way to set a % difference tolerance. Can we do (the same with Google's thing? It would be a shame if they don't support it (sorry that I'm reading between the lines) |
@ILIYANGERMANOV Maybe we have to wait for them to develop it, there's already a feature request about it haha. We probably have to postpone this PR |
Is there any known workaround for this? Maybe we can somehow avoid it. If it's just this screen - feel free to tweak the UI or remove the test |
It doesn't pass any tests, this is just me modifying the command to run CI on this module and get the report to check. But I'll try again tomorrow and see if there's a way. I have to go to sleep now haha. Btw, wish you happy weekend |
Thanks for the amazing work! No rush^ Happy weekend, too! |
I'll remove the "keep" feel free to reopen this awesome work once Google fixes the issue |
Pull request (PR) checklist
Please check if your pull request fulfills the following requirements:
main
branch.Description
What's changed?
Risk factors
...
Does this PR close any GitHub issues?
Troubleshooting CI failures ❌
Pull request checks failing? Read our CI Troubleshooting guide.