This commit is contained in:
dickmao 2020-02-24 08:25:20 -05:00
parent df83a6aaf2
commit f787e326b0
3 changed files with 13 additions and 12 deletions

View file

@ -25,16 +25,13 @@ Scenario: Resync
And I switch to log expr "ein:log-all-buffer-name"
Then I should see "kernelspecs--complete"
@file
Scenario: File open
Given I am in notebooklist buffer
And I go to word "notebooklist.feature"
And I go to beginning of line
And I click without going top on "Open"
And I clear log expr "ein:log-all-buffer-name"
And I click on "Open"
And I switch to log expr "ein:log-all-buffer-name"
Then I should see "kernelspecs--complete"
And I click without going top on file "Open"
And I switch to buffer like "notebooklist.feature"
Then I should see "File open"
@stop
Scenario: Stop after closing notebook

View file

@ -314,8 +314,8 @@
do (sleep-for 0 1000)
finally do (should (search stop (buffer-string))))))
(When "^I click\\( without going top\\)? on \"\\(.+\\)\"$"
(lambda (stay word)
(When "^I click\\( without going top\\)? on\\( file\\)? \"\\(.+\\)\"$"
(lambda (stay file word)
;; from espuds "go to word" without the '\\b's
(unless stay
(goto-char (point-min)))
@ -327,8 +327,9 @@
(backward-char)
(let ((was (widget-at)))
(When "I press \"RET\"")
(cl-loop until (not (equal was (widget-at)))
do (sleep-for 0 500)))))
(unless file
(cl-loop until (not (equal was (widget-at)))
do (sleep-for 0 500))))))
(When "^I click on dir \"\\(.+\\)\"$"
(lambda (dir)

View file

@ -507,10 +507,13 @@ This function is called via `ein:notebook-after-rename-hook'."
(widget-insert " : " name)
(widget-insert "\n"))
end
if (and (string= type "file") (> (ein:notebook-version-numeric url-or-port) 2))
if (string= type "file")
do (progn (widget-create
'link
:notify (apply-partially #'ein:file-open url-or-port path)
:notify (apply-partially
(lambda (url-or-port* path* &rest _args)
(ein:file-open url-or-port* path*))
url-or-port path)
"Open")
(widget-insert " ")
(widget-insert " : " (ein:format-nbitem-data name last-modified))