Commit 5010dff6 authored by anonym's avatar anonym
Browse files

Test suite: try to make "double-click on desktop launcher" more reliable.

In particular this enables the retry magic we added for the "Tails
documentation" launcher to the "Report and Error" case since the code
now is refactored and used in all cases.
parent 17aca13c
@product @doc
Feature: Tails documentation
Scenario: The "Report an Error" launcher will open the support documentation
Scenario: The Report an Error launcher will open the support documentation
Given I have started Tails from DVD without network and logged in
When I double-click the Report an Error launcher on the desktop
When I double-click on the Report an Error launcher on the desktop
Then the support documentation page opens in Tor Browser
......@@ -35,15 +35,6 @@ Then /^the shipped (?:Debian repository key|OpenPGP key ([A-Z0-9]+)) will be val
end
end
Then /^I double-click the Report an Error launcher on the desktop$/ do
# Sometimes the double-click is lost (#12131).
retry_action(10) do
@screen.wait_and_double_click('DesktopReportAnError.png', 30)
@torbrowser = Dogtail::Application.new('Firefox')
step 'the Tor Browser has started'
end
end
Then /^the live user has been setup by live\-boot$/ do
assert($vm.execute("test -e /var/lib/live/config/user-setup").success?,
"live-boot failed its user-setup")
......
......@@ -384,7 +384,6 @@ When /^I start the Tor Browser( in offline mode)?$/ do |offline|
.dialog('Tor is not ready')
offline_prompt.button('Start Tor Browser').click
end
@torbrowser = Dogtail::Application.new('Firefox')
step "the Tor Browser has started#{offline}"
if offline
step 'the Tor Browser shows the "The proxy server is refusing connections" error'
......@@ -393,6 +392,7 @@ end
Given /^the Tor Browser has started( in offline mode)?$/ do |offline|
try_for(60) do
@torbrowser = Dogtail::Application.new('Firefox')
@torbrowser.child?(roleName: 'frame', recursive: false)
end
end
......@@ -728,9 +728,15 @@ When /^(no|\d+) application(?:s?) (?:is|are) playing audio(?:| after (\d+) secon
assert_equal(nb.to_i, pulseaudio_sink_inputs)
end
When /^I double-click on the "Tails documentation" link on the Desktop$/ do
@screen.wait_and_double_click("DesktopTailsDocumentationIcon.png", 10)
@torbrowser = Dogtail::Application.new('Firefox')
When /^I double-click on the (Tails documentation|Report an Error) launcher on the desktop$/ do |launcher|
image = 'Desktop' + launcher.split.map { |s| s.capitalize } .join + '.png'
# Sometimes the double-click is lost (#12131).
@trobrowser = nil
retry_action(10) do
@screen.wait_and_double_click(image, 10) unless @trobrowser
step 'the Tor Browser has started'
end
end
When /^I click the blocked video icon$/ do
......
......@@ -102,9 +102,9 @@ Feature: Browsing the web using the Tor Browser
Then I do not see "TorBrowserSynapticManual.png" after at most 5 seconds
@doc
Scenario: The "Tails documentation" link on the Desktop works
Scenario: The Tails documentation launcher on the desktop works
Given I have started Tails from DVD and logged in and the network is connected
When I double-click on the "Tails documentation" link on the Desktop
When I double-click on the Tails documentation launcher on the desktop
Then the Tor Browser has started
And "Tails - Getting started..." has loaded in the Tor Browser
......
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