-
Notifications
You must be signed in to change notification settings - Fork 106
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
Remove websockify, add Playwright test #119
Conversation
👈 Launch a binder notebook on this branch for commit cadd5a2 I will automatically update this comment whenever this PR is modified 👈 Launch a binder notebook on this branch for commit c197f3d 👈 Launch a binder notebook on this branch for commit 13d2d49 👈 Launch a binder notebook on this branch for commit fddffc3 👈 Launch a binder notebook on this branch for commit 12eb171 👈 Launch a binder notebook on this branch for commit e5e4e5c 👈 Launch a binder notebook on this branch for commit ccafba7 👈 Launch a binder notebook on this branch for commit 3952c14 👈 Launch a binder notebook on this branch for commit a3981b0 👈 Launch a binder notebook on this branch for commit 857237c 👈 Launch a binder notebook on this branch for commit 70393e5 |
jupyter-server-proxy 4.3.0 includes jupyterhub/jupyter-server-proxy#447
e5e4e5c
to
ccafba7
Compare
@@ -1,7 +1,7 @@ | |||
{ | |||
"dependencies": { | |||
"@floating-ui/dom": "^1.6.1", | |||
"@novnc/novnc": "^1.4.0", | |||
"@novnc/novnc": "~1.4.0", |
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.
See #117
page1.wait_for_timeout(5000) | ||
# Use a non temporary folder so we can check it manually if necessary | ||
screenshot = Path("screenshots") / "desktop.png" | ||
page1.locator("canvas").screenshot(path=screenshot) |
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.
This just screenshots the canvas element which contains only the desktop, and not the surrounding NoVNC elements to help minimise changes. We can change this to page1.screenshot(path=screenshot)
to screenshot the whole page though.
JUPYTER_TOKEN = getenv("JUPYTER_TOKEN", "secret") | ||
|
||
|
||
def compare_screenshot(test_image, threshold=2): |
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.
https://playwright.dev/docs/test-snapshots is not available in Python, this is just a very basic image diff.
@manics this looks amazing! Do you expect this to be non-breaking besides needing jupyter-server-proxy 4.3+? (EDIT: oh we bump jupyter-server-proxy only from 4.1.1 !) |
Added maintenance label, uncertain what fits best - enhancement? Users no longer need to install websockify with this - a good thing. EDIT: Added enhancement instead - this makes it fit to release as v2.1.0 instead of v2.0.2, which feels more appropriate. |
Co-authored-by: Erik Sundell <[email protected]>
jupyter-server-proxy 4.3.0 includes jupyterhub/jupyter-server-proxy#447 so we can remove the dependency on websockify
I've removed the old websockify test (closes #115) and added a Playwright test. Screenshots are uploaded as GitHub artifacts.