2013-07-13 11:10:46 +00:00
|
|
|
# encoding: utf-8
|
|
|
|
require 'browser_test_helper'
|
|
|
|
|
|
|
|
class AgentTicketActionLevel4Test < TestCase
|
|
|
|
def test_agent_ticket_create_with_reload
|
|
|
|
tests = [
|
|
|
|
{
|
|
|
|
:name => 'agent ticket create with reload',
|
|
|
|
:action => [
|
|
|
|
{
|
|
|
|
:execute => 'close_all_tasks',
|
|
|
|
},
|
2013-07-25 09:11:20 +00:00
|
|
|
|
|
|
|
# create ticket
|
2013-07-13 11:10:46 +00:00
|
|
|
{
|
2013-07-25 09:11:20 +00:00
|
|
|
:execute => 'create_ticket',
|
|
|
|
:group => 'Users',
|
|
|
|
:subject => 'some subject 4 - 123äöü',
|
|
|
|
:body => 'some body 4 - 123äöü',
|
|
|
|
:do_not_submit => true,
|
2013-07-13 11:10:46 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'wait',
|
2013-07-25 09:11:20 +00:00
|
|
|
:value => 6,
|
2013-07-13 11:10:46 +00:00
|
|
|
},
|
|
|
|
|
2013-07-25 09:11:20 +00:00
|
|
|
# reload instances, verify autosave
|
2013-07-13 11:10:46 +00:00
|
|
|
{
|
|
|
|
:execute => 'reload',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'wait',
|
2013-07-23 21:03:48 +00:00
|
|
|
:value => 4,
|
2013-07-13 11:10:46 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
:execute => 'click',
|
|
|
|
:css => '.active .form-actions button[type="submit"]',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'wait',
|
|
|
|
:value => 5,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'check',
|
|
|
|
:element => :url,
|
|
|
|
:result => '#ticket/zoom/',
|
|
|
|
},
|
|
|
|
|
|
|
|
# check ticket
|
|
|
|
{
|
|
|
|
:execute => 'match',
|
2013-10-01 22:41:56 +00:00
|
|
|
:css => '.active div.ticket-article',
|
2013-07-13 11:10:46 +00:00
|
|
|
:value => 'some body 4 - 123äöü',
|
|
|
|
:match_result => true,
|
|
|
|
},
|
|
|
|
|
|
|
|
# close task/cleanup
|
|
|
|
{
|
|
|
|
:execute => 'click',
|
|
|
|
:css => '#task [data-type="close"]',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
]
|
|
|
|
browser_signle_test_with_login(tests, { :username => 'agent1@example.com' })
|
|
|
|
end
|
|
|
|
end
|