Improved browser test.

This commit is contained in:
Martin Edenhofer 2013-06-10 16:16:13 +02:00
parent efde80ded3
commit ac47f84c74
2 changed files with 12 additions and 14 deletions

View file

@ -5,13 +5,11 @@
</div> </div>
</div> </div>
</div> </div>
<form class="form-horizontal"> <form class="form-horizontal ticket-create">
<input type="hidden" value="" name="article_type"/> <input type="hidden" value="" name="article_type"/>
<div class="row"> <div class="row">
<div class="span9" id="form_create"></div> <div class="span9" id="form_create"></div>
<div class="span3"> <div class="span3"></div>
<div id="xxx"></div>
</div>
</div> </div>
<div class="form-actions"> <div class="form-actions">
<button type="reset" class="btn cancel"><%- @T( 'Cancel' ) %></button>&nbsp;<button type="submit" class="btn btn-primary submit"><%- @T( 'Create' ) %></button> <button type="reset" class="btn cancel"><%- @T( 'Cancel' ) %></button>&nbsp;<button type="submit" class="btn btn-primary submit"><%- @T( 'Create' ) %></button>

View file

@ -13,11 +13,11 @@ class CustomerTicketCreateTest < TestCase
}, },
{ {
:execute => 'wait', :execute => 'wait',
:value => 6, :value => 3,
}, },
{ {
:execute => 'check', :execute => 'check',
:css => '#form_create', :css => '.ticket-create',
:result => true, :result => true,
}, },
{ {
@ -26,22 +26,22 @@ class CustomerTicketCreateTest < TestCase
}, },
{ {
:execute => 'select', :execute => 'select',
:css => '#form_create select[name="group_id"]', :css => '.ticket-create select[name="group_id"]',
:value => 'Users', :value => 'Users',
}, },
{ {
:execute => 'set', :execute => 'set',
:css => '#form_create input[name="subject"]', :css => '.ticket-create input[name="subject"]',
:value => 'some subject 123äöü', :value => 'some subject 123äöü',
}, },
{ {
:execute => 'set', :execute => 'set',
:css => '#form_create textarea[name="body"]', :css => '.ticket-create textarea[name="body"]',
:value => 'some body 123äöü', :value => 'some body 123äöü',
}, },
{ {
:execute => 'click', :execute => 'click',
:css => 'button[type="submit"]', :css => '.ticket-create button[type="submit"]',
}, },
{ {
:execute => 'wait', :execute => 'wait',
@ -61,7 +61,7 @@ class CustomerTicketCreateTest < TestCase
# check ticket # check ticket
{ {
:execute => 'match', :execute => 'match',
:css => 'div.article', :css => '.active div.article',
:value => 'some body 123äöü', :value => 'some body 123äöü',
:match_result => true, :match_result => true,
}, },
@ -69,17 +69,17 @@ class CustomerTicketCreateTest < TestCase
# update ticket # update ticket
{ {
:execute => 'check', :execute => 'check',
:css => 'textarea[name="body"]', :css => '.active textarea[name="body"]',
:result => true, :result => true,
}, },
{ {
:execute => 'set', :execute => 'set',
:css => 'textarea[name="body"]', :css => '.active textarea[name="body"]',
:value => 'some body 1234 äöüß', :value => 'some body 1234 äöüß',
}, },
{ {
:execute => 'click', :execute => 'click',
:css => 'button', :css => '.active button',
:type => 'submit', :type => 'submit',
}, },
{ {