From b2d8905d684639135d4af9cf1543ba167be569f4 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sat, 10 Sep 2016 16:23:01 +0200 Subject: [PATCH] Remove {downloaddir} in downloads.feature We can just use (tmpdir) instead which we already use everywhere else as well. --- tests/end2end/features/downloads.feature | 12 +++++------- tests/end2end/features/test_downloads_bdd.py | 4 ++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/tests/end2end/features/downloads.feature b/tests/end2end/features/downloads.feature index 47d20b5a1..07f5563e6 100644 --- a/tests/end2end/features/downloads.feature +++ b/tests/end2end/features/downloads.feature @@ -349,7 +349,7 @@ Feature: Downloading things from a website. When I set storage -> prompt-download-directory to true And I set completion -> download-path-suggestion to path 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 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 And I set completion -> download-path-suggestion to both 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 @@ -371,21 +371,19 @@ Feature: Downloading things from a website. And I set storage -> remember-download-directory to true And I open data/downloads/download.bin And I wait for the download prompt for "*/download.bin" - # (tmpdir) equals {downloaddir} And I run :prompt-accept (tmpdir)/subdir 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 When I set storage -> prompt-download-directory to true And I set completion -> download-path-suggestion to both And I set storage -> remember-download-directory to false And I open data/downloads/download.bin - And I wait for the download prompt for "{downloaddir}/download.bin" - # (tmpdir) equals {downloaddir} + And I wait for the download prompt for "(tmpdir)/download.bin" And I run :prompt-accept (tmpdir)/subdir 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 diff --git a/tests/end2end/features/test_downloads_bdd.py b/tests/end2end/features/test_downloads_bdd.py index 5990d9b3d..a267a005b 100644 --- a/tests/end2end/features/test_downloads_bdd.py +++ b/tests/end2end/features/test_downloads_bdd.py @@ -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}"')) 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)) @@ -101,7 +101,7 @@ def download_size(filename, size, tmpdir): @bdd.then(bdd.parsers.parse('The download prompt should be shown with ' '"{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.send_cmd(':leave-mode')