trabajo-afectivo/test/browser/customer_ticket_create_test.rb

87 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 => [
{
:execute => 'click',
: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,
},
{
:execute => 'wait',
2013-03-19 15:39:13 +00:00
:value => 1,
},
{
:execute => 'select',
2013-06-10 14:16:13 +00:00
:css => '.ticket-create select[name="group_id"]',
:value => 'Users',
},
2012-12-14 10:14:48 +00:00
{
:execute => 'set',
2014-09-09 23:42:20 +00:00
:css => '.ticket-create input[name="title"]',
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/',
},
# 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',
2013-06-10 14:16:13 +00:00
:css => '.active textarea[name="body"]',
:result => true,
},
{
:execute => 'set',
2013-06-10 14:16:13 +00:00
:css => '.active textarea[name="body"]',
:value => 'some body 1234 äöüß',
},
{
:execute => 'click',
2013-06-10 14:16:13 +00:00
:css => '.active button',
: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