-
Notifications
You must be signed in to change notification settings - Fork 72
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
Screenshots with playwright #3023
Screenshots with playwright #3023
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #3023 +/- ##
===========================================
+ Coverage 84.46% 84.52% +0.05%
===========================================
Files 50 50
Lines 5530 5530
===========================================
+ Hits 4671 4674 +3
+ Misses 859 856 -3
Continue to review full report at Codecov.
|
Some questions with this:
|
The pro for Debian is that it's similar to our other images and that might simplify some maintenance. The upside of Ubuntu is that we get more reliable long term support with less fussing for FF+Webkit in the image. One of the advantages of playwright is that it's got compatible browsers bundled in, so I'm leaning towards Ubuntu. |
We lose access to some of the nice internal-to-django stuff like url reversal and such, but perhaps that's a reasonable tradeoff. |
I have no memories of ever having seen this run via Sauce Labs; I think its use predates me. It was never run via CI: people initiated runs from their machine. It would be kind of interesting to find out if this setup works, but I could easily imagine Sauce Labs has a put out a new API or whatever in the interim. I think we can very reasonably ignore/remove any Sauce-related stuff here, and make a separate issue for re-setting it up, referencing the original code as necessary, if we want to get it going again. |
How about that! I didn't know this was around. Added in cb61ebb in order to produce the screenshots that were used for the docs at that point in time. Fun! I think at that time, devs ran Perma on the metal of their machine. I don't remember Firefox being installed in the VirtualBox VM we moved to..... And, we did lots of experimenting and got extremely close to adding Firefox to our Docker container, once we moved from the VM to Docker, but I don't think we ever ended up merging that in. So! I think this task hasn't worked in years. I wonder if, if working, the selectors it targets are still in the markup, if those screenshots are still in the docs... and if they are, if they presently up to date. This sounds like a very low priority side quest, maybe something fun for me to look at on a Friday. If we were re-implementing today, might be able to use headless Chrome's |
The ~equivalent task in the playwright fab file works now (as far as I can tell), so the selectors are all there. |
If it's affordable, would kind of love it for testing, say, the playback of one public Perma Link and one private one. It seems like overkill for the majority of our frontend code, but playback seems intricate enough that concrete assurance it works broadly might be appreciated. What are you thinking, worth pulling the thread, or likely to be more work (either resurrecting the Sauce Labs code, or switching to Browserstack, etc.) than it's worth? |
How's it feeling to you? Are you having doubts? I am kind of delighted any time we can get stuff out of the main container, so that the main container gets closer and closer to what's actually running in prod. I am remembering, for instance, this one very fun bug where I pushed code that unknowingly relied on a package that was installed incidentally as a dependency for a test library. Worked locally, tests passed including in CI.... boom, busted in real life lol. Especially if we are able to take advantage of the pre-built playwright images, complete with installed browsers (which, as said, I'll believe when I see lol), this still sounds like a good plan to me. Re: not having access to Django niceties like URL reversal, we could potentially set up something clever so that the main Django-running container passes the info the functional tests need. For instance: we could give the main perma container the ability to run docker commands (https://github.com/harvard-lil/perma-capture/blob/new-arch-with-vue/docker-compose.yml#L43), and then have pytest fire off each functional tests, sending along whatever info was needed as args to the invocation, or even using a volume to share files, or whatever. Might be more baroque than we need, but might be kind of slick. |
42cc5e3
to
9dfaf85
Compare
A quick summary of changes:
|
2619d26
to
6869fb4
Compare
Since the last update:
I think this is probably ready to send out unless there's an issue with the nginx config change I made, or anything else in the PR. |
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.
Jazzed about this. I haven't seen playwright before; everything seems so clean and tidy!
I had a couple of minuscule questions about the Dockerfile and Pipfile, but LGTM!
6869fb4
to
e78d8a3
Compare
e78d8a3
to
771bc9a
Compare
This fails for me locally unless I also supply an appropriate |
Huh, funny, I see that https://docs.docker.com/engine/reference/builder/#automatic-platform-args-in-the-global-scope says these args are ":only available when using the BuildKit backend." I wonder if you have a different backend. 🤷 tbd |
def0cb4
to
6034847
Compare
This reverts commit 6034847.
I tested the bare |
How about that. That must be what's up with harvard-lil/h2o#1494 too. |
No description provided.