Commit c081095b authored by anonym's avatar anonym
Browse files

Automatically test downloading files in Tor Browser.

Per the discussion on ticket #9285 we should exchange the scenario
that tries to open a downloaded file in an external application (which
we now do not allow) with a scenario where we just downloads a file.

Refs: #9285
parent 4114439a
......@@ -159,3 +159,25 @@ Then /^the (.*) runs as the expected user$/ do |browser|
"pgrep --uid #{info[:user]} --full --exact '#{info[:cmd_regex]}'"),
"The #{browser} is not running as the #{info[:user]} user")
end
When /^I download some file in the Tor Browser$/ do
@some_file = 'tails-signing.key'
some_url = "https://tails.boum.org/#{@some_file}"
step "I open the address \"#{some_url}\" in the Tor Browser"
end
Then /^I get the browser download dialog$/ do
@screen.wait('BrowserDownloadDialog.png', 60)
end
When /^I save the file to the default Tor Browser download directory$/ do
@screen.click('BrowserDownloadDialogSaveAsButton.png')
@screen.wait('BrowserDownloadFileToDialog.png', 10)
@screen.type(Sikuli::Key.ENTER)
end
Then /^the file is saved to the default Tor Browser download directory$/ do
assert_not_nil(@some_file)
expected_path = "/home/#{LIVE_USER}/Tor Browser/#{@some_file}"
try_for(10) { $vm.file_exist?(expected_path) }
end
......@@ -37,6 +37,16 @@ Feature: Browsing the web using the Tor Browser
When I accept to import the key with Seahorse
Then I see "KeyImportedNotification.png" after at most 10 seconds
@check_tor_leaks @fragile
Scenario: Downloading files with the Tor Browser
Given I have started Tails from DVD and logged in and the network is connected
When I start the Tor Browser
Then the Tor Browser has started and loaded the startup page
When I download some file in the Tor Browser
Then I get the browser download dialog
When I save the file to the default Tor Browser download directory
Then the file is saved to the default Tor Browser download directory
@check_tor_leaks @fragile
Scenario: Playing HTML5 audio
Given I have started Tails from DVD and logged in and the network is connected
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment