Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Update CI-Troubleshooting.md docs
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacnguyen0809 committed Sep 17, 2024
1 parent 6ba89bf commit 85c870c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/CI-Troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

If you see any of the PR checks failing (❌) go to [Actions](https://github.com/Ivy-Apps/ivy-wallet/actions) and find it there. Or simply click "Details" next to the failed check and explore the logs to see why it has failed.

## PR description check

It means that you didn't follow our [official PR template](../.github/PULL_REQUEST_TEMPLATE.md).
Update your PR description with all necessary information. You can also check the exact error by
clicking "Details" on the failing (❌) check.

## Detekt
[Detekt](https://detekt.dev/) is a static code analyzer for Kotlin that we use to enforce code readability and good practices.

Expand Down Expand Up @@ -79,6 +85,15 @@ A screenshot test is an automated test that takes a screenshot of a piece of UI

We also create an annotation called @IvyPreviews to serve the purpose of exporting and checking images for large-sized devices and small-sized devices.

And every time a new module is created and requires the use of screenshot testing, we need to add the plugin for it: id("com.android.compose.screenshot"). In addition, we also need to set the image difference threshold for that module:

`testOptions {
screenshotTests {
imageDifferenceThreshold = BuildConfigConstants.IMAGE_DIFFERENCE_THRESHOLD
}
}`
You can check the implementation in other modules.

1. Run `./gradlew validateDebugScreenshotTest` locally to execute the screenshot testing and identify the specific screens where failures occur.
2. Upon failure, the system generates detailed reports pinpointing the changes introduced since the last successful test run. Review these reports to understand the nature of the failures. You can find the report at the following path: {module}/build/reports/screenshotTest/preview/{variant}/index.html
For example: screen/balance/build/reports/screenshotTest/preview/debug/index.html
Expand Down

0 comments on commit 85c870c

Please sign in to comment.