Commit 3e032ce4 authored by segfault's avatar segfault
Browse files

Merge branch 'test/11592-load-page-in-torbrowser-is-fragile+force-all-tests'...

Merge branch 'test/11592-load-page-in-torbrowser-is-fragile+force-all-tests' into devel (Closes: #11592)
parents b504ca56 a031936f
......@@ -109,9 +109,11 @@ When /^I open the address "([^"]*)" in the (.*)$/ do |address, browser|
end
end
# This step is limited to the Tor Browser due to #7502 since dogtail
# uses the same interface.
Then /^"([^"]+)" has loaded in the Tor Browser$/ do |title|
def page_has_loaded_in_the_Tor_Browser(page_titles, language)
if page_titles.class == String
page_titles = [ page_titles ]
end
assert_equal(Array, page_titles.class)
if @language == 'German'
browser_name = 'Tor-Browser'
reload_action = 'Neu laden'
......@@ -119,13 +121,24 @@ Then /^"([^"]+)" has loaded in the Tor Browser$/ do |title|
browser_name = 'Tor Browser'
reload_action = 'Reload'
end
expected_title = "#{title} - #{browser_name}"
try_for(60) { @torbrowser.child?(expected_title, roleName: 'frame') }
# The 'Reload' button (graphically shown as a looping arrow)
# is only shown when a page has loaded, so once we see the
# expected title *and* this button has appeared, then we can be sure
# that the page has fully loaded.
try_for(120) { @torbrowser.child?(reload_action, roleName: 'push button') }
try_for(120) {
# The 'Reload' button (graphically shown as a looping arrow)
# is only shown when a page has loaded, so once we see the
# expected title *and* this button has appeared, then we can be sure
# that the page has fully loaded.
@torbrowser.child(reload_action, roleName: 'push button') and
@torbrowser.children(roleName: 'frame').any? { |frame|
page_titles
.map { |page_title| "#{page_title} - #{browser_name}" }
.any? { |page_title| page_title == frame.name }
}
}
end
# This step is limited to the Tor Browser due to #7502 since dogtail
# uses the same interface.
Then /^"([^"]+)" has loaded in the Tor Browser$/ do |title|
page_has_loaded_in_the_Tor_Browser(title, @language)
end
Then /^the (.*) has no plugins installed$/ do |browser|
......
......@@ -407,15 +407,15 @@ end
Given /^the Tor Browser loads the (startup page|Tails homepage|Tails roadmap)$/ do |page|
case page
when "startup page"
title = 'Tails'
titles = ['Tails', 'Tails - Trying a testing version of Tails']
when "Tails homepage"
title = 'Tails - Privacy for anyone anywhere'
titles = ['Tails - Privacy for anyone anywhere']
when "Tails roadmap"
title = 'Roadmap - Tails - Tails Ticket Tracker'
titles = ['Roadmap - Tails - Tails Ticket Tracker']
else
raise "Unsupported page: #{page}"
end
step "\"#{title}\" has loaded in the Tor Browser"
page_has_loaded_in_the_Tor_Browser(titles, @language)
end
When /^I request a new identity using Torbutton$/ do
......
......@@ -21,8 +21,6 @@ Feature: Tor stream isolation is effective
And I re-run tails-upgrade-frontend-wrapper
Then I see that tails-upgrade-frontend-wrapper is properly stream isolated
#11592
@fragile
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
......
......@@ -4,7 +4,7 @@ Feature: Browsing the web using the Tor Browser
when I browse the web using the Tor Browser
all Internet traffic should flow only through Tor
#11591, #11592
#11591
@fragile
Scenario: The Tor Browser cannot access the LAN
Given I have started Tails from DVD and logged in and the network is connected
......@@ -16,8 +16,7 @@ Feature: Browsing the web using 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
#11592
@check_tor_leaks @fragile
@check_tor_leaks
Scenario: The Tor Browser directory is usable
Given I have started Tails from DVD and logged in and the network is connected
Then the amnesiac Tor Browser directory exists
......@@ -28,8 +27,7 @@ Feature: Browsing the web using the Tor Browser
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
#11592
@check_tor_leaks @fragile
@check_tor_leaks
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
......@@ -39,8 +37,7 @@ Feature: Browsing the web using the Tor Browser
When I save the file to the default Tor Browser download directory
Then the file is saved to the default Tor Browser download directory
#11592
@check_tor_leaks @fragile
@check_tor_leaks
Scenario: Playing an Ogg audio track
Given I have started Tails from DVD and logged in and the network is connected
When I start the Tor Browser
......@@ -54,8 +51,6 @@ Feature: Browsing the web using the Tor Browser
And the Tor Browser loads the startup page
Then I can watch a WebM video in Tor Browser
#11592
@fragile
Scenario: I can view a file stored in "~/Tor Browser" but not in ~/.gnupg
Given I have started Tails from DVD and logged in and the network is connected
And I copy "/usr/share/synaptic/html/index.html" to "/home/amnesia/Tor Browser/synaptic.html" as user "amnesia"
......@@ -99,8 +94,7 @@ Feature: Browsing the web using the Tor Browser
When I start the Tor Browser
Then the Tor Browser uses all expected TBB shared libraries
#11592
@check_tor_leaks @fragile
@check_tor_leaks
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
......@@ -111,15 +105,13 @@ Feature: Browsing the web using the Tor Browser
And I acknowledge Torbutton's New Identity confirmation prompt
Then the Tor Browser loads the startup page
#11592
@fragile
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 loads the startup page
Then the Tor Browser has no plugins installed
#11592, #15336
#15336
@fragile
Scenario: The persistent Tor Browser directory is usable
Given I have started Tails without network from a USB drive with a persistent partition enabled and logged in
......
Markdown is supported
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