-
Notifications
You must be signed in to change notification settings - Fork 351
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
Dockerize System Tests #710
Conversation
@donv would you mind pulling this branch and testing if it still runs system tests however you were running them before? |
I think it may be a dream to make the system tests work on all possible platforms people could be using, since none of them have exactly the same fonts. At least, I haven't seen a good solution to this problem. Let me know if you've seen screenshot tests that work across platforms. |
@lcreid I got a problem:
Will investigate. |
I should have mentioned that I have been using Rails 7.0.8 while working on this PR. |
@donv Did you generate the screenshots for the |
I generated the screenshots on MAC. I have recently, in another project, implemented a scheme for generating the screenshots in GitHub actions and updating them using pull requests from a separate branch for screenshots. This seems to work very well, and I think that should be the way forward. |
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.
The changes look good to me, and all tests are green in my workspace using your fork+branch.
Brilliant! I've created an issue for this, and assigned it to myself. But I'll probably un-assign myself in a day or two, when I don't find time to work on it. Feel free to assign yourself. |
@donv very nicely added system tests that generate screenshots for the
README
. This PR adds support to the optional Docker and Docker Compose files so that the system tests can be run in Docker.The intent is to ensure that system tests can still be run without Docker, but that they will also run for those who prefer to develop in a Docker environment, because they want to isolate their development work, or for whatever other reason.
This PR introduces a new Docker Compose file:
docker-compose-system-test.yml
. This file uses a standard Selenium image for Chrome to run the browser. Part of the reason for a separate file is the currentdocker-compose.yml
results in smaller containers, since it doesn't have the full browser. I also wanted to try things in a completely separate file, to avoid breaking the existing Docker workflow.The approach in this PR is highly experimental and includes some rough edges:
root
. There may be a simple fix for this, but I haven't tried it yet.