Fix tests.

This commit is contained in:
Panagiotis K 2017-10-13 10:39:34 +03:00
parent 10388b0515
commit 630384e07f

View File

@ -255,12 +255,19 @@ Feature: Downloading things from a website.
When I run :download --mhtml http://foobar/
Then the error "Can only download the current page as mhtml." should be shown
Scenario: :download with a directory which doesn't exist
When I run :download --dest (tmpdir)/downloads/somedir/filename http://localhost:(port)/data/downloads/download.bin
Scenario: :download with a filename and directory which doesn't exist
When I run :download --dest (tmpdir)/downloads/somedir/file http://localhost:(port)/data/downloads/download.bin
And I wait for "Asking question <qutebrowser.utils.usertypes.Question default=None mode=<PromptMode.yesno: 1> text='<b>*</b> does not exist. Create it?' title='Create directory?'>, *" in the log
And I run :prompt-accept yes
And I wait until the download filename is finished
Then the downloaded file filename should not exist
And I wait until the download is finished
Then the downloaded file somedir/file should exist
Scenario: :download with a directory which doesn't exist
When I run :download --dest (tmpdir)/downloads/somedir/ http://localhost:(port)/data/downloads/download.bin
And I wait for "Asking question <qutebrowser.utils.usertypes.Question default=None mode=<PromptMode.yesno: 1> text='<b>*</b> does not exist. Create it?' title='Create directory?'>, *" in the log
And I run :prompt-accept yes
And I wait until the download is finished
Then the downloaded file somedir/download.bin should exist
## mhtml downloads