summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoranonym <anonym@riseup.net>2017-03-20 03:08:29 +0100
committeranonym <anonym@riseup.net>2017-03-20 13:47:15 +0100
commitb715ce42449785d4e44010cc9711b3585ab8bcd5 (patch)
tree6ea98f215c427bcea318a2dff483ab89fca88f8e
parent4418bd852564ef1e9c992f731e1f4746c6b391c2 (diff)
Test suite: fixes to make 3.0~beta3 pass.
This includes: * fixing some mistakes in the merge conflict resolution 28cf4852928035b7c8707ee3777d6a443a8ab5d2. * switching to an image in the Pidgin tests that doesn't depend on the /topic of tails@conference.riseup.net -- the server resets it every once in a while, so we should not pretend the test suite can always find it. * Fix a problematic use of try_for (we need refs: #9223!). * Fix for VM.select_virtual_desktop() and VM.do_focus(): in Stretch we only have two virtual desktop, so do_focus() has been broken for a while. Also add some `sleep()`:s which sadly seem required. * Random Gherkin improvement.
-rw-r--r--features/images/PidginTailsChannelWelcome.pngbin1837 -> 2794 bytes
-rw-r--r--features/images/UnsafeBrowserDNSError.pngbin4618 -> 0 bytes
-rw-r--r--features/step_definitions/browser.rb10
-rw-r--r--features/step_definitions/common_steps.rb3
-rw-r--r--features/step_definitions/pidgin.rb1
-rw-r--r--features/step_definitions/unsafe_browser.rb6
-rw-r--r--features/support/helpers/vm_helper.rb12
-rw-r--r--features/torified_browsing.feature2
-rw-r--r--features/unsafe_browser.feature2
9 files changed, 20 insertions, 16 deletions
diff --git a/features/images/PidginTailsChannelWelcome.png b/features/images/PidginTailsChannelWelcome.png
index 61713f3..f055aec 100644
--- a/features/images/PidginTailsChannelWelcome.png
+++ b/features/images/PidginTailsChannelWelcome.png
Binary files differ
diff --git a/features/images/UnsafeBrowserDNSError.png b/features/images/UnsafeBrowserDNSError.png
deleted file mode 100644
index 233bc19..0000000
--- a/features/images/UnsafeBrowserDNSError.png
+++ /dev/null
Binary files differ
diff --git a/features/step_definitions/browser.rb b/features/step_definitions/browser.rb
index 3510f22..8146253 100644
--- a/features/step_definitions/browser.rb
+++ b/features/step_definitions/browser.rb
@@ -6,14 +6,10 @@ When /^I start the Unsafe Browser(?: through the GNOME menu)?$/ do
step "I start \"Unsafe Browser\" via the GNOME \"Internet\" applications menu"
end
-Then /^I see the Unsafe Browser start notification and wait for it to close$/ do
- robust_notification_wait("UnsafeBrowserStartNotification.png", 60)
-end
-
When /^I successfully start the Unsafe Browser$/ do
step "I start the Unsafe Browser"
step "I see and accept the Unsafe Browser start verification"
- step "I see the Unsafe Browser start notification and wait for it to close"
+ step "I see the \"Starting the Unsafe Browser...\" notification after at most 60 seconds"
step "the Unsafe Browser has started"
end
@@ -21,10 +17,6 @@ When /^I close the Unsafe Browser$/ do
@screen.type("q", Sikuli::KeyModifier.CTRL)
end
-Then /^I see the Unsafe Browser stop notification$/ do
- robust_notification_wait("UnsafeBrowserStopNotification.png", 60)
-end
-
def xul_application_info(application)
binary = $vm.execute_successfully(
'echo ${TBB_INSTALL}/firefox', :libs => 'tor-browser'
diff --git a/features/step_definitions/common_steps.rb b/features/step_definitions/common_steps.rb
index a117cd2..908338f 100644
--- a/features/step_definitions/common_steps.rb
+++ b/features/step_definitions/common_steps.rb
@@ -244,11 +244,12 @@ Given /^Tails is at the boot menu's cmdline( after rebooting)?$/ do |reboot|
'resetting...')
dealt_with_uefi_setup = false
$vm.reset
- retry
+ raise e
ensure
Process.kill("TERM", tab_spammer.pid)
tab_spammer.close
end
+ true
end
end
diff --git a/features/step_definitions/pidgin.rb b/features/step_definitions/pidgin.rb
index ae71e20..754b034 100644
--- a/features/step_definitions/pidgin.rb
+++ b/features/step_definitions/pidgin.rb
@@ -466,4 +466,5 @@ end
When /^I click on the Tails roadmap URL$/ do
@screen.click('PidginTailsRoadmapUrl.png')
+ try_for(60) { @torbrowser = Dogtail::Application.new('Firefox') }
end
diff --git a/features/step_definitions/unsafe_browser.rb b/features/step_definitions/unsafe_browser.rb
index 9e37a0d..de69a16 100644
--- a/features/step_definitions/unsafe_browser.rb
+++ b/features/step_definitions/unsafe_browser.rb
@@ -168,7 +168,11 @@ Then /^the Unsafe Browser has no proxy configured$/ do
end
Then /^the Unsafe Browser complains that no DNS server is configured$/ do
- @screen.wait("UnsafeBrowserDNSError.png", 30)
+ assert_not_nil(
+ Dogtail::Application.new('zenity')
+ .child(roleName: 'label')
+ .text['No DNS server was obtained']
+ )
end
Then /^I configure the Unsafe Browser to check for updates more frequently$/ do
diff --git a/features/support/helpers/vm_helper.rb b/features/support/helpers/vm_helper.rb
index 0f89ac3..c2e9379 100644
--- a/features/support/helpers/vm_helper.rb
+++ b/features/support/helpers/vm_helper.rb
@@ -473,7 +473,7 @@ class VM
def select_virtual_desktop(desktop_number, user = LIVE_USER)
assert(desktop_number >= 0 && desktop_number <=3,
- "Only values between 0 and 3 are valid virtual desktop numbers")
+ "Only values between 0 and 1 are valid virtual desktop numbers")
execute_successfully(
"xdotool set_desktop '#{desktop_number}'",
:user => user
@@ -494,11 +494,17 @@ class VM
# Often when xdotool fails to focus a window it'll work when retried
# after redrawing the screen. Switching to a new virtual desktop then
# back seems to be a reliable way to handle this.
- select_virtual_desktop(3)
+ # Sadly we have to rely on a lot of sleep() here since there's
+ # little on the screen etc that we truly can rely on.
+ sleep 5
+ select_virtual_desktop(1)
+ sleep 5
select_virtual_desktop(0)
- sleep 5 # there aren't any visual indicators which can be used here
+ sleep 5
do_focus(window_title, user)
end
+ rescue
+ # noop
end
def file_exist?(file)
diff --git a/features/torified_browsing.feature b/features/torified_browsing.feature
index 1373694..083b71d 100644
--- a/features/torified_browsing.feature
+++ b/features/torified_browsing.feature
@@ -158,7 +158,7 @@ Feature: Browsing the web using the Tor Browser
And all persistent filesystems have safe access rights
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
+ When I start the Tor Browser 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
diff --git a/features/unsafe_browser.feature b/features/unsafe_browser.feature
index 0701d66..7b2dc54 100644
--- a/features/unsafe_browser.feature
+++ b/features/unsafe_browser.feature
@@ -33,7 +33,7 @@ Feature: Browsing the web using the Unsafe Browser
Given I have started Tails from DVD and logged in and the network is connected
When I successfully start the Unsafe Browser
And I close the Unsafe Browser
- Then I see the Unsafe Browser stop notification
+ Then I see the "Shutting down the Unsafe Browser..." notification after at most 60 seconds
And the Unsafe Browser chroot is torn down
#11458