Improved tests for new UI.

This commit is contained in:
Martin Edenhofer 2013-08-06 22:08:32 +02:00
parent aecbb2b129
commit cf38ca2c5c
7 changed files with 34 additions and 39 deletions

View file

@ -54,7 +54,7 @@ class AgentTicketActionLevel1Test < TestCase
}, },
{ {
:execute => 'click', :execute => 'click',
:css => '.active button', :css => '.active button.submit',
}, },
{ {
:execute => 'wait', :execute => 'wait',
@ -111,7 +111,7 @@ class AgentTicketActionLevel1Test < TestCase
}, },
{ {
:execute => 'click', :execute => 'click',
:css => '.content_permanent.active button', :css => '.content_permanent.active button.submit',
}, },
{ {
:execute => 'wait', :execute => 'wait',
@ -136,6 +136,10 @@ class AgentTicketActionLevel1Test < TestCase
{ {
:name => 'agent ticket merge', :name => 'agent ticket merge',
:action => [ :action => [
{
:execute => 'click',
:css => '.active .action',
},
{ {
:execute => 'click', :execute => 'click',
:css => '.active a[data-type="merge"]', :css => '.active a[data-type="merge"]',

View file

@ -237,7 +237,7 @@ class AgentTicketActionsLevel2Test < TestCase
{ {
:where => :instance1, :where => :instance1,
:execute => 'click', :execute => 'click',
:css => '.active button', :css => '.active button.submit',
}, },
{ {
:execute => 'wait', :execute => 'wait',

View file

@ -52,7 +52,7 @@ class AgentUserManageTest < TestCase
}, },
{ {
:execute => 'click', :execute => 'click',
:css => '.modal button', :css => '.modal button.submit',
}, },
{ {
:execute => 'wait', :execute => 'wait',

View file

@ -22,12 +22,12 @@ class MaintenanceMessageTest < TestCase
{ {
:where => :instance1, :where => :instance1,
:execute => 'click', :execute => 'click',
:css => 'a[href="#admin"]', :css => 'a[href="#manage"]',
}, },
{ {
:where => :instance1, :where => :instance1,
:execute => 'click', :execute => 'click',
:css => 'a[href="#maintenance"]', :css => 'a[href="#system/maintenance"]',
}, },
{ {
:where => :instance1, :where => :instance1,
@ -87,12 +87,12 @@ class MaintenanceMessageTest < TestCase
{ {
:where => :instance1, :where => :instance1,
:execute => 'click', :execute => 'click',
:css => 'a[href="#admin"]', :css => 'a[href="#manage"]',
}, },
{ {
:where => :instance1, :where => :instance1,
:execute => 'click', :execute => 'click',
:css => 'a[href="#maintenance"]', :css => 'a[href="#system/maintenance"]',
}, },
{ {
:where => :instance1, :where => :instance1,
@ -152,12 +152,12 @@ class MaintenanceMessageTest < TestCase
{ {
:where => :instance1, :where => :instance1,
:execute => 'click', :execute => 'click',
:css => 'a[href="#admin"]', :css => 'a[href="#manage"]',
}, },
{ {
:where => :instance1, :where => :instance1,
:execute => 'click', :execute => 'click',
:css => 'a[href="#maintenance"]', :css => 'a[href="#system/maintenance"]',
}, },
{ {
:where => :instance1, :where => :instance1,

View file

@ -27,23 +27,14 @@ class PreferencesTest < TestCase
:execute => 'wait', :execute => 'wait',
:value => 1, :value => 1,
}, },
{
:execute => 'check',
:css => '#language',
:result => true,
},
{
:execute => 'wait',
:value => 2,
},
{ {
:execute => 'select', :execute => 'select',
:css => '#language select[name="locale"]', :css => '.language_item select[name="locale"]',
:value => 'Deutsch', :value => 'Deutsch',
}, },
{ {
:execute => 'click', :execute => 'click',
:css => '#language button', :css => '.content button[type="submit"]',
}, },
{ {
:execute => 'wait', :execute => 'wait',
@ -62,12 +53,12 @@ class PreferencesTest < TestCase
}, },
{ {
:execute => 'select', :execute => 'select',
:css => '#language select[name="locale"]', :css => '.language_item select[name="locale"]',
:value => 'English (United States)', :value => 'English (United States)',
}, },
{ {
:execute => 'click', :execute => 'click',
:css => '#language button', :css => '.content button[type="submit"]',
}, },
{ {
:execute => 'wait', :execute => 'wait',

View file

@ -9,7 +9,7 @@ class SettingTest < TestCase
:action => [ :action => [
{ {
:execute => 'click', :execute => 'click',
:css => 'a[href="#settings"]', :css => 'a[href="#manage"]',
}, },
{ {
:execute => 'click', :execute => 'click',

View file

@ -16,11 +16,11 @@ class TextModuleTest < TestCase
}, },
{ {
:execute => 'click', :execute => 'click',
:css => 'a[href="#admin"]', :css => 'a[href="#manage"]',
}, },
{ {
:execute => 'click', :execute => 'click',
:css => 'a[href="#text_modules"]', :css => 'a[href="#manage/text_modules"]',
}, },
{ {
:execute => 'click', :execute => 'click',
@ -28,17 +28,17 @@ class TextModuleTest < TestCase
}, },
{ {
:execute => 'set', :execute => 'set',
:css => 'input[name=name]', :css => '.modal input[name=name]',
:value => 'some name' + random, :value => 'some name' + random,
}, },
{ {
:execute => 'set', :execute => 'set',
:css => 'input[name="keywords"]', :css => '.modal input[name="keywords"]',
:value => random, :value => random,
}, },
{ {
:execute => 'set', :execute => 'set',
:css => 'textarea[name="content"]', :css => '.modal textarea[name="content"]',
:value => 'some content' + random, :value => 'some content' + random,
}, },
{ {
@ -62,11 +62,11 @@ class TextModuleTest < TestCase
:action => [ :action => [
{ {
:execute => 'click', :execute => 'click',
:css => 'a[href="#admin"]', :css => 'a[href="#manage"]',
}, },
{ {
:execute => 'click', :execute => 'click',
:css => 'a[href="#text_modules"]', :css => 'a[href="#manage/text_modules"]',
}, },
{ {
:execute => 'click', :execute => 'click',
@ -74,17 +74,17 @@ class TextModuleTest < TestCase
}, },
{ {
:execute => 'set', :execute => 'set',
:css => 'input[name=name]', :css => '.modal input[name=name]',
:value => 'some name' + random2, :value => 'some name' + random2,
}, },
{ {
:execute => 'set', :execute => 'set',
:css => 'input[name="keywords"]', :css => '.modal input[name="keywords"]',
:value => random2, :value => random2,
}, },
{ {
:execute => 'set', :execute => 'set',
:css => 'textarea[name="content"]', :css => '.modal textarea[name="content"]',
:value => 'some content' + random2, :value => 'some content' + random2,
}, },
{ {
@ -208,12 +208,12 @@ class TextModuleTest < TestCase
{ {
:where => :instance1, :where => :instance1,
:execute => 'click', :execute => 'click',
:css => 'a[href="#admin"]', :css => 'a[href="#manage"]',
}, },
{ {
:where => :instance1, :where => :instance1,
:execute => 'click', :execute => 'click',
:css => 'a[href="#text_modules"]', :css => 'a[href="#manage/text_modules"]',
}, },
{ {
:where => :instance1, :where => :instance1,
@ -223,19 +223,19 @@ class TextModuleTest < TestCase
{ {
:where => :instance1, :where => :instance1,
:execute => 'set', :execute => 'set',
:css => 'input[name=name]', :css => '.modal input[name=name]',
:value => 'some name' + random, :value => 'some name' + random,
}, },
{ {
:where => :instance1, :where => :instance1,
:execute => 'set', :execute => 'set',
:css => 'input[name="keywords"]', :css => '.modal input[name="keywords"]',
:value => random, :value => random,
}, },
{ {
:where => :instance1, :where => :instance1,
:execute => 'set', :execute => 'set',
:css => 'textarea[name="content"]', :css => '.modal textarea[name="content"]',
:value => 'some content <%= @ticket.customer.lastname %>' + random, :value => 'some content <%= @ticket.customer.lastname %>' + random,
}, },
{ {