From da080c472fc415b0ce918f4dd4a1ab143bb1bca4 Mon Sep 17 00:00:00 2001 From: Philip Hands Date: Mon, 14 Mar 2016 15:36:16 +0100 Subject: rough attempt to grab the good cucumber bits from recent tails --- features/step_definitions/icedove.rb | 94 ++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 features/step_definitions/icedove.rb (limited to 'features/step_definitions/icedove.rb') 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 -- cgit v1.2.3-70-g09d2