emacs-ipython-notebook/features/notebooklist.feature
dickmao 0490031ec8 Sane File Navigation
As emacs users we prefer and have the luxury of fuzzy file navigation
via ido and projectile.  From a notebook or notebooklist buffer, the commands

`C-c C-f` ein:file-open
`C-c C-o` ein:notebook-open

offer an ido alternative to point and click navigation.

To populate the ido lists, retrieving the content hierarchy is on by
default.  Two custom variables determine how wide and deep the content query
probes (currently at 2 levels deep and 6 directories wide).  Set both
to zero to turn off.

tkf half finished code to quickly go from local file buffers to notebook
mode via `C-c C-z` or `C-c C-o`.  This is now possible.  EIN will
start the server from a suitable parent directory of the visited file.

Enable ido completion for `notebooklist-login`.

Remove the albatross `ein-loaddefs.el` in favor of more standard
`ein-autoloads.el` that is not git tracked.

Convenience `make install` from git source (local alternative to
melpa).
2018-10-26 18:40:19 -04:00

84 lines
2.8 KiB
Gherkin

Scenario: No warnings
Given I switch to log expr "ein:log-all-buffer-name"
Then I should see "[info]"
And I should not see "[warn]"
And I should not see "[error]"
Scenario: Breadcrumbs
Given I am in notebooklist buffer
When I click on dir "step-definitions"
Then I should see "ein-steps"
And I click on "Home"
Then I should see "support"
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"
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"
@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]"
@login
Scenario: With token server
Given I start the server configured "\n"
And I login if necessary
And I switch to log expr "ein:log-all-buffer-name"
Then I should not see "[warn]"
And I should not see "[error]"
@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]"
@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]"
@login
Scenario: To the cloud with password
Given I start the server configured "c.NotebookApp.password=u'sha1:712118ed6c09:bc02227d84b76b720cc320b855e1006d0b120f98'\n"
And I login forcing ping 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]"
@login
Scenario: Logging into nowhere
Given I login erroneously to 0
Then I should see message "ein: [error] Login to http://127.0.0.1:0 failed"
@login
Scenario: Logging into nowhere
Given I login erroneously to adfljdsf.org:8432
Then I should see message "ein: [error] Login to https://adfljdsf.org:8432 failed"
@content
Scenario: Read a massive directory
Given I create a directory "/var/tmp/fg7Cv8" with depth 5 and width 10
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"
And notebooklist-list-paths does not contain "5/5/5/foo.txt"
And notebooklist-list-paths contains "foo.txt"