diff options
author | Axel Dahlberg <git@valleymnt.com> | 2022-04-08 09:15:29 +0200 |
---|---|---|
committer | Axel Dahlberg <git@valleymnt.com> | 2022-04-08 09:27:26 +0200 |
commit | 55303587b8a88b729113a209c4692c62c72792f9 (patch) | |
tree | 09fcbce047a4ae6c58c00d7f76b9cfc4bfb08778 | |
parent | bf34f18f0938540dd09e059ca565d0aad993634c (diff) | |
download | qutebrowser-55303587b8a88b729113a209c4692c62c72792f9.tar.gz qutebrowser-55303587b8a88b729113a209c4692c62c72792f9.zip |
test(download) no folder chosen
-rw-r--r-- | qutebrowser/mainwindow/prompt.py | 5 | ||||
-rw-r--r-- | tests/end2end/features/downloads.feature | 11 |
2 files changed, 10 insertions, 6 deletions
diff --git a/qutebrowser/mainwindow/prompt.py b/qutebrowser/mainwindow/prompt.py index 119826695..bce46dff5 100644 --- a/qutebrowser/mainwindow/prompt.py +++ b/qutebrowser/mainwindow/prompt.py @@ -478,11 +478,6 @@ class PromptContainer(QWidget): "Can only launch external fileselect for FilenamePrompt, " f"not {self._prompt.__class__.__name__}" ) - picker = config.val.fileselect.folder.command - if not picker: - raise cmdutils.CommandError( - "No external location picker (fileselect.folder.command) configured." - ) # XXX to avoid current cyclic import from qutebrowser.browser import shared folders = shared.choose_file(shared.FileSelectionMode.folder) diff --git a/tests/end2end/features/downloads.feature b/tests/end2end/features/downloads.feature index 8bb15dd73..e1957a679 100644 --- a/tests/end2end/features/downloads.feature +++ b/tests/end2end/features/downloads.feature @@ -689,7 +689,6 @@ Feature: Downloading things from a website. Scenario: Select download path When I set downloads.location.prompt to true - And I set fileselect.handler to external And I setup a fake folder fileselector selecting "(tmpdir)(dirsep)downloads(dirsep)subdir" and writes to a temporary file And I open data/downloads/downloads.html And I run :click-element id download @@ -697,3 +696,13 @@ Feature: Downloading things from a website. And I run :prompt-fileselect-external And I wait until the download is finished Then the downloaded file subdir/download.bin should exist + + Scenario: No download folder chosen + When I set downloads.location.prompt to true + And I set fileselect.folder.command to ['echo', '{}'] + And I open data/downloads/downloads.html + And I run :click-element id download + And I wait for the download prompt for "*" + And I run :prompt-fileselect-external + Then the message "No folder chosen." should be shown + And the download prompt should be shown with "(tmpdir)(dirsep)downloads" |