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
|
2015-02-22 22:20:05 +00:00
|
|
|
@browser = browser_instance
|
|
|
|
login(
|
2015-04-27 13:42:53 +00:00
|
|
|
username: 'nicole.braun@zammad.org',
|
|
|
|
password: 'test',
|
|
|
|
url: browser_url,
|
2015-02-22 22:20:05 +00:00
|
|
|
)
|
2013-02-21 21:09:36 +00:00
|
|
|
|
2015-02-22 22:20:05 +00:00
|
|
|
# customer ticket create
|
2015-04-27 13:42:53 +00:00
|
|
|
click( css: 'a[href="#new"]' )
|
|
|
|
click( css: 'a[href="#customer_ticket_new"]' )
|
2015-02-22 22:20:05 +00:00
|
|
|
sleep 2
|
2013-02-21 21:09:36 +00:00
|
|
|
|
2015-02-22 22:20:05 +00:00
|
|
|
select(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.newTicket select[name="group_id"]',
|
|
|
|
value: 'Users',
|
2015-02-22 22:20:05 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
set(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.newTicket input[name="title"]',
|
|
|
|
value: 'some subject 123äöü',
|
2015-02-22 22:20:05 +00:00
|
|
|
)
|
|
|
|
set(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.newTicket [data-name="body"]',
|
|
|
|
value: 'some body 123äöü',
|
2015-02-22 22:20:05 +00:00
|
|
|
)
|
2015-06-28 02:18:34 +00:00
|
|
|
click( css: '.newTicket button.js-submit' )
|
2015-02-22 22:20:05 +00:00
|
|
|
sleep 5
|
|
|
|
|
|
|
|
# check if ticket is shown
|
2015-04-27 13:42:53 +00:00
|
|
|
location_check( url: '#ticket/zoom/' )
|
2015-02-22 22:20:05 +00:00
|
|
|
|
|
|
|
match(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.active div.ticket-article',
|
|
|
|
value: 'some body 123äöü',
|
|
|
|
no_quote: true,
|
2015-02-22 22:20:05 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# update ticket
|
|
|
|
set(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.active [data-name="body"]',
|
|
|
|
value: 'some body 1234 äöüß',
|
2015-12-05 19:44:43 +00:00
|
|
|
no_click: true,
|
2015-02-22 22:20:05 +00:00
|
|
|
)
|
2015-11-06 01:43:26 +00:00
|
|
|
|
|
|
|
task_type(
|
|
|
|
type: 'stayOnTab',
|
|
|
|
)
|
|
|
|
|
2015-10-05 13:04:45 +00:00
|
|
|
click( css: '.active .js-submit' )
|
2015-02-22 22:20:05 +00:00
|
|
|
|
|
|
|
watch_for(
|
2015-04-27 13:42:53 +00:00
|
|
|
css: '.active div.ticket-article',
|
|
|
|
value: 'some body 1234 äöüß',
|
2015-02-22 22:20:05 +00:00
|
|
|
)
|
2012-12-14 10:14:48 +00:00
|
|
|
end
|
2015-04-27 14:15:29 +00:00
|
|
|
end
|