Improved unit tests.

This commit is contained in:
Martin Edenhofer 2013-08-19 17:26:44 +02:00
parent 5a30476bc0
commit 11e1cd471e
2 changed files with 13 additions and 3 deletions

View file

@ -263,7 +263,7 @@ class TextModuleTest < TestCase
:action => [ :action => [
{ {
:execute => 'wait', :execute => 'wait',
:value => 3, :value => 4,
}, },
{ {
:where => :instance2, :where => :instance2,
@ -388,6 +388,16 @@ class TextModuleTest < TestCase
:execute => 'wait', :execute => 'wait',
:value => 4, :value => 4,
}, },
{
:where => :instance2,
:execute => 'set',
:css => '.active textarea[name=body]',
:value => 'test',
},
{
:execute => 'wait',
:value => 4,
},
{ {
:where => :instance2, :where => :instance2,
:execute => 'set', :execute => 'set',
@ -418,7 +428,7 @@ class TextModuleTest < TestCase
:where => :instance2, :where => :instance2,
:execute => 'match', :execute => 'match',
:css => '.active textarea[name=body]', :css => '.active textarea[name=body]',
:value => 'some content' + random, :value => 'some content Braun' + random,
:match_result => true, :match_result => true,
}, },
], ],

View file

@ -247,7 +247,7 @@ puts "NOTICE #{Time.now.to_s}: " + action.inspect
sleep 4 sleep 4
element = instance.find_element( { :css => '.active .ticket_create input[name="customer_id_autocompletion"]' } ) element = instance.find_element( { :css => '.active .ticket_create input[name="customer_id_autocompletion"]' } )
element.clear element.clear
element.send_keys( 'ma' ) element.send_keys( 'nico' )
sleep 4 sleep 4
element = instance.find_element( { :css => '.active .ticket_create input[name="customer_id_autocompletion"]' } ) element = instance.find_element( { :css => '.active .ticket_create input[name="customer_id_autocompletion"]' } )
element.send_keys( :arrow_down ) element.send_keys( :arrow_down )