Skip to content

Commit ae32a68

Browse files
committed
update test infrastructure
1 parent 3f54ff7 commit ae32a68

File tree

6 files changed

+47
-2
lines changed

6 files changed

+47
-2
lines changed

.github/workflows/test.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,11 @@ jobs:
149149
run: |
150150
jupyter labextension list
151151
jupyter labextension list 2>&1 | grep -iE '@jupyterhub/jupyter-server-proxy.*OK.*'
152-
python -m jupyterlab.browser_check
152+
153+
# TODO: re-enable when upstream not broken
154+
# - name: Lab extension browser check
155+
# run: |
156+
# python -m jupyterlab.browser_check
153157

154158
- name: Run acceptance tests
155159
run: |

tests/acceptance/Classic.robot

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Documentation Server Proxies in Notebook Classic
77
Library JupyterLibrary
88
Suite Setup Start Notebook Classic Tests
99
Test Setup Switch Window MAIN
10+
Test Tags app:classic
1011

1112
*** Keywords ***
1213
Start Notebook Classic Tests

tests/acceptance/Lab.robot

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ https://robotframework-jupyterlibrary.readthedocs.io/en/stable/.
66
Documentation Server Proxies in Lab
77
Library JupyterLibrary
88
Suite Setup Start Lab Tests
9+
Test Tags app:lab
10+
911

1012
*** Test Cases ***
1113
Lab Loads

tests/acceptance/Notebook.robot

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
*** Comments ***
2+
To learn more about these .robot files, see
3+
https://robotframework-jupyterlibrary.readthedocs.io/en/stable/.
4+
5+
*** Settings ***
6+
Documentation Server Proxies in Notebook
7+
Library JupyterLibrary
8+
Suite Setup Start Notebook Tests
9+
Test Tags app:nmotebook
10+
11+
*** Test Cases ***
12+
Notebook Loads
13+
Capture Page Screenshot 00-smoke.png
14+
15+
*** Keywords ***
16+
Start Notebook Tests
17+
Open Notebook
18+
Tag With JupyterLab Metadata
19+
Set Screenshot Directory ${OUTPUT DIR}${/}notebook
20+
21+
Click Launcher
22+
[Arguments] ${title}
23+
Click Element css:.jp-LauncherCard-label[title^\="${title}"]

tests/acceptance/resources/jupyter_config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,8 @@
1515
"new_browser_tab": false
1616
}
1717
}
18+
},
19+
"LanguageServerManager": {
20+
"autodetect": false
1821
}
1922
}

tests/acceptance/test_acceptance.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99
OUTPUT = HERE.parent.parent / "build/robot"
1010
JUPYTER_SERVER_INFO = None
1111

12+
try:
13+
import notebook
14+
NOTEBOOK_VERSION = int(notebook.__version__.split(".")[0])
15+
except ImportError:
16+
NOTEBOOK_VERSION = None
17+
1218
try:
1319
import jupyter_server
1420

@@ -22,6 +28,12 @@ def test_robot():
2228
pytest.importorskip("JupyterLibrary")
2329

2430
env = dict(**os.environ)
31+
robot_args = ["robot", "--consolecolors=on", f"--outputdir={OUTPUT}"]
32+
33+
if NOTEBOOK_VERSION >= 7:
34+
robot_args += ["--exclude", "app:classic"]
35+
else:
36+
robot_args += ["--exclude", "app:notebook"]
2537

2638
# JUPYTER_LIBRARY_* env vars documentation:
2739
# https://robotframework-jupyterlibrary.readthedocs.io/en/stable/LIMITS.html#notebookapp-vs-serverapp
@@ -40,7 +52,7 @@ def test_robot():
4052
shutil.rmtree(OUTPUT)
4153

4254
return_code = subprocess.call(
43-
["robot", "--consolecolors=on", f"--outputdir={OUTPUT}", str(HERE)],
55+
[*robot_args, str(HERE)],
4456
cwd=str(HERE),
4557
env=env,
4658
)

0 commit comments

Comments
 (0)