<%- @T('Setup new System') %>
diff --git a/test/browser/aaa_getting_started_test.rb b/test/browser/aaa_getting_started_test.rb
index f44281558..7c2d0e9fb 100644
--- a/test/browser/aaa_getting_started_test.rb
+++ b/test/browser/aaa_getting_started_test.rb
@@ -11,7 +11,7 @@ class AaaGettingStartedTest < TestCase
:action => [
{
:execute => 'check',
- :css => '#form-master',
+ :css => '.setup.wizard',
:result => true,
},
],
@@ -19,34 +19,39 @@ class AaaGettingStartedTest < TestCase
{
:name => 'getting started - master agent',
:action => [
+ {
+ :execute => 'click',
+ :css => '.js-start .btn--primary',
+ },
+
{
:execute => 'set',
- :css => '#form-master input[name="firstname"]',
+ :css => '.js-admin input[name="firstname"]',
:value => 'Test Master',
},
{
:execute => 'set',
- :css => '#form-master input[name="lastname"]',
+ :css => '.js-admin input[name="lastname"]',
:value => 'Agent',
},
{
:execute => 'set',
- :css => '#form-master input[name="email"]',
+ :css => '.js-admin input[name="email"]',
:value => 'master@example.com',
},
{
:execute => 'set',
- :css => '#form-master input[name="password"]',
+ :css => '.js-admin input[name="password"]',
:value => 'test1234äöüß',
},
{
:execute => 'set',
- :css => '#form-master input[name="password_confirm"]',
+ :css => '.js-admin input[name="password_confirm"]',
:value => 'test1234äöüß',
},
{
:execute => 'click',
- :css => '#form-master button[type="submit"]',
+ :css => '.js-admin .btn--success',
},
{
:execute => 'wait',
@@ -60,38 +65,145 @@ class AaaGettingStartedTest < TestCase
],
},
- # create agent1
+ # set base
+ {
+ :name => 'getting started - base',
+ :action => [
+ {
+ :execute => 'match',
+ :css => '.js-base h2',
+ :value => 'Organization',
+ :match_result => true,
+ },
+ {
+ :execute => 'set',
+ :css => '.js-base input[name="organization"]',
+ :value => 'Some Organization',
+ },
+ {
+ :execute => 'set',
+ :css => '.js-base input[name="url"]',
+ :value => 'some host',
+ },
+ {
+ :execute => 'click',
+ :css => '.js-base .btn--primary',
+ },
+ {
+ :execute => 'watch_for',
+ :area => 'body',
+ :value => 'A URL looks like',
+ },
+ {
+ :execute => 'set',
+ :css => '.js-base input[name="url"]',
+ :value => 'http://localhost:3333',
+ },
+ {
+ :execute => 'click',
+ :css => '.js-base .btn--primary',
+ },
+ {
+ :execute => 'watch_for',
+ :area => 'body',
+ :value => 'channel',
+ },
+ {
+ :execute => 'check',
+ :element => :url,
+ :result => '#getting_started/channel',
+ },
+ ],
+ },
+
+ # create email account
+ {
+ :name => 'getting started - base',
+ :action => [
+ {
+ :execute => 'match',
+ :css => '.js-channel h2',
+ :value => 'Connect Channels',
+ :match_result => true,
+ },
+ {
+ :execute => 'click',
+ :css => '.js-channel .email .provider_name',
+ },
+ {
+ :execute => 'set',
+ :css => '.js-intro input[name="realname"]',
+ :value => 'Some Realname',
+ },
+ {
+ :execute => 'set',
+ :css => '.js-intro input[name="email"]',
+ :value => 'otest01@znuny.com',
+ },
+ {
+ :execute => 'set',
+ :css => '.js-intro input[name="password"]',
+ :value => 'otest0142',
+ },
+ {
+ :execute => 'click',
+ :css => '.js-intro .btn--primary',
+ },
+ {
+ :execute => 'watch_for',
+ :area => 'body',
+ :value => 'testing',
+ },
+ {
+ :execute => 'watch_for',
+ :area => 'body',
+ :value => 'verify',
+ },
+ {
+ :execute => 'watch_for',
+ :area => 'body',
+ :value => 'invite',
+ },
+ {
+ :execute => 'check',
+ :element => :url,
+ :result => '#getting_started/agents',
+ },
+ ],
+ },
+
+ # invite agent1
{
:name => 'getting started - agent 1',
:action => [
{
:execute => 'match',
:css => 'body',
- :value => 'Invite Agents',
+ :value => 'Invite',
:match_result => true,
},
{
:execute => 'set',
- :css => '#form-agent input[name="firstname"]',
+ :css => '.js-agent input[name="firstname"]',
:value => 'Agent 1',
},
{
:execute => 'set',
- :css => '#form-agent input[name="lastname"]',
+ :css => '.js-agent input[name="lastname"]',
:value => 'Test',
},
{
:execute => 'set',
- :css => '#form-agent input[name="email"]',
+ :css => '.js-agent input[name="email"]',
:value => 'agent1@example.com',
},
{
:execute => 'click',
- :css => '#form-agent input[name="group_ids"][value="1"]',
+ :css => '.js-agent input[name="group_ids"][value="1"]',
},
{
:execute => 'click',
- :css => '#form-agent button[type="submit"]',
+ :css => '.js-agent .btn--success',
},
{
:execute => 'watch_for',
@@ -101,15 +213,22 @@ class AaaGettingStartedTest < TestCase
{
:execute => 'check',
:element => :url,
- :result => '#getting_started',
+ :result => '#getting_started/agents',
},
{
- :execute => 'match',
- :css => 'body',
- :value => 'Invite Agents',
- :match_result => true,
+ :execute => 'click',
+ :css => '.js-agent .btn--primary',
+ },
+ {
+ :execute => 'watch_for',
+ :area => 'body',
+ :value => 'Activity Stream',
+ },
+ {
+ :execute => 'check',
+ :element => :url,
+ :result => '#dashboard',
},
-
],
},
]
diff --git a/test/browser_test_helper.rb b/test/browser_test_helper.rb
index 317ac127c..076d9ef1f 100644
--- a/test/browser_test_helper.rb
+++ b/test/browser_test_helper.rb
@@ -253,11 +253,14 @@ class TestCase < Test::Unit::TestCase
text = ''
(1..36).each { |loop|
element = instance.find_element( { :css => action[:area] } )
- text = element.text
- if text =~ /#{action[:value]}/i
- assert( true, "(#{test[:name]}) '#{action[:value]}' found in '#{text}'" )
- sleep 0.4
- return
+ if element.displayed?
+ text = element.text
+ puts "T: #{text}"
+ if text =~ /#{action[:value]}/i
+ assert( true, "(#{test[:name]}) '#{action[:value]}' found in '#{text}'" )
+ sleep 0.4
+ return
+ end
end
sleep 0.33
}