trabajo-afectivo/test/browser/customer_ticket_create_test.rb

101 lines
2.5 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 => 'wait',
2013-03-19 16:46:08 +00:00
:value => 6,
2012-12-14 10:14:48 +00:00
},
{
:execute => 'check',
:css => '#form_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',
:css => '#form_create select[name="group_id"]',
:value => 'Users',
},
2012-12-14 10:14:48 +00:00
{
:execute => 'set',
:css => '#form_create input[name="subject"]',
2012-12-14 10:14:48 +00:00
:value => 'some subject 123äöü',
},
{
:execute => 'set',
:css => '#form_create textarea[name="body"]',
2012-12-14 10:14:48 +00:00
:value => 'some body 123äöü',
},
{
:execute => 'click',
:css => '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',
:css => '#login',
2012-12-14 10:14:48 +00:00
:result => false,
},
{
:execute => 'check',
:element => :url,
:result => '#ticket/zoom/',
},
# check ticket
{
:execute => 'match',
:css => 'div.article',
:value => 'some body 123äöü',
:match_result => true,
},
# update ticket
{
:execute => 'check',
:css => 'textarea[name="body"]',
:result => true,
},
{
:execute => 'set',
:css => 'textarea[name="body"]',
:value => 'some body 1234 äöüß',
},
{
:execute => 'click',
:css => 'button',
:type => 'submit',
},
{
:execute => 'wait',
2013-02-28 01:01:39 +00:00
:value => 4,
},
{
:execute => 'match',
:css => 'body',
:value => 'some body 1234 äöüß',
:match_result => true,
},
2012-12-14 10:14:48 +00:00
],
},
]
browser_signle_test_with_login(tests)
end
2013-02-12 00:56:23 +00:00
end