Commit 30b28fe3 authored by Tails developers's avatar Tails developers
Browse files

Factorize starting apps from the GNOME applications menu into a generic step.

parent e6dec8e8
......@@ -527,16 +527,7 @@ end
When /^I start the Tor Browser$/ do
next if @skip_steps_while_restoring_background
case @theme
when "windows"
step 'I click the start menu'
@screen.wait_and_hover("WindowsApplicationsInternet.png", 10)
@screen.wait_and_click("WindowsApplicationsTorBrowser.png", 10)
else
@screen.wait_and_click("GnomeApplicationsMenu.png", 10)
@screen.wait_and_hover("GnomeApplicationsInternet.png", 10)
@screen.wait_and_click("GnomeApplicationsTorBrowser.png", 10)
end
step 'I start "TorBrowser" via the GNOME "Internet" applications menu'
end
When /^I start the Tor Browser in offline mode$/ do
......@@ -648,9 +639,7 @@ end
When /^I start and focus GNOME Terminal$/ do
next if @skip_steps_while_restoring_background
@screen.wait_and_click("GnomeApplicationsMenu.png", 10)
@screen.wait_and_hover("GnomeApplicationsAccessories.png", 10)
@screen.wait_and_click("GnomeApplicationsTerminal.png", 20)
step 'I start "Terminal" via the GNOME "Accessories" applications menu'
@screen.wait_and_click('GnomeTerminalWindow.png', 20)
end
......@@ -685,3 +674,16 @@ Given /^the USB drive "([^"]+)" contains Tails with persistence configured and p
step "a Tails persistence partition with password \"#{password}\" exists on USB drive \"#{drive}\""
step "I shutdown Tails and wait for the computer to power off"
end
Given /^I start "([^"]+)" via the GNOME "([^"]+)" applications menu$/ do |app, submenu|
next if @skip_steps_while_restoring_background
case @theme
when "windows"
prefix = 'Windows'
else
prefix = 'Gnome'
end
@screen.wait_and_click(prefix + "ApplicationsMenu.png", 10)
@screen.wait_and_hover(prefix + "Applications" + submenu + ".png", 10)
@screen.wait_and_click(prefix + "Applications" + app + ".png", 20)
end
......@@ -23,9 +23,7 @@ end
When /^I type a message into gedit$/ do
next if @skip_steps_while_restoring_background
@screen.wait_and_click("GnomeApplicationsMenu.png", 10)
@screen.wait_and_hover("GnomeApplicationsAccessories.png", 10)
@screen.wait_and_click("GnomeApplicationsGedit.png", 20)
step 'I start "Gedit" via the GNOME "Accessories" applications menu'
@screen.wait_and_click("GeditWindow.png", 10)
sleep 0.5
@screen.type("ATTACK AT DAWN")
......
......@@ -15,9 +15,7 @@ end
When /^I start the I2P Browser through the GNOME menu$/ do
next if @skip_steps_while_restoring_background
@screen.wait_and_click("GnomeApplicationsMenu.png", 10)
@screen.wait_and_hover("GnomeApplicationsInternet.png", 10)
@screen.wait_and_click("GnomeApplicationsI2PBrowser.png", 20)
step 'I start "I2PBrowser" via the GNOME "Internet" applications menu'
end
Then /^the I2P Browser desktop file is (|not )present$/ do |mode|
......
......@@ -70,9 +70,7 @@ end
When /^I start Pidgin through the GNOME menu$/ do
next if @skip_steps_while_restoring_background
@screen.wait_and_click("GnomeApplicationsMenu.png", 10)
@screen.wait_and_hover("GnomeApplicationsInternet.png", 10)
@screen.wait_and_click("GnomeApplicationsPidgin.png", 20)
step 'I start "Pidgin" via the GNOME "Internet" applications menu'
end
When /^I open Pidgin's account manager window$/ do
......
......@@ -27,9 +27,7 @@ end
When /^I start Totem through the GNOME menu$/ do
next if @skip_steps_while_restoring_background
@screen.wait_and_click("GnomeApplicationsMenu.png", 10)
@screen.wait_and_hover("GnomeApplicationsSoundVideo.png", 10)
@screen.wait_and_click("GnomeApplicationsTotem.png", 20)
step 'I start "Totem" via the GNOME "SoundVideo" applications menu'
@screen.wait_and_click("TotemMainWindow.png", 20)
end
......
When /^I start TrueCrypt through the GNOME menu$/ do
next if @skip_steps_while_restoring_background
@screen.wait_and_click("GnomeApplicationsMenu.png", 10)
@screen.wait_and_hover("GnomeApplicationsAccessories.png", 10)
@screen.wait_and_click("GnomeApplicationsTrueCrypt.png", 20)
step 'I start "TrueCrypt" via the GNOME "Accessories" applications menu'
end
When /^I deal with the removal warning prompt$/ do
......
......@@ -27,9 +27,7 @@ end
When /^I start the Unsafe Browser$/ do
next if @skip_steps_while_restoring_background
@screen.wait_and_click("GnomeApplicationsMenu.png", 10)
@screen.wait_and_hover("GnomeApplicationsInternet.png", 10)
@screen.wait_and_click("GnomeApplicationsUnsafeBrowser.png", 20)
step 'I start "UnsafeBrowser" via the GNOME "Internet" applications menu'
end
When /^I successfully start the Unsafe Browser$/ do
......
......@@ -74,9 +74,7 @@ end
When /^I start Tails Installer$/ do
next if @skip_steps_while_restoring_background
@screen.wait_and_click("GnomeApplicationsMenu.png", 10)
@screen.wait_and_hover("GnomeApplicationsTails.png", 10)
@screen.wait_and_click("GnomeApplicationsTailsInstaller.png", 20)
step 'I start "TailsInstaller" via the GNOME "Tails" applications menu'
end
When /^I "Clone & Install" Tails to USB drive "([^"]+)"$/ do |name|
......@@ -148,9 +146,7 @@ end
Given /^I create a persistent partition with password "([^"]+)"$/ do |pwd|
next if @skip_steps_while_restoring_background
@screen.wait_and_click("GnomeApplicationsMenu.png", 10)
@screen.wait_and_hover("GnomeApplicationsTails.png", 10)
@screen.wait_and_click("GnomeApplicationsConfigurePersistentVolume.png", 20)
step 'I start "ConfigurePersistentVolume" via the GNOME "Tails" applications menu'
@screen.wait('PersistenceWizardWindow.png', 40)
@screen.wait('PersistenceWizardStart.png', 20)
@screen.type(pwd + "\t" + pwd + Sikuli::Key.ENTER)
......@@ -477,9 +473,7 @@ end
When /^I delete the persistent partition$/ do
next if @skip_steps_while_restoring_background
@screen.wait_and_click("GnomeApplicationsMenu.png", 10)
@screen.wait_and_hover("GnomeApplicationsTails.png", 10)
@screen.wait_and_click("GnomeApplicationsDeletePersistentVolume.png", 20)
step 'I start "DeletePersistentVolume" via the GNOME "Tails" applications menu'
@screen.wait("PersistenceWizardWindow.png", 40)
@screen.wait("PersistenceWizardDeletionStart.png", 20)
@screen.type(" ")
......
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