2012-12-14 10:14:48 +00:00
|
|
|
# encoding: utf-8
|
|
|
|
require 'browser_test_helper'
|
2013-02-12 00:56:23 +00:00
|
|
|
|
2013-02-23 22:54:48 +00:00
|
|
|
class CustomerTicketCreateTest < TestCase
|
|
|
|
def test_customer_ticket_create
|
2012-12-14 10:14:48 +00:00
|
|
|
tests = [
|
|
|
|
{
|
2013-02-21 21:58:55 +00:00
|
|
|
:name => 'customer ticket create',
|
2012-12-14 10:14:48 +00:00
|
|
|
:action => [
|
|
|
|
{
|
|
|
|
:execute => 'click',
|
2013-02-22 10:36:00 +00:00
|
|
|
:css => 'a[href="#customer_ticket_new"]',
|
2012-12-14 10:14:48 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'check',
|
2013-06-10 14:16:13 +00:00
|
|
|
:css => '.ticket-create',
|
2012-12-14 10:14:48 +00:00
|
|
|
:result => true,
|
|
|
|
},
|
2013-02-21 21:09:36 +00:00
|
|
|
{
|
|
|
|
:execute => 'wait',
|
2013-03-19 15:39:13 +00:00
|
|
|
:value => 1,
|
2013-02-21 21:09:36 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'select',
|
2013-06-10 14:16:13 +00:00
|
|
|
:css => '.ticket-create select[name="group_id"]',
|
2013-02-21 21:09:36 +00:00
|
|
|
:value => 'Users',
|
|
|
|
},
|
2012-12-14 10:14:48 +00:00
|
|
|
{
|
|
|
|
:execute => 'set',
|
2013-06-10 14:16:13 +00:00
|
|
|
:css => '.ticket-create input[name="subject"]',
|
2012-12-14 10:14:48 +00:00
|
|
|
:value => 'some subject 123äöü',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'set',
|
2013-06-10 14:16:13 +00:00
|
|
|
:css => '.ticket-create textarea[name="body"]',
|
2012-12-14 10:14:48 +00:00
|
|
|
:value => 'some body 123äöü',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'click',
|
2013-06-10 14:16:13 +00:00
|
|
|
:css => '.ticket-create button[type="submit"]',
|
2012-12-14 10:14:48 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'wait',
|
2013-02-28 01:01:39 +00:00
|
|
|
:value => 3,
|
2012-12-14 10:14:48 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'check',
|
|
|
|
:element => :url,
|
|
|
|
:result => '#ticket/zoom/',
|
|
|
|
},
|
2013-02-21 21:09:36 +00:00
|
|
|
|
|
|
|
# check ticket
|
|
|
|
{
|
|
|
|
:execute => 'match',
|
2013-10-01 22:41:56 +00:00
|
|
|
:css => '.active div.ticket-article',
|
2013-02-21 21:09:36 +00:00
|
|
|
:value => 'some body 123äöü',
|
|
|
|
:match_result => true,
|
|
|
|
},
|
|
|
|
|
|
|
|
# update ticket
|
|
|
|
{
|
|
|
|
:execute => 'check',
|
2013-06-10 14:16:13 +00:00
|
|
|
:css => '.active textarea[name="body"]',
|
2013-02-21 21:09:36 +00:00
|
|
|
:result => true,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'set',
|
2013-06-10 14:16:13 +00:00
|
|
|
:css => '.active textarea[name="body"]',
|
2013-02-21 21:09:36 +00:00
|
|
|
:value => 'some body 1234 äöüß',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
:execute => 'click',
|
2013-06-10 14:16:13 +00:00
|
|
|
:css => '.active button',
|
2013-02-21 21:09:36 +00:00
|
|
|
:type => 'submit',
|
|
|
|
},
|
|
|
|
{
|
2013-08-27 21:05:33 +00:00
|
|
|
:execute => 'watch_for',
|
|
|
|
:area => 'body',
|
|
|
|
:value => 'some body 1234 äöüß',
|
2013-02-21 21:09:36 +00:00
|
|
|
},
|
2012-12-14 10:14:48 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
]
|
|
|
|
browser_signle_test_with_login(tests)
|
|
|
|
end
|
2013-02-12 00:56:23 +00:00
|
|
|
end
|