Reenabled tests.
This commit is contained in:
parent
000d9f8500
commit
876c4e2bb7
8 changed files with 156 additions and 34 deletions
|
@ -103,7 +103,7 @@ class Admin extends App.ControllerContent
|
||||||
@html App.view('getting_started/admin')()
|
@html App.view('getting_started/admin')()
|
||||||
|
|
||||||
new App.ControllerForm(
|
new App.ControllerForm(
|
||||||
el: @$('.js-admin')
|
el: @$('.js-admin-form')
|
||||||
model: App.User
|
model: App.User
|
||||||
screen: 'signup'
|
screen: 'signup'
|
||||||
autofocus: true
|
autofocus: true
|
||||||
|
@ -623,7 +623,7 @@ class Agent extends App.ControllerContent
|
||||||
@html App.view('getting_started/agent')()
|
@html App.view('getting_started/agent')()
|
||||||
|
|
||||||
new App.ControllerForm(
|
new App.ControllerForm(
|
||||||
el: @$('.js-agent')
|
el: @$('.js-agent-form')
|
||||||
model: App.User
|
model: App.User
|
||||||
screen: 'invite_agent'
|
screen: 'invite_agent'
|
||||||
autofocus: true
|
autofocus: true
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<div class="main flex vertical centered darkBackground">
|
<div class="main flex vertical centered darkBackground">
|
||||||
<img class="zammad full logo" src="<%= @C('image_path') + '/' + 'full logo on dark.svg' %>" alt="Zammad">
|
<img class="zammad full logo" src="<%= @C('image_path') + '/' + 'full logo on dark.svg' %>" alt="Zammad">
|
||||||
<form class="setup wizard">
|
<form class="setup wizard js-admin">
|
||||||
<div class="wizard-slide">
|
<div class="wizard-slide">
|
||||||
<h2><%- @T('Administrator Account') %></h2>
|
<h2><%- @T('Administrator Account') %></h2>
|
||||||
<div class="wizard-body vertical justified js-admin"></div>
|
<div class="wizard-body vertical justified js-admin-form"></div>
|
||||||
<div class="wizard-controls center">
|
<div class="wizard-controls center">
|
||||||
<a class="subtle-link" href="#getting_started"><%- @T('Go Back') %></a>
|
<a class="subtle-link" href="#getting_started"><%- @T('Go Back') %></a>
|
||||||
<button class="btn btn--success align-right"><%- @T( 'Create' ) %></button>
|
<button class="btn btn--success align-right"><%- @T( 'Create' ) %></button>
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<div class="main flex vertical centered darkBackground">
|
<div class="main flex vertical centered darkBackground">
|
||||||
<img class="zammad full logo" src="<%= @C('image_path') + '/' + 'full logo on dark.svg' %>" alt="Zammad">
|
<img class="zammad full logo" src="<%= @C('image_path') + '/' + 'full logo on dark.svg' %>" alt="Zammad">
|
||||||
<form class="setup wizard">
|
<form class="setup wizard js-agent">
|
||||||
<div class="wizard-slide">
|
<div class="wizard-slide">
|
||||||
<h2><%- @T('Invite Colleagues') %></h2>
|
<h2><%- @T('Invite Colleagues') %></h2>
|
||||||
<div class="wizard-body vertical justified js-agent"></div>
|
<div class="wizard-body vertical justified js-agent-form"></div>
|
||||||
<div class="wizard-controls center">
|
<div class="wizard-controls center">
|
||||||
<a class="btn btn--primary align-left" href="#getting_started/finish"><%- @T( 'Continue' ) %></a>
|
<a class="btn btn--primary align-left" href="#getting_started/finish"><%- @T( 'Continue' ) %></a>
|
||||||
<button class="btn btn--success align-right"><%- @T( 'Invite' ) %></button>
|
<button class="btn btn--success align-right"><%- @T( 'Invite' ) %></button>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="main flex vertical centered darkBackground">
|
<div class="main flex vertical centered darkBackground">
|
||||||
<img class="zammad full logo" src="<%= @C('image_path') + '/' + 'full logo on dark.svg' %>" alt="Zammad">
|
<img class="zammad full logo" src="<%= @C('image_path') + '/' + 'full logo on dark.svg' %>" alt="Zammad">
|
||||||
<form class="setup wizard">
|
<form class="setup wizard js-base">
|
||||||
<div class="wizard-slide">
|
<div class="wizard-slide">
|
||||||
<h2><%- @T('Organization') %></h2>
|
<h2><%- @T('Organization') %></h2>
|
||||||
<div class="wizard-body vertical justified">
|
<div class="wizard-body vertical justified">
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="main flex vertical centered darkBackground">
|
<div class="main flex vertical centered darkBackground">
|
||||||
<img class="zammad full logo" src="<%= @C('image_path') + '/' + 'full logo on dark.svg' %>" alt="Zammad">
|
<img class="zammad full logo" src="<%= @C('image_path') + '/' + 'full logo on dark.svg' %>" alt="Zammad">
|
||||||
<form class="setup wizard">
|
<form class="setup wizard js-channel">
|
||||||
<div class="wizard-slide">
|
<div class="wizard-slide">
|
||||||
<h2><%- @T('Connect Channels') %></h2>
|
<h2><%- @T('Connect Channels') %></h2>
|
||||||
<div class="wizard-body vertical center">
|
<div class="wizard-body vertical center">
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="main flex vertical centered darkBackground">
|
<div class="main flex vertical centered darkBackground">
|
||||||
<img class="zammad full logo" src="<%= @C('image_path') + '/' + 'full logo on dark.svg' %>" alt="Zammad">
|
<img class="zammad full logo" src="<%= @C('image_path') + '/' + 'full logo on dark.svg' %>" alt="Zammad">
|
||||||
<div class="setup wizard">
|
<div class="setup wizard js-start">
|
||||||
<div class="wizard-slide">
|
<div class="wizard-slide">
|
||||||
<div class="wizard-body vertical centered">
|
<div class="wizard-body vertical centered">
|
||||||
<a class="btn btn--primary" href="#getting_started/admin"><%- @T('Setup new System') %></a>
|
<a class="btn btn--primary" href="#getting_started/admin"><%- @T('Setup new System') %></a>
|
||||||
|
|
|
@ -11,7 +11,7 @@ class AaaGettingStartedTest < TestCase
|
||||||
:action => [
|
:action => [
|
||||||
{
|
{
|
||||||
:execute => 'check',
|
:execute => 'check',
|
||||||
:css => '#form-master',
|
:css => '.setup.wizard',
|
||||||
:result => true,
|
:result => true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -19,34 +19,39 @@ class AaaGettingStartedTest < TestCase
|
||||||
{
|
{
|
||||||
:name => 'getting started - master agent',
|
:name => 'getting started - master agent',
|
||||||
:action => [
|
:action => [
|
||||||
|
{
|
||||||
|
:execute => 'click',
|
||||||
|
:css => '.js-start .btn--primary',
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
:execute => 'set',
|
:execute => 'set',
|
||||||
:css => '#form-master input[name="firstname"]',
|
:css => '.js-admin input[name="firstname"]',
|
||||||
:value => 'Test Master',
|
:value => 'Test Master',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:execute => 'set',
|
:execute => 'set',
|
||||||
:css => '#form-master input[name="lastname"]',
|
:css => '.js-admin input[name="lastname"]',
|
||||||
:value => 'Agent',
|
:value => 'Agent',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:execute => 'set',
|
:execute => 'set',
|
||||||
:css => '#form-master input[name="email"]',
|
:css => '.js-admin input[name="email"]',
|
||||||
:value => 'master@example.com',
|
:value => 'master@example.com',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:execute => 'set',
|
:execute => 'set',
|
||||||
:css => '#form-master input[name="password"]',
|
:css => '.js-admin input[name="password"]',
|
||||||
:value => 'test1234äöüß',
|
:value => 'test1234äöüß',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:execute => 'set',
|
:execute => 'set',
|
||||||
:css => '#form-master input[name="password_confirm"]',
|
:css => '.js-admin input[name="password_confirm"]',
|
||||||
:value => 'test1234äöüß',
|
:value => 'test1234äöüß',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:execute => 'click',
|
:execute => 'click',
|
||||||
:css => '#form-master button[type="submit"]',
|
:css => '.js-admin .btn--success',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:execute => 'wait',
|
: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',
|
:name => 'getting started - agent 1',
|
||||||
:action => [
|
:action => [
|
||||||
{
|
{
|
||||||
:execute => 'match',
|
:execute => 'match',
|
||||||
:css => 'body',
|
:css => 'body',
|
||||||
:value => 'Invite Agents',
|
:value => 'Invite',
|
||||||
:match_result => true,
|
:match_result => true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:execute => 'set',
|
:execute => 'set',
|
||||||
:css => '#form-agent input[name="firstname"]',
|
:css => '.js-agent input[name="firstname"]',
|
||||||
:value => 'Agent 1',
|
:value => 'Agent 1',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:execute => 'set',
|
:execute => 'set',
|
||||||
:css => '#form-agent input[name="lastname"]',
|
:css => '.js-agent input[name="lastname"]',
|
||||||
:value => 'Test',
|
:value => 'Test',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:execute => 'set',
|
:execute => 'set',
|
||||||
:css => '#form-agent input[name="email"]',
|
:css => '.js-agent input[name="email"]',
|
||||||
:value => 'agent1@example.com',
|
:value => 'agent1@example.com',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:execute => 'click',
|
:execute => 'click',
|
||||||
:css => '#form-agent input[name="group_ids"][value="1"]',
|
:css => '.js-agent input[name="group_ids"][value="1"]',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:execute => 'click',
|
:execute => 'click',
|
||||||
:css => '#form-agent button[type="submit"]',
|
:css => '.js-agent .btn--success',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:execute => 'watch_for',
|
:execute => 'watch_for',
|
||||||
|
@ -101,15 +213,22 @@ class AaaGettingStartedTest < TestCase
|
||||||
{
|
{
|
||||||
:execute => 'check',
|
:execute => 'check',
|
||||||
:element => :url,
|
:element => :url,
|
||||||
:result => '#getting_started',
|
:result => '#getting_started/agents',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
:execute => 'match',
|
:execute => 'click',
|
||||||
:css => 'body',
|
:css => '.js-agent .btn--primary',
|
||||||
:value => 'Invite Agents',
|
},
|
||||||
:match_result => true,
|
{
|
||||||
|
:execute => 'watch_for',
|
||||||
|
:area => 'body',
|
||||||
|
:value => 'Activity Stream',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
:execute => 'check',
|
||||||
|
:element => :url,
|
||||||
|
:result => '#dashboard',
|
||||||
},
|
},
|
||||||
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
@ -253,11 +253,14 @@ class TestCase < Test::Unit::TestCase
|
||||||
text = ''
|
text = ''
|
||||||
(1..36).each { |loop|
|
(1..36).each { |loop|
|
||||||
element = instance.find_element( { :css => action[:area] } )
|
element = instance.find_element( { :css => action[:area] } )
|
||||||
text = element.text
|
if element.displayed?
|
||||||
if text =~ /#{action[:value]}/i
|
text = element.text
|
||||||
assert( true, "(#{test[:name]}) '#{action[:value]}' found in '#{text}'" )
|
puts "T: #{text}"
|
||||||
sleep 0.4
|
if text =~ /#{action[:value]}/i
|
||||||
return
|
assert( true, "(#{test[:name]}) '#{action[:value]}' found in '#{text}'" )
|
||||||
|
sleep 0.4
|
||||||
|
return
|
||||||
|
end
|
||||||
end
|
end
|
||||||
sleep 0.33
|
sleep 0.33
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue