Skip to content

Commit 936c736

Browse files
authored
Merge pull request #4 from bollwyvl/more-clients
Add more clients
2 parents 28ffb9f + c36505c commit 936c736

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+913
-211
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ See the [acceptance tests][] for examples.
5555

5656
python -m scripts.atest
5757

58+
# Free Software
59+
JupyterLibrary is Free Software under the BSD-3-Clause License. It contains code
60+
from a number of other projects:
61+
62+
- [SeleniumLibrary][] ([APL-2.0][selibrary-license])
63+
- backport of `Press Keys`
64+
- [Jyve][] ([BSD-3-Clause][jyve-license])
65+
- Initial implementations of robot keywords
66+
5867
[acceptance tests]: https://github.com/bollwyvl/robotframework-jupyterlab
5968
[Miniconda3]: https://conda.io/miniconda.html
6069
[binder-badge]: https://mybinder.org/badge_logo.svg
@@ -63,3 +72,9 @@ See the [acceptance tests][] for examples.
6372
[pipeline]: https://dev.azure.com/nickbollweg/nickbollweg/_build/latest?definitionId=2
6473
[docs-badge]: https://readthedocs.org/projects/robotframework-jupyterlibrary/badge/?version=latest
6574
[docs]: https://robotframework-jupyterlibrary.readthedocs.io
75+
76+
[SeleniumLibrary]: https://github.com/robotframework/SeleniumLibrary
77+
[selibrary-license]: https://github.com/robotframework/SeleniumLibrary/blob/master/LICENSE.txt
78+
79+
[Jyve]: https://github.com/deathbeds/jyve
80+
[jyve-license]: https://github.com/deathbeds/jyve/blob/master/LICENSE

anaconda-project.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,24 @@ commands:
3030
env_spec: rfjl37
3131

3232
atest:
33-
unix: rm -rf _artifacts/test_output && python -m scripts.atest
33+
unix: python -m scripts.atest
34+
env_spec: rfjl37
35+
36+
atest:full:
37+
unix: |-
38+
set -eux &&
39+
rm -rf _artifacts/test_output &&
40+
python -m scripts.atest &&
41+
BROWSER=headlesschrome python -m scripts.atest &&
42+
python -m scripts.combine
43+
env_spec: rfjl37
44+
45+
atest:clean:
46+
unix: rm -rf _artifacts/test_output
47+
env_spec: rfjl37
48+
49+
atest:combine:
50+
unix: python -m scripts.combine
3451
env_spec: rfjl37
3552

3653
atest:win:
@@ -45,6 +62,10 @@ commands:
4562
unix: python setup.py sdist --dist-dir=_artifacts/sdist
4663
env_spec: rfjl37
4764

65+
wheel:
66+
unix: python setup.py bdist_wheel --dist-dir=_artifacts/wheel
67+
env_spec: rfjl37
68+
4869
sdist:win:
4970
windows: python setup.py sdist --dist-dir=_artifacts/sdist
5071
env_spec: win_rfjl37

atest/acceptance/01_server/00_basic.robot

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
*** Settings ***
2+
Suite Setup Create Directory ${LOGS}
23
Suite Teardown Terminate All Jupyter Servers
4+
Force Tags server
35
Library JupyterLibrary
46
Library Process
57
Library OperatingSystem
68

9+
*** Variables ***
10+
${LOGS} ${OUTPUT_DIR}${/}${OS}${/}${BROWSER}${/}logs${/}
11+
712
*** Test Cases ***
813
Start one server
9-
${nbserver} = Start New Jupyter Server stdout=${OUTPUT_DIR}${/}one_server.log stderr=STDOUT
14+
${nbserver} = Start New Jupyter Server stdout=${LOGS}1.log stderr=STDOUT
1015
${ready} = Wait for Jupyter Server to be Ready
1116
Should be equal as integers ${ready} 1 msg=One server should be ready
1217
${terminated} = Terminate All Jupyter Servers
@@ -15,11 +20,12 @@ Start one server
1520
Should Contain ${log} The Jupyter Notebook is running msg=Log should contain expected status message
1621

1722
Start three servers
18-
${nb1} = Start New Jupyter Server stdout=${OUTPUT_DIR}${/}one_of_three_server.log stderr=STDOUT
19-
${nb2} = Start New Jupyter Server stdout=${OUTPUT_DIR}${/}two_of_three_server.log stderr=STDOUT
23+
[Setup] Create Directory ${LOGS}3
24+
${nb1} = Start New Jupyter Server stdout=${LOGS}3${/}1.log stderr=STDOUT
25+
${nb2} = Start New Jupyter Server stdout=${LOGS}3${/}2.log stderr=STDOUT
2026
${ready} = Wait for Jupyter Server to be Ready ${nb2} ${nb1}
2127
Should be equal as integers ${ready} 2 msg=Three servers should be ready
22-
${nb3} = Start New Jupyter Server stdout=${OUTPUT_DIR}${/}three_of_three_server.log stderr=STDOUT
28+
${nb3} = Start New Jupyter Server stdout=${LOGS}3${/}3.log stderr=STDOUT
2329
${terminated} = Terminate All Jupyter Servers
2430
Should be equal as integers ${terminated} 3 msg=Three servers should have been terminated
2531
${log1} = Get Process Result ${nb1} stderr=${True}
@@ -31,7 +37,7 @@ Start three servers
3137

