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:
Daniel Schadt 2016-07-06 23:16:38 +02:00
parent b130c2a284
commit 7608805c9a
3 changed files with 4 additions and 4 deletions

View File

@ -30,7 +30,7 @@ Feature: Downloading things from a website.
And I open data/downloads/issue1243.html
And I run :hint links download
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
Then no crash should happen
@ -40,7 +40,7 @@ Feature: Downloading things from a website.
And I open data/downloads/issue1214.html
And I run :hint links download
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
Then no crash should happen

View File

@ -312,7 +312,7 @@ Feature: Various utility commands.
And I open data/misc/test.pdf
And I wait for "[qute://pdfjs/*] PDF * (PDF.js: *)" in the log
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
Then no crash should happen

View File

@ -64,7 +64,7 @@ def download_should_exist(filename, tmpdir):
def download_prompt(tmpdir, quteproc, path):
full_path = path.replace('{downloaddir}', str(tmpdir)).replace('/', os.sep)
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))
quteproc.wait_for(message=msg)
quteproc.send_cmd(':leave-mode')