trabajo-afectivo/test/browser/agent_ticket_actions_level4_test.rb

68 lines
1.6 KiB
Ruby
Raw Normal View History

# 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-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,
},
{
:execute => 'wait',
2013-07-25 09:11:20 +00:00
:value => 6,
},
2013-07-25 09:11:20 +00:00
# reload instances, verify autosave
{
2014-10-03 22:39:54 +00:00
:execute => 'reload',
},
{
:execute => 'wait',
2013-07-23 21:03:48 +00:00
:value => 4,
},
{
: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',
:value => 'some body 4 - 123äöü',
:match_result => true,
},
# close task/cleanup
{
2014-10-03 22:39:54 +00:00
:execute => 'close_all_tasks',
},
],
},
]
browser_signle_test_with_login(tests, { :username => 'agent1@example.com' })
end
end