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"]',
},
{
:execute => 'wait',
:value => 2,
},
{
:execute => 'click',
:css => 'a[data-type="new"]',
},
{
: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 => 'create_user',
:login => 'some login' + random,
:firstname => 'Manage Firstname' + random,
:lastname => 'Manage Lastname' + random,
:email => user_email,
:password => 'some-pass',
},
{
:execute => 'watch_for',
@ -144,13 +102,17 @@ class ManageTest < TestCase
:area => 'body',
:value => random,
},
{
:execute => 'wait',
:value => 3,
},
{
:execute => 'click',
:css => '.table-overview tr:last-child td',
},
{
:execute => 'wait',
:value => 2,
:value => 1,
},
{
:execute => 'set',
@ -168,12 +130,12 @@ class ManageTest < TestCase
},
{
:execute => 'watch_for',
:area => 'body',
:area => 'body table',
:value => 'some sla update ' + random,
},
{
:execute => 'wait',
:value => 1,
:value => 4,
},
{
:execute => 'click',
@ -189,7 +151,7 @@ class ManageTest < TestCase
},
{
:execute => 'wait',
:value => 2,
:value => 3,
},
{
:execute => 'match',

View file

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