2018-12-05 17:15:02 -05:00
|
|
|
@bread
|
2018-10-01 18:40:31 -04:00
|
|
|
Scenario: Breadcrumbs
|
|
|
|
Given I am in notebooklist buffer
|
2019-10-07 14:13:30 -04:00
|
|
|
When I click on dir "step-definitions" until "ein-steps"
|
2018-10-01 18:40:31 -04:00
|
|
|
And I click on "Home"
|
|
|
|
Then I should see "support"
|
|
|
|
|
2019-09-21 10:50:43 -04:00
|
|
|
@kernel
|
|
|
|
Scenario: Default kernel
|
|
|
|
And I am in notebooklist buffer
|
|
|
|
Then I should see "(*) Python"
|
|
|
|
|
2018-10-01 18:40:31 -04:00
|
|
|
Scenario: New Notebook
|
|
|
|
Given I am in notebooklist buffer
|
|
|
|
When I clear log expr "ein:log-all-buffer-name"
|
|
|
|
And I click on "New Notebook"
|
2020-01-07 11:40:26 -05:00
|
|
|
And no notebooks pending
|
2018-10-01 18:40:31 -04:00
|
|
|
And I switch to log expr "ein:log-all-buffer-name"
|
|
|
|
Then I should see "Opened notebook Untitled"
|
|
|
|
|
|
|
|
Scenario: Resync
|
|
|
|
Given I am in notebooklist buffer
|
|
|
|
When I clear log expr "ein:log-all-buffer-name"
|
|
|
|
And I click on "Resync"
|
|
|
|
And I switch to log expr "ein:log-all-buffer-name"
|
|
|
|
Then I should see "kernelspecs--complete"
|
|
|
|
|
2020-02-24 07:37:36 -05:00
|
|
|
Scenario: File open
|
|
|
|
Given I am in notebooklist buffer
|
|
|
|
And I go to word "notebooklist.feature"
|
|
|
|
And I go to beginning of line
|
2020-02-24 08:25:20 -05:00
|
|
|
And I click without going top on file "Open"
|
|
|
|
And I switch to buffer like "notebooklist.feature"
|
|
|
|
Then I should see "File open"
|
2020-02-24 07:37:36 -05:00
|
|
|
|
2018-11-09 13:02:43 -05:00
|
|
|
@stop
|
|
|
|
Scenario: Stop after closing notebook
|
|
|
|
Given I am in notebooklist buffer
|
2020-02-05 04:37:07 -05:00
|
|
|
Given I clear log expr "ein:log-all-buffer-name"
|
2018-11-09 13:02:43 -05:00
|
|
|
And I click on "New Notebook"
|
2020-01-07 11:40:26 -05:00
|
|
|
And no notebooks pending
|
2018-11-09 13:02:43 -05:00
|
|
|
And I switch to buffer like "Untitled"
|
|
|
|
And I press "C-x k"
|
|
|
|
And I am in notebooklist buffer
|
2020-01-07 11:40:26 -05:00
|
|
|
And I clear log expr "ein:log-all-buffer-name"
|
2018-11-09 13:02:43 -05:00
|
|
|
And I keep clicking "Resync" until "Stop"
|
|
|
|
And I click on "Stop"
|
|
|
|
And I switch to log expr "ein:log-all-buffer-name"
|
2020-02-05 04:37:07 -05:00
|
|
|
And I dump buffer
|
2020-01-12 23:01:26 -05:00
|
|
|
Then I should see "kernel-delete-session--success"
|
2018-11-28 21:29:32 -05:00
|
|
|
And I am in notebooklist buffer
|
|
|
|
And I go to word "Untitled"
|
|
|
|
And I go to beginning of line
|
|
|
|
And I click without going top on "Open"
|
2020-01-07 11:40:26 -05:00
|
|
|
And no notebooks pending
|
|
|
|
And I switch to buffer like "Untitled"
|
2018-11-09 13:02:43 -05:00
|
|
|
|
2020-01-12 23:01:26 -05:00
|
|
|
@delete
|
|
|
|
Scenario: Delete closes buffers and sessions
|
|
|
|
Given I am in notebooklist buffer
|
2020-02-05 04:37:07 -05:00
|
|
|
Given I clear log expr "ein:log-all-buffer-name"
|
2020-01-12 23:01:26 -05:00
|
|
|
And I click on "New Notebook"
|
|
|
|
And no notebooks pending
|
|
|
|
And I switch to buffer like "Untitled"
|
|
|
|
And I am in notebooklist buffer
|
|
|
|
And I clear log expr "ein:log-all-buffer-name"
|
|
|
|
And I click on "Delete"
|
2020-02-05 04:37:07 -05:00
|
|
|
And I wait for buffer to not say "Stop"
|
2020-02-04 20:45:36 -05:00
|
|
|
And I dump buffer
|
2020-01-12 23:01:26 -05:00
|
|
|
Then eval "(should-not (ein:notebook-opened-notebooks)))"
|
|
|
|
Then eval "(should-not (seq-some (lambda (b) (cl-search "Untitled" (buffer-name b))) (buffer-list)))"
|
|
|
|
And I switch to log expr "ein:log-all-buffer-name"
|
2020-02-04 20:45:36 -05:00
|
|
|
Then I should see "kernel-delete-session--success"
|
|
|
|
Then I should see "notebooklist-delete-notebook--complete"
|
2020-01-12 23:01:26 -05:00
|
|
|
|
2018-12-01 18:54:58 -05:00
|
|
|
@content
|
|
|
|
Scenario: Read a massive directory
|
2019-02-14 15:28:18 -05:00
|
|
|
Given I create a directory "/var/tmp/fg7Cv8" with depth 4 and width 8
|
2018-12-01 18:54:58 -05:00
|
|
|
And I get into notebook mode "/var/tmp/fg7Cv8" "8/4/3/bar.ipynb"
|
|
|
|
And I open notebook "bar.ipynb"
|
|
|
|
And I open file "foo.txt"
|
2019-02-14 15:28:18 -05:00
|
|
|
And notebooklist-list-paths does not contain "4/4/4/foo.txt"
|
2018-12-01 18:54:58 -05:00
|
|
|
And notebooklist-list-paths contains "foo.txt"
|
|
|
|
|
2018-10-15 16:57:22 -04:00
|
|
|
@login
|
|
|
|
Scenario: No token server
|
|
|
|
Given I start the server configured "c.NotebookApp.token = u''\n"
|
|
|
|
And I switch to log expr "ein:log-all-buffer-name"
|
|
|
|
Then I should not see "[warn]"
|
|
|
|
And I should not see "[error]"
|
|
|
|
|
2018-10-18 19:01:43 -04:00
|
|
|
@login
|
|
|
|
Scenario: With token server, get from server buffer
|
|
|
|
Given I start the server configured "\n"
|
|
|
|
And I login disabling crib token
|
|
|
|
And I switch to log expr "ein:log-all-buffer-name"
|
|
|
|
Then I should not see "[warn]"
|
|
|
|
And I should not see "[error]"
|
|
|
|
|
2018-10-15 16:57:22 -04:00
|
|
|
@login
|
|
|
|
Scenario: With password server
|
|
|
|
Given I start the server configured "c.NotebookApp.password=u'sha1:712118ed6c09:bc02227d84b76b720cc320b855e1006d0b120f98'\n"
|
|
|
|
And I login with password "foo"
|
|
|
|
And I switch to log expr "ein:log-all-buffer-name"
|
|
|
|
Then I should not see "[warn]"
|
|
|
|
And I should not see "[error]"
|
|
|
|
|
2018-10-18 18:59:33 -04:00
|
|
|
@login
|
2018-10-17 19:34:19 -04:00
|
|
|
Scenario: To the cloud with password
|
|
|
|
Given I start the server configured "c.NotebookApp.password=u'sha1:712118ed6c09:bc02227d84b76b720cc320b855e1006d0b120f98'\n"
|
2018-10-18 19:01:43 -04:00
|
|
|
And I login forcing ping with password "foo"
|
2018-10-17 19:34:19 -04:00
|
|
|
And I switch to log expr "ein:log-all-buffer-name"
|
|
|
|
Then I should not see "[warn]"
|
|
|
|
And I should not see "[error]"
|
|
|
|
|
2018-10-15 16:57:22 -04:00
|
|
|
@login
|
|
|
|
Scenario: Logging into nowhere
|
2018-10-24 13:12:16 -04:00
|
|
|
Given I login erroneously to 0
|
2019-01-21 13:37:27 -05:00
|
|
|
And I switch to log expr "ein:log-all-buffer-name"
|
|
|
|
Then I should see "[error] Login to http://127.0.0.1:0 failed"
|
2018-10-24 13:12:16 -04:00
|
|
|
|
|
|
|
@login
|
|
|
|
Scenario: Logging into nowhere
|
|
|
|
Given I login erroneously to adfljdsf.org:8432
|
2019-01-21 13:37:27 -05:00
|
|
|
And I switch to log expr "ein:log-all-buffer-name"
|
|
|
|
Then I should see "[error] Login to https://adfljdsf.org:8432 failed"
|
|
|
|
|
|
|
|
@login
|
|
|
|
Scenario: Bad curl invocation produces sensible error message
|
|
|
|
Given I start the server configured "\n"
|
|
|
|
And I login with bad curl
|
|
|
|
And I switch to log expr "ein:log-all-buffer-name"
|
|
|
|
Then I should see "no-such-option"
|
2018-10-24 13:12:16 -04:00
|
|
|
|
2019-02-26 18:04:50 -05:00
|
|
|
@login
|
|
|
|
Scenario: jupyter not found
|
|
|
|
And I start bad jupyter path
|
|
|
|
|
2019-06-05 14:30:26 -04:00
|
|
|
@jupyter-notebook
|
|
|
|
Scenario: Someone uses jupyter-notebook
|
|
|
|
Given I customize "ein:jupyter-default-server-command" to "jupyter-notebook"
|
|
|
|
And I set "ein:jupyter-server-use-subcommand" to eval "nil"
|
|
|
|
Given I start and login to the server configured "\n"
|
|
|
|
And I switch to log expr "ein:log-all-buffer-name"
|
|
|
|
Then I should not see "[warn]"
|
|
|
|
And I should not see "[error]"
|
|
|
|
And I customize "ein:jupyter-default-server-command" to "jupyter"
|
|
|
|
And I set "ein:jupyter-server-use-subcommand" to "notebook"
|
|
|
|
|
2018-12-01 18:54:58 -05:00
|
|
|
@login
|
|
|
|
Scenario: With token server
|
2019-02-14 15:28:18 -05:00
|
|
|
Given I start and login to the server configured "\n"
|
2018-12-01 18:54:58 -05:00
|
|
|
And I switch to log expr "ein:log-all-buffer-name"
|
|
|
|
Then I should not see "[warn]"
|
|
|
|
And I should not see "[error]"
|