Closed lcreid closed 8 months ago
@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:
Minitest::UnexpectedError: LoadError: cannot load such file -- sassc
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 README
on a Mac, or Windows, or Linux (distro?)? The reason I ask is that I'm trying to find a font on Linux that will be close (or the same) metrics-wise to your screenshots, so we can at least visually scan the screenshots quickly for significant differences.
@donv Did you generate the screenshots for the
README
on a Mac, or Windows, or Linux (distro?)? The reason I ask is that I'm trying to find a font on Linux that will be close (or the same) metrics-wise to your screenshots, so we can at least visually scan the screenshots quickly for significant differences.
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.
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.
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.