trabajo-afectivo/test/browser/customer_ticket_create_test.rb

91 lines
2.3 KiB
Ruby
Raw Normal View History

2012-12-14 10:14:48 +00:00
# encoding: utf-8
require 'browser_test_helper'
2013-02-12 00:56:23 +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 => [
2014-09-15 09:06:13 +00:00
{
:execute => 'click',
:css => 'a[href="#new"]',
},
2012-12-14 10:14:48 +00:00
{
:execute => 'click',
:css => 'a[href="#customer_ticket_new"]',
2012-12-14 10:14:48 +00:00
},
2014-09-15 09:06:13 +00:00
{
:execute => 'wait',
:value => 2,
},
2012-12-14 10:14:48 +00:00
{
:execute => 'check',
2014-10-11 23:35:53 +00:00
:css => '.newTicket',
2012-12-14 10:14:48 +00:00
:result => true,
},
{
:execute => 'select',
2014-10-11 23:35:53 +00:00
:css => '.newTicket select[name="group_id"]',
:value => 'Users',
},
2012-12-14 10:14:48 +00:00
{
:execute => 'set',
2014-10-11 23:35:53 +00:00
:css => '.newTicket input[name="title"]',
2012-12-14 10:14:48 +00:00
:value => 'some subject 123äöü',
},
{
:execute => 'set',
2014-10-11 23:35:53 +00:00
:css => '.newTicket [data-name="body"]',
2012-12-14 10:14:48 +00:00
:value => 'some body 123äöü',
},
{
:execute => 'click',
2014-10-11 23:35:53 +00:00
:css => '.newTicket button.submit',
2012-12-14 10:14:48 +00:00
},
{
:execute => 'wait',
:value => 5,
2012-12-14 10:14:48 +00:00
},
{
: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 123äöü',
:match_result => true,
},
# update ticket
{
:execute => 'check',
2014-10-03 22:39:54 +00:00
:css => '.active [data-name="body"]',
:result => true,
},
{
:execute => 'set',
2014-10-03 22:39:54 +00:00
:css => '.active [data-name="body"]',
:value => 'some body 1234 äöüß',
},
{
:execute => 'click',
2014-10-11 23:35:53 +00:00
:css => '.active button.js-submit',
:type => 'submit',
},
{
2013-08-27 21:05:33 +00:00
:execute => 'watch_for',
:area => 'body',
:value => 'some body 1234 äöüß',
},
2012-12-14 10:14:48 +00:00
],
},
]
browser_signle_test_with_login(tests)
end
2013-02-12 00:56:23 +00:00
end