tests: adjust tests for new download mode
Now the prompt is shown with PromptMode.download instead of PromptMode.text, which we need to change in the tests.
This commit is contained in:
parent
b130c2a284
commit
7608805c9a
@ -30,7 +30,7 @@ Feature: Downloading things from a website.
|
|||||||
And I open data/downloads/issue1243.html
|
And I open data/downloads/issue1243.html
|
||||||
And I run :hint links download
|
And I run :hint links download
|
||||||
And I run :follow-hint a
|
And I run :follow-hint a
|
||||||
And I wait for "Asking question <qutebrowser.utils.usertypes.Question default='qutebrowser-download' mode=<PromptMode.text: 2> text='Save file to:'>, *" in the log
|
And I wait for "Asking question <qutebrowser.utils.usertypes.Question default='qutebrowser-download' mode=<PromptMode.download: 5> text='Save file to:'>, *" in the log
|
||||||
And I run :leave-mode
|
And I run :leave-mode
|
||||||
Then no crash should happen
|
Then no crash should happen
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ Feature: Downloading things from a website.
|
|||||||
And I open data/downloads/issue1214.html
|
And I open data/downloads/issue1214.html
|
||||||
And I run :hint links download
|
And I run :hint links download
|
||||||
And I run :follow-hint a
|
And I run :follow-hint a
|
||||||
And I wait for "Asking question <qutebrowser.utils.usertypes.Question default='binary blob' mode=<PromptMode.text: 2> text='Save file to:'>, *" in the log
|
And I wait for "Asking question <qutebrowser.utils.usertypes.Question default='binary blob' mode=<PromptMode.download: 5> text='Save file to:'>, *" in the log
|
||||||
And I run :leave-mode
|
And I run :leave-mode
|
||||||
Then no crash should happen
|
Then no crash should happen
|
||||||
|
|
||||||
|
@ -312,7 +312,7 @@ Feature: Various utility commands.
|
|||||||
And I open data/misc/test.pdf
|
And I open data/misc/test.pdf
|
||||||
And I wait for "[qute://pdfjs/*] PDF * (PDF.js: *)" in the log
|
And I wait for "[qute://pdfjs/*] PDF * (PDF.js: *)" in the log
|
||||||
And I run :jseval document.getElementById("download").click()
|
And I run :jseval document.getElementById("download").click()
|
||||||
And I wait for "Asking question <qutebrowser.utils.usertypes.Question default='test.pdf' mode=<PromptMode.text: 2> text='Save file to:'>, *" in the log
|
And I wait for "Asking question <qutebrowser.utils.usertypes.Question default='test.pdf' mode=<PromptMode.download: 5> text='Save file to:'>, *" in the log
|
||||||
And I run :leave-mode
|
And I run :leave-mode
|
||||||
Then no crash should happen
|
Then no crash should happen
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ def download_should_exist(filename, tmpdir):
|
|||||||
def download_prompt(tmpdir, quteproc, path):
|
def download_prompt(tmpdir, quteproc, path):
|
||||||
full_path = path.replace('{downloaddir}', str(tmpdir)).replace('/', os.sep)
|
full_path = path.replace('{downloaddir}', str(tmpdir)).replace('/', os.sep)
|
||||||
msg = ("Asking question <qutebrowser.utils.usertypes.Question "
|
msg = ("Asking question <qutebrowser.utils.usertypes.Question "
|
||||||
"default={full_path!r} mode=<PromptMode.text: 2> "
|
"default={full_path!r} mode=<PromptMode.download: 5> "
|
||||||
"text='Save file to:'>, *".format(full_path=full_path))
|
"text='Save file to:'>, *".format(full_path=full_path))
|
||||||
quteproc.wait_for(message=msg)
|
quteproc.wait_for(message=msg)
|
||||||
quteproc.send_cmd(':leave-mode')
|
quteproc.send_cmd(':leave-mode')
|
||||||
|
Loading…
Reference in New Issue
Block a user