Browse Source

Maintenance: removes legacy MAILBOX_AUTO and MAILBOX_MANUAL tests

Mantas Masalskis 4 years ago
parent
commit
1c160abf7a

+ 0 - 5
.gitlab/ci/browser-core.yml

@@ -23,11 +23,6 @@ include:
   variables:
     RAILS_ENV: "production"
   script:
-    # temporary workaround to check Yahoo! mailbox only in 3_firefox* tests
-    - if [[ $CI_JOB_NAME != 3_firefox* ]]; then unset MAILBOX_AUTO1 ; fi
-    - if [[ $CI_JOB_NAME != 3_firefox* ]]; then unset MAILBOX_AUTO2 ; fi
-    - if [[ $CI_JOB_NAME != 3_firefox* ]]; then unset MAILBOX_MANUAL1 ; fi
-    - if [[ $CI_JOB_NAME != 3_firefox* ]]; then unset MAILBOX_MANUAL2 ; fi
     - env
     - script/build/test_slice_tests.sh $TEST_SLICE
     - RAILS_ENV=test bundle exec rake db:create

+ 0 - 109
spec/system/setup/mail_accounts_spec.rb

@@ -1,109 +0,0 @@
-require 'rails_helper'
-
-RSpec.describe 'Mail accounts', type: :system do
-
-  def perform_check
-    # getting started - auto mail
-    visit 'getting_started/channel'
-
-    click('.js-channel .btn.email')
-
-    yield
-
-    # wait for verification process to finish
-    expect(page).to have_css('.js-agent h2', text: 'Invite Colleagues', wait: 4.minutes)
-
-    expect_current_route 'getting_started/agents'
-  end
-
-  def fill_in_credentials(account)
-    within('.js-intro') do
-
-      fill_in 'realname', with: account[:realname]
-      fill_in 'email',    with: account[:email]
-      fill_in 'password', with: account[:password]
-
-      click_on('Connect')
-    end
-  end
-
-  it 'Auto detectable configurations' do
-
-    skip('NOTICE: This test is currently disabled because of collisions with other non Capybara browser tests')
-
-    accounts = (1..10).each_with_object([]) do |count, result|
-      next if !ENV["MAILBOX_AUTO#{count}"]
-
-      email, password = ENV["MAILBOX_AUTO#{count}"].split(':')
-      result.push(
-        realname: 'auto account',
-        email:    email,
-        password: password,
-      )
-    end
-
-    if accounts.blank?
-      skip("NOTICE: Need min. MAILBOX_AUTO1 as ENV variable like export MAILBOX_AUTO1='nicole.braun2015@gmail.com:somepass'")
-    end
-
-    accounts.each do |account|
-
-      perform_check do
-        fill_in_credentials(account)
-      end
-    end
-  end
-
-  it 'Manual configurations' do
-
-    accounts = (1..10).each_with_object([]) do |count, result|
-      next if !ENV["MAILBOX_MANUAL#{count}"]
-
-      email, password, inbound, outbound = ENV["MAILBOX_MANUAL#{count}"].split(':')
-
-      result.push(
-        realname: 'manual account',
-        email:    email,
-        password: password,
-        inbound:  {
-          'options::host' => inbound,
-        },
-        outbound: {
-          'options::host' => outbound,
-        },
-      )
-    end
-
-    if accounts.blank?
-      skip("NOTICE: Need min. MAILBOX_MANUAL1 as ENV variable like export MAILBOX_MANUAL1='nicole.bauer2015@yahoo.de:somepass:imap.mail.yahoo.com:smtp.mail.yahoo.com'")
-    end
-
-    accounts.each do |account|
-
-      perform_check do
-        fill_in_credentials(account)
-
-        within('.js-inbound') do
-
-          expect(page).to have_css('h2', text: 'inbound', wait: 4.minutes)
-          expect(page).to have_css('body', text: 'manual')
-
-          fill_in 'options::host', with: account[:inbound]['options::host']
-
-          click_on('Connect')
-        end
-
-        within('.js-outbound') do
-
-          expect(page).to have_css('h2', text: 'outbound', wait: 4.minutes)
-
-          select('SMTP - configure your own outgoing SMTP settings', from: 'adapter')
-
-          fill_in 'options::host', with: account[:outbound]['options::host']
-
-          click_on('Connect')
-        end
-      end
-    end
-  end
-end

+ 0 - 168
test/browser/aaa_getting_started_test.rb

@@ -199,172 +199,4 @@ class AaaGettingStartedTest < TestCase
       value: fqdn,
     )
   end
