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

Add a test to introduce compose screenshot testing #4835

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dshokouhi
Copy link
Member

@dshokouhi dshokouhi commented Nov 21, 2024

Summary

Stumbled upon the following page and thought it might be good to add these tests to ensure we dont break the UI, for now a very simple test to compare the entity list just to provide a concept. I like the ease of use of the compose screenshot tool as it plays very very nice with our existing previews. Wear OS first as we have seen the alpha compose builds break things. I think it might be nice to add tests for all of our previews so we can use them more. One thing to consider is that we may need to duplicate the preview code so we can continue to see the previews wehn editing the file. Maybe there is a better way I am not seeing but for now I copied a very simple preview for this.

https://developer.android.com/studio/preview/compose-screenshot-testing

open to suggestions also wanted to submit the action to see how it flows.

Screenshots

Example report:
image

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#

Any other notes

If this is approach is acceptable then the readme should be updated here to help contributors understand how to update reference images if they need to.

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

Successfully merging this pull request may close these issues.

1 participant