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')()
|
||||
|
||||
new App.ControllerForm(
|
||||
el: @$('.js-admin')
|
||||
el: @$('.js-admin-form')
|
||||
model: App.User
|
||||
screen: 'signup'
|
||||
autofocus: true
|
||||
|
@ -623,7 +623,7 @@ class Agent extends App.ControllerContent
|
|||
@html App.view('getting_started/agent')()
|
||||
|
||||
new App.ControllerForm(
|
||||
el: @$('.js-agent')
|
||||
el: @$('.js-agent-form')
|
||||
model: App.User
|
||||
screen: 'invite_agent'
|
||||
autofocus: true
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<div class="main flex vertical centered darkBackground">
|
||||
<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">
|
||||
<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">
|
||||
<a class="subtle-link" href="#getting_started"><%- @T('Go Back') %></a>
|
||||
<button class="btn btn--success align-right"><%- @T( 'Create' ) %></button>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<div class="main flex vertical centered darkBackground">
|
||||
<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">
|
||||
<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">
|
||||
<a class="btn btn--primary align-left" href="#getting_started/finish"><%- @T( 'Continue' ) %></a>
|
||||
<button class="btn btn--success align-right"><%- @T( 'Invite' ) %></button>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="main flex vertical centered darkBackground">
|
||||
<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">
|
||||
<h2><%- @T('Organization') %></h2>
|
||||
<div class="wizard-body vertical justified">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="main flex vertical centered darkBackground">
|
||||
<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">
|
||||
<h2><%- @T('Connect Channels') %></h2>
|
||||
<div class="wizard-body vertical center">
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="main flex vertical centered darkBackground">
|
||||
<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-body vertical centered">
|
||||
<a class="btn btn--primary" href="#getting_started/admin"><%- @T('Setup new System') %></a>
|
||||
|
|
|
@ -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',
|
||||
},
|
||||
|
||||
],
|
||||
},
|
||||
]
|
||||
|
|
|
@ -253,12 +253,15 @@ class TestCase < Test::Unit::TestCase
|
|||
text = ''
|
||||
(1..36).each { |loop|
|
||||
element = instance.find_element( { :css => action[:area] } )
|
||||
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
|
||||
}
|
||||
assert( false, "(#{test[:name]}) '#{action[:value]}' found in '#{text}'" )
|
||||
|
|
Loading…
Reference in a new issue