Take email to from in create screen.

This commit is contained in:
Martin Edenhofer 2014-06-05 09:52:56 +02:00
parent 1a98cca66a
commit 754840470f
3 changed files with 48 additions and 8 deletions

View file

@ -361,6 +361,8 @@ class UserNew extends App.ControllerModal
# force to reload object
callbackReload = (user) ->
realname = user.displayName()
if user.email
realname = "#{ realname } <#{ user.email }>"
ui.create_screen.el.find('[name=customer_id]').val( user.id )
ui.create_screen.el.find('[name=customer_id_autocompletion]').val( realname )

View file

@ -106,7 +106,7 @@ class AgentTicketActionsLevel3Test < TestCase
},
{
:execute => 'wait',
:value => 4,
:value => 5,
},
{
:where => :instance2,
@ -122,7 +122,7 @@ class AgentTicketActionsLevel3Test < TestCase
},
{
:execute => 'wait',
:value => 8,
:value => 10,
},
{
:where => :instance2,
@ -173,7 +173,7 @@ class AgentTicketActionsLevel3Test < TestCase
},
{
:execute => 'wait',
:value => 8,
:value => 14,
},
# check content in instance 2

View file

@ -4,6 +4,9 @@ require 'browser_test_helper'
class AgentUserManageTest < TestCase
def test_agent_user
customer_user_email = 'customer-test-' + rand(999999).to_s + '@example.com'
firstname = 'Customer Firstname'
lastname = 'Customer Lastname'
fullname = "#{ firstname } #{ lastname } <#{ customer_user_email }>"
tests = [
{
:name => 'create customer',
@ -34,12 +37,12 @@ class AgentUserManageTest < TestCase
{
:execute => 'set',
:css => '.modal input[name="firstname"]',
:value => 'Customer Firstname',
:value => firstname,
},
{
:execute => 'set',
:css => '.modal input[name="lastname"]',
:value => 'Customer Lastname',
:value => lastname,
},
{
:execute => 'set',
@ -66,7 +69,28 @@ class AgentUserManageTest < TestCase
{
:execute => 'match',
:css => '.active input[name="customer_id_autocompletion"]',
:value => 'Customer',
:value => firstname,
:no_quote => true,
:match_result => true,
},
{
:execute => 'match',
:css => '.active input[name="customer_id_autocompletion"]',
:value => lastname,
:no_quote => true,
:match_result => true,
},
{
:execute => 'match',
:css => '.active input[name="customer_id_autocompletion"]',
:value => customer_user_email,
:no_quote => true,
:match_result => true,
},
{
:execute => 'match',
:css => '.active input[name="customer_id_autocompletion"]',
:value => fullname,
:no_quote => true,
:match_result => true,
},
@ -112,7 +136,7 @@ class AgentUserManageTest < TestCase
{
:execute => 'match',
:css => '.active input[name="customer_id_autocompletion"]',
:value => 'Customer',
:value => firstname,
:no_quote => true,
:match_result => false,
},
@ -149,7 +173,21 @@ class AgentUserManageTest < TestCase
{
:execute => 'match',
:css => '.active input[name="customer_id_autocompletion"]',
:value => 'Customer',
:value => firstname,
:no_quote => true,
:match_result => true,
},
{
:execute => 'match',
:css => '.active input[name="customer_id_autocompletion"]',
:value => lastname,
:no_quote => true,
:match_result => true,
},
{
:execute => 'match',
:css => '.active input[name="customer_id_autocompletion"]',
:value => fullname,
:no_quote => true,
:match_result => true,
},