-
-  def test_b_accounts_auto
-    #return # TODO: temp disable
-    accounts = []
-    (1..10).each do |count|
-      next if !ENV["MAILBOX_AUTO#{count}"]
-
-      mailbox_user     = ENV["MAILBOX_AUTO#{count}"].split(':')[0]
-      mailbox_password = ENV["MAILBOX_AUTO#{count}"].split(':')[1]
-      account = {
-        realname: 'auto account',
-        email:    mailbox_user,
-        password: mailbox_password,
-      }
-      accounts.push account
-    end
-    if accounts.blank?
-      #raise "Need min. MAILBOX_AUTO1 as ENV variable like export MAILBOX_AUTO1='nicole.braun2015@gmail.com:somepass'"
-      puts "NOTICE: Need min. MAILBOX_AUTO1 as ENV variable like export MAILBOX_AUTO1='nicole.braun2015@gmail.com:somepass'"
-      return
-    end
-    @browser = browser_instance
-    login(
-      username: 'master@example.com',
-      password: 'test',
-      url:      browser_url,
-    )
-    accounts.each do |account|
-
-      # getting started - auto mail
-      location(url: browser_url + '/#getting_started/channel')
-      click(
-        css: '.js-channel .email .provider_name',
-      )
-      set(
-        css:   '.js-intro input[name="realname"]',
-        value: account[:realname],
-      )
-      set(
-        css:   '.js-intro input[name="email"]',
-        value: account[:email],
-      )
-      set(
-        css:   '.js-intro input[name="password"]',
-        value: account[:password],
-      )
-      click(
-        css: '.js-intro .btn--primary',
-      )
-      watch_for(
-        css:     'body',
-        value:   'verify',
-        timeout: 20,
-      )
-      watch_for(
-        css:     'body',
-        value:   'invite',
-        timeout: 100,
-      )
-      location_check(
-        url: '#getting_started/agents',
-      )
-    end
-  end
-
-  def test_b_accounts_manual
-    #return # TODO: temp disable
-    accounts = []
-    (1..10).each do |count|
-      next if !ENV["MAILBOX_MANUAL#{count}"]
-
-      mailbox_user     = ENV["MAILBOX_MANUAL#{count}"].split(':')[0]
-      mailbox_password = ENV["MAILBOX_MANUAL#{count}"].split(':')[1]
-      mailbox_inbound  = ENV["MAILBOX_MANUAL#{count}"].split(':')[2]
-      mailbox_outbound = ENV["MAILBOX_MANUAL#{count}"].split(':')[3]
-      account = {
-        realname: 'manual account',
-        email:    mailbox_user,
-        password: mailbox_password,
-        inbound:  {
-          'options::host' => mailbox_inbound,
-        },
-        outbound: {
-          'options::host' => mailbox_outbound,
-        },
-      }
-      accounts.push account
-    end
-    if accounts.blank?
-      #raise "Need min. MAILBOX_MANUAL1 as ENV variable like export MAILBOX_MANUAL1='nicole.bauer2015@yahoo.de:somepass:imap.mail.yahoo.com:smtp.mail.yahoo.com'"
-      puts "NOTICE: Need min. MAILBOX_MANUAL1 as ENV variable like export MAILBOX_MANUAL1='nicole.bauer2015@yahoo.de:somepass:imap.mail.yahoo.com:smtp.mail.yahoo.com'"
-      return
-    end
-
-    @browser = browser_instance
-    login(
-      username: 'master@example.com',
-      password: 'test',
-      url:      browser_url,
-    )
-    accounts.each do |account|
-
-      # getting started - manual mail
-      location(url: browser_url + '/#getting_started/channel')
-
-      click(
-        css: '.js-channel .email .provider_name',
-      )
-      set(
-        css:   '.js-intro input[name="realname"]',
-        value: account[:realname],
-      )
-      set(
-        css:   '.js-intro input[name="email"]',
-        value: account[:email],
-      )
-      set(
-        css:   '.js-intro input[name="password"]',
-        value: account[:password],
-      )
-      click(
-        css: '.js-intro .btn--primary',
-      )
-      watch_for(
-        css:     '.js-inbound h2',
-        value:   'inbound',
-        timeout: 220,
-      )
-      watch_for(
-        css:   '.js-inbound',
-        value: 'manual',
-      )
-      set(
-        css:   '.js-inbound input[name="options::host"]',
-        value: account[:inbound]['options::host'],
-      )
-      click(
-        css: '.js-inbound .btn--primary',
-      )
-      watch_for(
-        css:   '.js-outbound h2',
-        value: 'outbound',
-      )
-      select(
-        css:   '.js-outbound select[name="adapter"]',
-        value: 'SMTP - configure your own outgoing SMTP settings',
-      )
-      set(
-        css:   '.js-outbound input[name="options::host"]',
-        value: account[:outbound]['options::host'],
-      )
-      click(
-        css: '.js-outbound .btn--primary',
-      )
-      watch_for(
-        css:   'body',
-        value: 'verify',
-      )
-      watch_for(
-        css:     'body',
-        value:   'invite',
-        timeout: 190,
-      )
-      location_check(
-        url: '#getting_started/agents',
-      )
-    end
-  end
 end