Commit 41f68532 authored by anonym's avatar anonym
Browse files

Simplify steps used around starting the Tor Browser.

One step to rule them all!
parent 0659913f
......@@ -40,7 +40,7 @@ Feature: Chatting anonymously using Pidgin
Then I see the Tails roadmap URL
When I wait 10 seconds
And I click on the Tails roadmap URL
Then the Tor Browser has started and loaded the Tails roadmap
Then the Tor Browser loads the Tails roadmap
#11453
@check_tor_leaks @fragile
......
......@@ -405,40 +405,33 @@ Given /^available upgrades have been checked$/ do
}
end
Given /^the Tor Browser has started$/ do
Dogtail::Application.new('Firefox').child('', roleName: "document frame").wait(60)
end
When /^I start the Tor Browser$/ do
When /^I start the Tor Browser( in offline mode)?$/ do |offline|
step 'I start "Tor Browser" via the GNOME "Internet" applications menu'
if offline
offline_prompt = Dogtail::Application.new('zenity')
.dialog('Tor is not ready')
offline_prompt.wait(10)
offline_prompt.button('Start Tor Browser').click
end
@torbrowser = Dogtail::Application.new('Firefox').child('', roleName: 'frame')
@torbrowser.wait(60)
if offline
step 'the Tor Browser shows the "The proxy server is refusing connections" error'
end
end
When /^I start the Tor Browser in offline mode$/ do
step "I start the Tor Browser"
offline_prompt = Dogtail::Application.new('zenity')
.dialog('Tor is not ready')
offline_prompt.wait(10)
offline_prompt.button('Start Tor Browser').click
end
Given /^the Tor Browser (?:has started and )?load(?:ed|s) the (startup page|Tails roadmap)$/ do |page|
Given /^the Tor Browser loads the (startup page|Tails roadmap)$/ do |page|
case page
when "startup page"
title = 'Tails - News'
title = 'Tails - Dear Tails user'
when "Tails roadmap"
title = 'Roadmap - Tails - RiseupLabs Code Repository'
else
raise "Unsupported page: #{page}"
end
step "the Tor Browser has started"
step "\"#{title}\" has loaded in the Tor Browser"
end
Given /^the Tor Browser has started in offline mode$/ do
step "the Tor Browser has started"
step 'the Tor Browser shows the "The proxy server is refusing connections" error'
end
When /^I request a new identity using Torbutton$/ do
@screen.wait_and_click('TorButtonIcon.png', 30)
@screen.wait_and_click('TorButtonNewIdentity.png', 30)
......
......@@ -26,7 +26,7 @@ Feature: Tor stream isolation is effective
Scenario: The Tor Browser is using the web browser-specific SocksPort
When I monitor the network connections of Tor Browser
And I start the Tor Browser
And the Tor Browser has started and loaded the startup page
And the Tor Browser loads the startup page
Then I see that Tor Browser is properly stream isolated
@fragile
......
......@@ -11,7 +11,7 @@ Feature: Browsing the web using the Tor Browser
And a web server is running on the LAN
And I capture all network traffic
When I start the Tor Browser
And the Tor Browser has started and loaded the startup page
And the Tor Browser loads the startup page
And I open a page on the LAN web server in the Tor Browser
Then the Tor Browser shows the "Unable to connect" error
And no traffic was sent to the web server on the LAN
......@@ -24,7 +24,7 @@ Feature: Browsing the web using the Tor Browser
And there is a GNOME bookmark for the amnesiac Tor Browser directory
And the persistent Tor Browser directory does not exist
When I start the Tor Browser
And the Tor Browser has started and loaded the startup page
And the Tor Browser loads the startup page
Then I can save the current page as "index.html" to the default downloads directory
And I can print the current page as "output.pdf" to the default downloads directory
......@@ -33,7 +33,7 @@ Feature: Browsing the web using the Tor Browser
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
Then the Tor Browser loads 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
......@@ -44,7 +44,7 @@ Feature: Browsing the web using the Tor Browser
Scenario: Playing HTML5 audio
Given I have started Tails from DVD and logged in and the network is connected
When I start the Tor Browser
And the Tor Browser has started and loaded the startup page
And the Tor Browser loads the startup page
And no application is playing audio
And I open the address "http://www.terrillthompson.com/tests/html5-audio.html" in the Tor Browser
And I click the HTML5 play button
......@@ -54,7 +54,7 @@ Feature: Browsing the web using the Tor Browser
Scenario: Watching a WebM video
Given I have started Tails from DVD and logged in and the network is connected
When I start the Tor Browser
And the Tor Browser has started and loaded the startup page
And the Tor Browser loads the startup page
And I open the address "https://tails.boum.org/lib/test_suite/test.webm" in the Tor Browser
And I click the blocked video icon
And I see "TorBrowserNoScriptTemporarilyAllowDialog.png" after at most 30 seconds
......@@ -74,7 +74,7 @@ Feature: Browsing the web using the Tor Browser
And the file "/tmp/synaptic.html" exists
Given I start monitoring the AppArmor log of "/usr/local/lib/tor-browser/firefox"
When I start the Tor Browser
And the Tor Browser has started and loaded the startup page
And the Tor Browser loads the startup page
And I open the address "file:///home/amnesia/Tor Browser/synaptic.html" in the Tor Browser
Then I see "TorBrowserSynapticManual.png" after at most 5 seconds
And AppArmor has not denied "/usr/local/lib/tor-browser/firefox" from opening "/home/amnesia/Tor Browser/synaptic.html"
......@@ -105,13 +105,11 @@ Feature: Browsing the web using the Tor Browser
Scenario: The "Tails documentation" link 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
Then the Tor Browser has started
And I see "TailsOfflineDocHomepage.png" after at most 10 seconds
Then I see "TailsOfflineDocHomepage.png" after at most 10 seconds
Scenario: The Tor Browser uses TBB's shared libraries
Given I have started Tails from DVD and logged in and the network is connected
When I start the Tor Browser
And the Tor Browser has started
Then the Tor Browser uses all expected TBB shared libraries
#11592
......@@ -119,7 +117,7 @@ Feature: Browsing the web using the Tor Browser
Scenario: The Tor Browser's "New identity" feature works as expected
Given I have started Tails from DVD and logged in and the network is connected
When I start the Tor Browser
And the Tor Browser has started and loaded the startup page
And the Tor Browser loads the startup page
And I open Tails homepage in the Tor Browser
Then Tails homepage loads in the Tor Browser
When I request a new identity using Torbutton
......@@ -131,7 +129,7 @@ Feature: Browsing the web using the Tor Browser
Scenario: The Tor Browser should not have any plugins enabled
Given I have started Tails from DVD and logged in and the network is connected
When I start the Tor Browser
And the Tor Browser has started and loaded the startup page
And the Tor Browser loads the startup page
Then the Tor Browser has no plugins installed
#11592
......@@ -145,7 +143,7 @@ Feature: Browsing the web using the Tor Browser
Then the persistent Tor Browser directory exists
And there is a GNOME bookmark for the persistent Tor Browser directory
When I start the Tor Browser
And the Tor Browser has started and loaded the startup page
And the Tor Browser loads the startup page
And I can save the current page as "index.html" to the persistent Tor Browser directory
When I open the address "file:///home/amnesia/Persistent/Tor Browser/index.html" in the Tor Browser
Then I see "TorBrowserSavedStartupPage.png" after at most 10 seconds
......@@ -160,12 +158,10 @@ Feature: Browsing the web using the Tor Browser
And all persistence configuration files have safe access rights
And all persistent directories have safe access rights
And I start the Tor Browser in offline mode
And the Tor Browser has started in offline mode
And I add a bookmark to eff.org in the Tor Browser
And I warm reboot the computer
And the computer reboots Tails
And I enable read-only persistence
And I log in to a new session
And I start the Tor Browser in offline mode
And the Tor Browser has started in offline mode
Then the Tor Browser has a bookmark to eff.org
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