diff options
author | Philip Hands <phil@hands.com> | 2016-03-14 15:36:16 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2016-04-28 21:52:10 +0200 |
commit | da080c472fc415b0ce918f4dd4a1ab143bb1bca4 (patch) | |
tree | bf63179f32f0eda0c2d5796e3e31c18c3c1185cf /features/step_definitions/icedove.rb | |
parent | 26a9e8ec2bcae03db4d663d87b44d8708d64fdc2 (diff) | |
download | jenkins.debian.net-da080c472fc415b0ce918f4dd4a1ab143bb1bca4.tar.xz |
rough attempt to grab the good cucumber bits from recent tails
Diffstat (limited to 'features/step_definitions/icedove.rb')
-rw-r--r-- | features/step_definitions/icedove.rb | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/features/step_definitions/icedove.rb b/features/step_definitions/icedove.rb new file mode 100644 index 00000000..d3672895 --- /dev/null +++ b/features/step_definitions/icedove.rb @@ -0,0 +1,94 @@ +Then /^Icedove has started$/ do + step 'process "icedove" is running within 30 seconds' + @screen.wait('IcedoveMainWindow.png', 60) +end + +When /^I have not configured an email account$/ do + icedove_prefs = $vm.file_content("/home/#{LIVE_USER}/.icedove/profile.default/prefs.js").chomp + assert(!icedove_prefs.include?('mail.accountmanager.accounts')) +end + +Then /^I am prompted to setup an email account$/ do + $vm.focus_window('Mail Account Setup') + @screen.wait('IcedoveMailAccountSetup.png', 30) +end + +Then /^IMAP is the default protocol$/ do + $vm.focus_window('Mail Account Setup') + @screen.wait('IcedoveProtocolIMAP.png', 10) +end + +Then /^I cancel setting up an email account$/ do + $vm.focus_window('Mail Account Setup') + @screen.type(Sikuli::Key.ESC) + @screen.waitVanish('IcedoveMailAccountSetup.png', 10) +end + +Then /^I open Icedove's Add-ons Manager$/ do + $vm.focus_window('Icedove') + @screen.wait_and_click('MozillaMenuButton.png', 10) + @screen.wait_and_click('IcedoveToolsMenuAddOns.png', 10) + @screen.wait('MozillaAddonsManagerExtensions.png', 30) +end + +Then /^I click the extensions tab$/ do + @screen.wait_and_click('MozillaAddonsManagerExtensions.png', 10) +end + +Then /^I see that Adblock is not installed in Icedove$/ do + if @screen.exists('MozillaExtensionsAdblockPlus.png') + raise 'Adblock should not be enabled within Icedove' + end +end + +When /^I go into Enigmail's preferences$/ do + $vm.focus_window('Icedove') + @screen.type("a", Sikuli::KeyModifier.ALT) + @screen.wait_and_click('IcedoveEnigmailPreferences.png', 10) + @screen.wait('IcedoveEnigmailPreferencesWindow.png', 10) + @screen.click('IcedoveEnigmailExpertSettingsButton.png') + @screen.wait('IcedoveEnigmailKeyserverTab.png', 10) +end + +When /^I click Enigmail's keyserver tab$/ do + @screen.wait_and_click('IcedoveEnigmailKeyserverTab.png', 10) +end + +Then /^I see that Enigmail is configured to use the correct keyserver$/ do + @screen.wait('IcedoveEnigmailKeyserver.png', 10) +end + +Then /^I click Enigmail's advanced tab$/ do + @screen.wait_and_click('IcedoveEnigmailAdvancedTab.png', 10) +end + +Then /^I see that Enigmail is configured to use the correct SOCKS proxy$/ do + @screen.click('IcedoveEnigmailAdvancedParameters.png') + @screen.type(Sikuli::Key.END) + @screen.wait('IcedoveEnigmailProxy.png', 10) +end + +Then /^I see that Torbirdy is configured to use Tor$/ do + @screen.wait('IcedoveTorbirdyEnabled.png', 10) +end + +When /^I open Torbirdy's preferences$/ do + step "I open Icedove's Add-ons Manager" + step 'I click the extensions tab' + @screen.wait_and_click('MozillaExtensionsTorbirdy.png', 10) + @screen.type(Sikuli::Key.TAB) # Select 'More' link + @screen.type(Sikuli::Key.TAB) # Select 'Preferences' button + @screen.type(Sikuli::Key.SPACE) # Press 'Preferences' button + @screen.wait('GnomeQuestionDialogIcon.png', 10) + @screen.type(Sikuli::Key.ENTER) +end + +When /^I test Torbirdy's proxy settings$/ do + @screen.wait('IcedoveTorbirdyPreferencesWindow.png', 10) + @screen.click('IcedoveTorbirdyTestProxySettingsButton.png') + @screen.wait('IcedoveTorbirdyCongratulationsTab.png', 180) +end + +Then /^Torbirdy's proxy test is successful$/ do + @screen.wait('IcedoveTorbirdyCongratulationsTab.png', 180) +end |