-
Notifications
You must be signed in to change notification settings - Fork 108
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
I will automatically update this comment whenever this PR is modified
|
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.