Remove {downloaddir} in downloads.feature
We can just use (tmpdir) instead which we already use everywhere else as well.
This commit is contained in:
parent
0ba74ad023
commit
b2d8905d68
@ -349,7 +349,7 @@ Feature: Downloading things from a website.
|
|||||||
When I set storage -> prompt-download-directory to true
|
When I set storage -> prompt-download-directory to true
|
||||||
And I set completion -> download-path-suggestion to path
|
And I set completion -> download-path-suggestion to path
|
||||||
And I open data/downloads/download.bin
|
And I open data/downloads/download.bin
|
||||||
Then the download prompt should be shown with "{downloaddir}/"
|
Then the download prompt should be shown with "(tmpdir)/"
|
||||||
|
|
||||||
Scenario: completion -> download-path-suggestion = filename
|
Scenario: completion -> download-path-suggestion = filename
|
||||||
When I set storage -> prompt-download-directory to true
|
When I set storage -> prompt-download-directory to true
|
||||||
@ -361,7 +361,7 @@ Feature: Downloading things from a website.
|
|||||||
When I set storage -> prompt-download-directory to true
|
When I set storage -> prompt-download-directory to true
|
||||||
And I set completion -> download-path-suggestion to both
|
And I set completion -> download-path-suggestion to both
|
||||||
And I open data/downloads/download.bin
|
And I open data/downloads/download.bin
|
||||||
Then the download prompt should be shown with "{downloaddir}/download.bin"
|
Then the download prompt should be shown with "(tmpdir)/download.bin"
|
||||||
|
|
||||||
## storage -> remember-download-directory
|
## storage -> remember-download-directory
|
||||||
|
|
||||||
@ -371,21 +371,19 @@ Feature: Downloading things from a website.
|
|||||||
And I set storage -> remember-download-directory to true
|
And I set storage -> remember-download-directory to true
|
||||||
And I open data/downloads/download.bin
|
And I open data/downloads/download.bin
|
||||||
And I wait for the download prompt for "*/download.bin"
|
And I wait for the download prompt for "*/download.bin"
|
||||||
# (tmpdir) equals {downloaddir}
|
|
||||||
And I run :prompt-accept (tmpdir)/subdir
|
And I run :prompt-accept (tmpdir)/subdir
|
||||||
And I open data/downloads/download2.bin
|
And I open data/downloads/download2.bin
|
||||||
Then the download prompt should be shown with "{downloaddir}/subdir/download2.bin"
|
Then the download prompt should be shown with "(tmpdir)/subdir/download2.bin"
|
||||||
|
|
||||||
Scenario: Not remembering the last download directory
|
Scenario: Not remembering the last download directory
|
||||||
When I set storage -> prompt-download-directory to true
|
When I set storage -> prompt-download-directory to true
|
||||||
And I set completion -> download-path-suggestion to both
|
And I set completion -> download-path-suggestion to both
|
||||||
And I set storage -> remember-download-directory to false
|
And I set storage -> remember-download-directory to false
|
||||||
And I open data/downloads/download.bin
|
And I open data/downloads/download.bin
|
||||||
And I wait for the download prompt for "{downloaddir}/download.bin"
|
And I wait for the download prompt for "(tmpdir)/download.bin"
|
||||||
# (tmpdir) equals {downloaddir}
|
|
||||||
And I run :prompt-accept (tmpdir)/subdir
|
And I run :prompt-accept (tmpdir)/subdir
|
||||||
And I open data/downloads/download2.bin
|
And I open data/downloads/download2.bin
|
||||||
Then the download prompt should be shown with "{downloaddir}/download2.bin"
|
Then the download prompt should be shown with "(tmpdir)/download2.bin"
|
||||||
|
|
||||||
# Overwriting files
|
# Overwriting files
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ def wait_for_download_finished_name(quteproc, name):
|
|||||||
|
|
||||||
@bdd.when(bdd.parsers.parse('I wait for the download prompt for "{path}"'))
|
@bdd.when(bdd.parsers.parse('I wait for the download prompt for "{path}"'))
|
||||||
def wait_for_download_prompt(tmpdir, quteproc, path):
|
def wait_for_download_prompt(tmpdir, quteproc, path):
|
||||||
full_path = path.replace('{downloaddir}', str(tmpdir)).replace('/', os.sep)
|
full_path = path.replace('(tmpdir)', str(tmpdir)).replace('/', os.sep)
|
||||||
quteproc.wait_for(message=PROMPT_MSG.format(full_path))
|
quteproc.wait_for(message=PROMPT_MSG.format(full_path))
|
||||||
|
|
||||||
|
|
||||||
@ -101,7 +101,7 @@ def download_size(filename, size, tmpdir):
|
|||||||
@bdd.then(bdd.parsers.parse('The download prompt should be shown with '
|
@bdd.then(bdd.parsers.parse('The download prompt should be shown with '
|
||||||
'"{path}"'))
|
'"{path}"'))
|
||||||
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('(tmpdir)', str(tmpdir)).replace('/', os.sep)
|
||||||
quteproc.wait_for(message=PROMPT_MSG.format(full_path))
|
quteproc.wait_for(message=PROMPT_MSG.format(full_path))
|
||||||
quteproc.send_cmd(':leave-mode')
|
quteproc.send_cmd(':leave-mode')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user