|
@@ -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
|