Skip to content

Commit

Permalink
Maintenance: removes legacy MAILBOX_AUTO and MAILBOX_MANUAL tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mantas committed May 9, 2020
1 parent 23a438e commit 1c160ab
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 282 deletions.
5 changes: 0 additions & 5 deletions .gitlab/ci/browser-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
109 changes: 0 additions & 109 deletions spec/system/setup/mail_accounts_spec.rb

This file was deleted.

168 changes: 0 additions & 168 deletions test/browser/aaa_getting_started_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -199,172 +199,4 @@ def test_a_getting_started
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='[email protected]:somepass'"
puts "NOTICE: Need min. MAILBOX_AUTO1 as ENV variable like export MAILBOX_AUTO1='[email protected]:somepass'"
return
end
@browser = browser_instance
login(
username: '[email protected]',
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='[email protected]:somepass:imap.mail.yahoo.com:smtp.mail.yahoo.com'"
puts "NOTICE: Need min. MAILBOX_MANUAL1 as ENV variable like export MAILBOX_MANUAL1='[email protected]:somepass:imap.mail.yahoo.com:smtp.mail.yahoo.com'"
return
end

@browser = browser_instance
login(
username: '[email protected]',
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

0 comments on commit 1c160ab

Please sign in to comment.