Skip to content
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

Screenshot tests are not stable #193

Closed
lihenggui opened this issue Oct 26, 2023 · 4 comments
Closed

Screenshot tests are not stable #193

lihenggui opened this issue Oct 26, 2023 · 4 comments

Comments

@lihenggui
Copy link

lihenggui commented Oct 26, 2023

** Roborazzi version:
1.6.0

** Background:
I updated the screenshot tests in this PR, GitHub actions link.
The tests ran successfully and updated the existing screenshot in the commit (lihenggui/blocker@f4d7804).

After merging the PR into the main branch, the tests will run again. However, this time they failed due to verification issues. It is worth noting that I did not modify the screenshot; it worked fine in the PR but failed on the main branch, indicating instability or inconsistency.

com.merxury.blocker.core.designsystem.SegmentedButtonsScreenshotTests > blockerSegmentedButtons_multipleThemes FAILED
    java.lang.AssertionError at SegmentedButtonsScreenshotTests.kt:43

com.merxury.blocker.core.designsystem.SegmentedButtonsScreenshotTests > blockerOutlineButton_multipleThemes FAILED
    java.lang.AssertionError at SegmentedButtonsScreenshotTests.kt:60

GitHub Action link: https://github.com/lihenggui/blocker/actions/runs/6655600282/job/18088005415.

** Expected:
Since no files changed, tests should run normally regardless of whether it is on the main branch or a PR.

@lihenggui
Copy link
Author

I updated screenshots in a separate pull request by modifying a piece of code. I'm not sure why the changes aren't being detected and included in the previous commit.
lihenggui/blocker#462

@takahirom
Copy link
Owner

takahirom commented Oct 26, 2023

Thank you for bringing this to my attention. I noticed that the task was skipped. This might be an issue related to caching. Regarding the output directory, we have an option to handle it.
image
image
I have created a Pull Request to set the outputDir parameter in order to address the caching issue.
lihenggui/blocker#463
We have some tests in place to check the cache, but I am not entirely confident if the option is functioning as expected. And The option is not currently documented in the README.
https://github.com/takahirom/roborazzi/blob/main/include-build/roborazzi-gradle-plugin/src/integrationTest/java/io/github/takahirom/roborazzi/RoborazziGradleProjectTest.kt#L56

@lihenggui
Copy link
Author

Hi @takahirom I have merged this PR and will monitor for any recurrence of this issue.

@takahirom
Copy link
Owner

takahirom commented Oct 28, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@takahirom @lihenggui and others