diff options
author | Philip Hands <phil@hands.com> | 2016-05-11 17:11:01 +0200 |
---|---|---|
committer | Philip Hands <phil@hands.com> | 2016-05-11 17:11:01 +0200 |
commit | a5d56e3b5443263b53b0487c81125123411bd0cf (patch) | |
tree | 71b1bdafc0a5978bca9073609eff33e228e29a12 /cucumber/features/step_definitions/icedove.rb | |
parent | 555d9414f758cc0062eff700a0352ae177fd9be5 (diff) | |
download | jenkins.debian.net-a5d56e3b5443263b53b0487c81125123411bd0cf.tar.xz |
move cucumber things under cucumber/
Diffstat (limited to 'cucumber/features/step_definitions/icedove.rb')
-rw-r--r-- | cucumber/features/step_definitions/icedove.rb | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/cucumber/features/step_definitions/icedove.rb b/cucumber/features/step_definitions/icedove.rb new file mode 100644 index 00000000..d3672895 --- /dev/null +++ b/cucumber/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 |