3238
Server Files
3339
[Setup] Create File ${OUTPUT_DIR}${/}foo.txt bar
34-
${nb1} = Start New Jupyter Server stdout=${OUTPUT_DIR}${/}files.log stderr=STDOUT
40+
${nb1} = Start New Jupyter Server stdout=${LOGS}files.log stderr=STDOUT
3541
Copy Files to Jupyter Directory ${OUTPUT_DIR}${/}*.txt
3642
${nbdir} = Get Jupyter Directory ${nb1}
3743
${out} = Get File ${nbdir}${/}foo.txt

atest/acceptance/__init__.robot

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
*** Settings ***
2-
Suite Setup Set Screenshot Directory ${OUTPUT_DIR}${/}screenshots
2+
Suite Setup Set Screenshot Directory ${OUTPUT_DIR}${/}${OS}${/}${BROWSER}${/}screenshots
33
Suite Teardown Clean Up Everything
4+
Force Tags os:${OS} browser:${BROWSER}
45
Library JupyterLibrary
56
Library Process
67

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
*** Settings ***
2+
Test Teardown Close All Browsers
3+
Default Tags notebook
4+
Library JupyterLibrary
5+
Library Process
6+
7+
*** Test Cases ***
8+
IPython Notebook on Classic
9+
Open Notebook Classic
10+
Launch a new Notebook Classic Notebook
11+
Add and Run Notebook Classic Code Cell print("hello world")
12+
Wait Until Notebook Classic Kernel Is Idle
13+
Current Notebook Classic Cell Output Should Contain hello world
14+
Capture Page Screenshot classic${/}ipython.png
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
*** Settings ***
22
Suite Setup Wait for New Jupyter Server to be Ready
33
Suite Teardown Terminate All Jupyter Servers
4+
Force Tags client:notebook
45
Library JupyterLibrary

atest/acceptance/10_lab/00_shell.robot renamed to atest/acceptance/lab/00_shell.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ Open JupyterLab
1111
Get Help
1212
Open JupyterLab
1313
Open With JupyterLab Menu Help About JupyterLab
14-
Capture Element Screenshot css:.jp-Dialog-content about.png
14+
Capture Element Screenshot css:.jp-Dialog-content lab${/}about.png
1515
Click Element css:${JLAB CSS ACCEPT}

atest/acceptance/10_lab/10_notebook.robot renamed to atest/acceptance/lab/10_notebook.robot

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,18 @@ Library JupyterLibrary
66
Library Process
77

88
*** Test Cases ***
9-
IPython Notebook
9+
IPython Notebook on Lab
1010
Open JupyterLab
1111
Launch a new JupyterLab Document
1212
Add and Run JupyterLab Code Cell print("hello world")
1313
Wait Until JupyterLab Kernel Is Idle
14-
Capture Page Screenshot ipython.png
14+
Current JupyterLab Cell Output Should Contain hello world
15+
Capture Page Screenshot lab${/}ipython.png
1516

16-
IPython Notebook Outputs
17+
IPython Notebook Outputs on Lab
1718
Open JupyterLab
1819
Launch a new JupyterLab Document
1920
: FOR ${i} IN RANGE ${10}
2021
\ Add and Run JupyterLab Code Cell print("${i} hello world " * ${i ** 2})
2122
Wait Until JupyterLab Kernel Is Idle
22-
Screenshot Each Output of Active JupyterLab Document ipython_outputs${/}
23+
Screenshot Each Output of Active JupyterLab Document lab${/}ipython_outputs${/}

atest/acceptance/lab/__init__.robot

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*** Settings ***
2+
Suite Setup Wait for New Jupyter Server to be Ready
3+
Suite Teardown Terminate All Jupyter Servers
4+
Force Tags client:jupyterlab
5+
Library JupyterLibrary
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
*** Settings ***
2+
Test Teardown Close All Browsers
3+
Default Tags notebook
4+
Library JupyterLibrary
5+
Library Process
6+
7+
*** Test Cases ***
8+
IPython Notebook on nteract
9+
Open nteract
10+
Launch a new nteract Notebook
11+
Add and Run nteract Code Cell print("hello world")
12+
Wait Until nteract Kernel Is Idle
13+
Current nteract Cell Output Should Contain hello world
14+
Capture Page Screenshot nteract${/}ipython.png

0 commit comments

Comments
 (0)