Improved browser test.

This commit is contained in:
Martin Edenhofer 2014-08-15 14:33:03 +02:00
parent 1f0b54aaa8
commit e173409148
2 changed files with 19 additions and 55 deletions

View file

@ -20,54 +20,12 @@ class ManageTest < TestCase
:css => 'a[href="#manage/users"]', :css => 'a[href="#manage/users"]',
}, },
{ {
:execute => 'wait', :execute => 'create_user',
:value => 2, :login => 'some login' + random,
}, :firstname => 'Manage Firstname' + random,
{ :lastname => 'Manage Lastname' + random,
:execute => 'click', :email => user_email,
:css => 'a[data-type="new"]', :password => 'some-pass',
},
{
:execute => 'wait',
:value => 2,
},
{
:execute => 'set',
:css => '.modal input[name=login]',
:value => 'some login' + random,
},
{
:execute => 'set',
:css => '.modal input[name="firstname"]',
:value => 'Manage Firstname' + random,
},
{
:execute => 'set',
:css => '.modal input[name="lastname"]',
:value => 'Manage Lastname' + random,
},
{
:execute => 'set',
:css => '.modal input[name="email"]',
:value => user_email,
},
{
:execute => 'set',
:css => '.modal input[name="password"]',
:value => 'some-pass',
},
{
:execute => 'set',
:css => '.modal input[name="password_confirm"]',
:value => 'some-pass',
},
{
:execute => 'click',
:css => '.modal input[name="role_ids"][value="3"]',
},
{
:execute => 'click',
:css => '.modal button.submit',
}, },
{ {
:execute => 'watch_for', :execute => 'watch_for',
@ -144,13 +102,17 @@ class ManageTest < TestCase
:area => 'body', :area => 'body',
:value => random, :value => random,
}, },
{
:execute => 'wait',
:value => 3,
},
{ {
:execute => 'click', :execute => 'click',
:css => '.table-overview tr:last-child td', :css => '.table-overview tr:last-child td',
}, },
{ {
:execute => 'wait', :execute => 'wait',
:value => 2, :value => 1,
}, },
{ {
:execute => 'set', :execute => 'set',
@ -168,12 +130,12 @@ class ManageTest < TestCase
}, },
{ {
:execute => 'watch_for', :execute => 'watch_for',
:area => 'body', :area => 'body table',
:value => 'some sla update ' + random, :value => 'some sla update ' + random,
}, },
{ {
:execute => 'wait', :execute => 'wait',
:value => 1, :value => 4,
}, },
{ {
:execute => 'click', :execute => 'click',
@ -189,7 +151,7 @@ class ManageTest < TestCase
}, },
{ {
:execute => 'wait', :execute => 'wait',
:value => 2, :value => 3,
}, },
{ {
:execute => 'match', :execute => 'match',

View file

@ -483,7 +483,7 @@ class TextModuleTest < TestCase
:where => :instance2, :where => :instance2,
:execute => 'set', :execute => 'set',
:css => '#form-customer input[name="customer_id_autocompletion"]', :css => '#form-customer input[name="customer_id_autocompletion"]',
:value => 'Text', :value => firstname,
}, },
{ {
:execute => 'wait', :execute => 'wait',
@ -547,10 +547,12 @@ class TextModuleTest < TestCase
:execute => 'match', :execute => 'match',
:css => '.active textarea[name=body]', :css => '.active textarea[name=body]',
:value => 'some content ' + lastname, :value => 'some content ' + lastname,
:no_quote => true,
:match_result => true, :match_result => true,
}, },
{
:execute => 'wait',
:value => 2,
},
], ],
}, },