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

Added platform-aware golden image logic #79

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

Conversation

caseycrogers
Copy link
Contributor

@caseycrogers caseycrogers commented May 12, 2021

📜 Description

  • Adds Windows-specific golden images
  • Uses the appropriate platform-specific image depending on current environment
  • Skips the test if the current platform is not yet supported (namely Linux)

There's a bug in testWidgets that makes group level test skipping not work. The bug is fixed in Flutter version 2.1.0 (flutter/flutter#76174) but 2.1.0 isn't out on stable yet. We could release this PR now and clean it up a little when 2.1.0 is out (see todo note in PR) or we could wait until the bugfix is out, clean up the PR, and then merge.

💡 Motivation and Context

Golden image tests would fail trivially on any platform but OSX. I'm working in Windows and wanted working golden tests for my PRs against this repo.

💚 How did you test it?

Ran the tests with spoofed platforms to verify skipping and image selection works as intended.

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • I updated the docs if needed
  • All tests passing
  • No breaking changes

🔮 Next steps

  • Merge and release!
  • Update to resolve TODO once Flutter version 2.1.0 is out on stable

@caseycrogers
Copy link
Contributor Author

@ueman flagging for review! This is a super small change to just the golden image tests.

@ueman ueman self-requested a review May 13, 2021 05:05
@ueman
Copy link
Owner

ueman commented May 13, 2021

This is great! Do you mind pulling in the master branch? I just noticed that the tests aren't run on PRs and fixed it there.

On CI the golden image checks would have to be enabled on all platforms.

Though this raises the question how am I supposed to generate those images if I don't have access to one of the other platforms?

I believe it should be doable with a GitHub Workflow.

@caseycrogers
Copy link
Contributor Author

caseycrogers commented May 19, 2021

@ueman I've updated this to pull from master and to remove a TODO regarding a bug in an older version of flutter!

Let me know if you need anymore next steps from me.

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

Successfully merging this pull request may close these issues.

2 participants