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(
|
|
|
|
:username => 'nicole.braun@zammad.org',
|
|
|
|
:password => 'test',
|
|
|
|
:url => browser_url,
|
|
|
|
)
|
2013-02-21 21:09:36 +00:00
|
|
|
|
2015-02-22 22:20:05 +00:00
|
|
|
# customer ticket create
|
|
|
|
click( :css => 'a[href="#new"]' )
|
|
|
|
click( :css => 'a[href="#customer_ticket_new"]' )
|
|
|
|
sleep 2
|
2013-02-21 21:09:36 +00:00
|
|
|
|
2015-02-22 22:20:05 +00:00
|
|
|
select(
|
|
|
|
:css => '.newTicket select[name="group_id"]',
|
|
|
|
:value => 'Users',
|
|
|
|
)
|
|
|
|
|
|
|
|
set(
|
|
|
|
:css => '.newTicket input[name="title"]',
|
|
|
|
:value => 'some subject 123äöü',
|
|
|
|
)
|
|
|
|
set(
|
|
|
|
:css => '.newTicket [data-name="body"]',
|
|
|
|
:value => 'some body 123äöü',
|
|
|
|
)
|
|
|
|
click( :css => '.newTicket button.submit' )
|
|
|
|
sleep 5
|
|
|
|
|
|
|
|
# check if ticket is shown
|
|
|
|
location_check( :url => '#ticket/zoom/' )
|
|
|
|
|
|
|
|
match(
|
|
|
|
:css => '.active div.ticket-article',
|
|
|
|
:value => 'some body 123äöü',
|
|
|
|
:no_quote => true,
|
|
|
|
)
|
|
|
|
|
|
|
|
# update ticket
|
|
|
|
set(
|
|
|
|
:css => '.active [data-name="body"]',
|
|
|
|
:value => 'some body 1234 äöüß',
|
|
|
|
)
|
|
|
|
click( :css => '.active button.js-submit' )
|
|
|
|
|
|
|
|
watch_for(
|
|
|
|
:css => '.active div.ticket-article',
|
|
|
|
:value => 'some body 1234 äöüß',
|
|
|
|
)
|
2012-12-14 10:14:48 +00:00
|
|
|
end
|
2015-02-22 22:20:05 +00:00
|
|
|
end
|