Improved browser tests/improved css selectors.

This commit is contained in:
Martin Edenhofer 2013-06-10 13:00:22 +02:00
parent a8d8764ac3
commit 5a5a334505
2 changed files with 15 additions and 12 deletions

View file

@ -8,6 +8,9 @@ class AgentUserManageTest < TestCase
{ {
:name => 'create customer', :name => 'create customer',
:action => [ :action => [
{
:execute => 'close_all_tasks',
},
{ {
:execute => 'click', :execute => 'click',
:css => 'a[href="#new"]', :css => 'a[href="#new"]',
@ -22,7 +25,7 @@ class AgentUserManageTest < TestCase
}, },
{ {
:execute => 'click', :execute => 'click',
:css => '.customer_new', :css => '.active .customer_new',
}, },
{ {
:execute => 'wait', :execute => 'wait',
@ -55,14 +58,14 @@ class AgentUserManageTest < TestCase
# check is used is selected # check is used is selected
{ {
:execute => 'match', :execute => 'match',
:css => 'input[name="customer_id"]', :css => '.active input[name="customer_id"]',
:value => '^[0-9].?$', :value => '^[0-9].?$',
:no_quote => true, :no_quote => true,
:match_result => true, :match_result => true,
}, },
{ {
:execute => 'match', :execute => 'match',
:css => 'input[name="customer_id_autocompletion"]', :css => '.active input[name="customer_id_autocompletion"]',
:value => 'Customer', :value => 'Customer',
:no_quote => true, :no_quote => true,
:match_result => true, :match_result => true,
@ -97,47 +100,47 @@ class AgentUserManageTest < TestCase
}, },
{ {
:execute => 'match', :execute => 'match',
:css => 'input[name="customer_id"]', :css => '.active input[name="customer_id"]',
:value => '^[0-9].?$', :value => '^[0-9].?$',
:no_quote => true, :no_quote => true,
:match_result => false, :match_result => false,
}, },
{ {
:execute => 'match', :execute => 'match',
:css => 'input[name="customer_id_autocompletion"]', :css => '.active input[name="customer_id_autocompletion"]',
:value => 'Customer', :value => 'Customer',
:no_quote => true, :no_quote => true,
:match_result => false, :match_result => false,
}, },
{ {
:execute => 'set', :execute => 'set',
:css => '.ticket_create input[name="customer_id_autocompletion"]', :css => '.active .ticket_create input[name="customer_id_autocompletion"]',
:value => customer_user_email, :value => customer_user_email,
}, },
{ {
:execute => 'wait', :execute => 'wait',
:value => 4, :value => 3,
}, },
{ {
:execute => 'sendkey', :execute => 'sendkey',
:css => '.ticket_create input[name="customer_id_autocompletion"]', :css => '.active .ticket_create input[name="customer_id_autocompletion"]',
:value => :arrow_down, :value => :arrow_down,
}, },
{ {
:execute => 'sendkey', :execute => 'sendkey',
:css => '.ticket_create input[name="customer_id_autocompletion"]', :css => '.active .ticket_create input[name="customer_id_autocompletion"]',
:value => :tab, :value => :tab,
}, },
{ {
:execute => 'match', :execute => 'match',
:css => 'input[name="customer_id"]', :css => '.active input[name="customer_id"]',
:value => '^[0-9].?$', :value => '^[0-9].?$',
:no_quote => true, :no_quote => true,
:match_result => true, :match_result => true,
}, },
{ {
:execute => 'match', :execute => 'match',
:css => 'input[name="customer_id_autocompletion"]', :css => '.active input[name="customer_id_autocompletion"]',
:value => 'Customer', :value => 'Customer',
:no_quote => true, :no_quote => true,
:match_result => true, :match_result => true,

View file

@ -79,7 +79,7 @@ class TestCase < Test::Unit::TestCase
}, },
{ {
:execute => 'wait', :execute => 'wait',
:value => 3, :value => 2,
}, },
{ {
:execute => 'check', :execute => 'check',