Skip to content

Commit

Permalink
Add tests for JS & HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvipanda committed Feb 15, 2024
1 parent 7436a5b commit 942b910
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions integration-tests/test_vnc.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import tempfile
import time
from pathlib import Path
from urllib.request import urlopen

import pytest
from vncdotool import api
Expand Down Expand Up @@ -133,3 +134,16 @@ def test_vnc_screenshot(container, image_diff, unused_tcp_port):

websocat_proc.kill()
websocat_proc.wait()


def test_desktop_page(container):
origin, token = container
# Check if the rendered HTML file is returned
desktop_url = f'http://{origin}/desktop/?token={token}'
with urlopen(desktop_url) as f:
assert '<title>Jupyter Remote Desktop Proxy</title>' in f.read().decode()

# Check if built JS file is served
js_url = f'http://{origin}/desktop/static/dist/viewer.js?token={token}'
resp = urlopen(js_url)
assert resp.status == 200

0 comments on commit 942b910

Please sign in to comment.