diff options
author | mikl <> | 2008-04-07 21:56:09 +0000 |
---|---|---|
committer | mikl <> | 2008-04-07 21:56:09 +0000 |
commit | b43c8b4c9f3973eb5482298ed8283e33c1f426e1 (patch) | |
tree | d3864e2852da9a55e14c77b34ee14dbc351b3807 | |
parent | 87276530099acba2912aa4a5cd2048e02e3e7435 (diff) |
Added test case for #595
-rw-r--r-- | .gitattributes | 2 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | tests/FunctionalTests/tickets/protected/pages/Ticket595.page | 18 | ||||
-rw-r--r-- | tests/FunctionalTests/tickets/tests/Ticket595TestCase.php | 39 |
4 files changed, 61 insertions, 3 deletions
diff --git a/.gitattributes b/.gitattributes index 583764d6..b2e9f416 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2985,6 +2985,7 @@ tests/FunctionalTests/tickets/protected/pages/Ticket591.php -text tests/FunctionalTests/tickets/protected/pages/Ticket592.page -text tests/FunctionalTests/tickets/protected/pages/Ticket592.php -text tests/FunctionalTests/tickets/protected/pages/Ticket593.page -text +tests/FunctionalTests/tickets/protected/pages/Ticket595.page -text tests/FunctionalTests/tickets/protected/pages/Ticket598.page -text tests/FunctionalTests/tickets/protected/pages/Ticket598.php -text tests/FunctionalTests/tickets/protected/pages/Ticket603.page -text @@ -3071,6 +3072,7 @@ tests/FunctionalTests/tickets/tests/Ticket585TestCase.php -text tests/FunctionalTests/tickets/tests/Ticket586TestCase.php -text tests/FunctionalTests/tickets/tests/Ticket587TestCase.php -text tests/FunctionalTests/tickets/tests/Ticket592TestCase.php -text +tests/FunctionalTests/tickets/tests/Ticket595TestCase.php -text tests/FunctionalTests/tickets/tests/Ticket653TestCase.php -text tests/FunctionalTests/tickets/tests/Ticket659TestCase.php -text tests/FunctionalTests/tickets/tests/Ticket700TestCase.php -text @@ -15,9 +15,8 @@ demos/quickstart/assets/ee054f3e demos/quickstart/index_pl.php demos/quickstart/protected/runtime/application.xml tests/FunctionalTests/results.dat -tests/FunctionalTests/tickets/assets/93f32b8c -tests/FunctionalTests/tickets/assets/961aa02b -tests/FunctionalTests/tickets/protected/runtime/global.cache +tests/FunctionalTests/tickets/assets/* +tests/FunctionalTests/tickets/protected/runtime/* tests/FunctionalTests/validators/assets/905759a2 tests/FunctionalTests/validators/assets/93f32b8c tests/FunctionalTests/validators/protected/runtime/global.cache diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket595.page b/tests/FunctionalTests/tickets/protected/pages/Ticket595.page new file mode 100644 index 00000000..11a926fa --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket595.page @@ -0,0 +1,18 @@ +<com:TContent ID="Content"> + +<com:TTextBox ID="A" /> +<com:TRequiredFieldValidator ControlToValidate="A" Text="Required!" ControlCssClass="errorclassA" ValidationGroup="A"/> +<com:TEmailAddressValidator ControlToValidate="A" Text="No Email!" ControlCssClass="errorclassA" ValidationGroup="A"/> +<com:TButton Text="Click" ValidationGroup="A" /> + +<br /> + +<com:TTextBox ID="B" /> +<com:TRequiredFieldValidator ControlToValidate="B" Text="Required!" ControlCssClass="errorclassB" + ValidationGroup="B" EnableClientScript="False" /> +<com:TEmailAddressValidator ControlToValidate="B" Text="No Email!" ControlCssClass="errorclassB" + ValidationGroup="B" EnableClientScript="False" /> +<com:TButton Text="Click" ValidationGroup="B" /> + +</com:TContent> + diff --git a/tests/FunctionalTests/tickets/tests/Ticket595TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket595TestCase.php new file mode 100644 index 00000000..df462c8d --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket595TestCase.php @@ -0,0 +1,39 @@ +<?php + +class Ticket595TestCase extends SeleniumTestCase +{ + function test() + { + $base="ctl0_Content_"; + $this->open('tickets/index.php?page=Ticket595'); + $this->assertTitle("Verifying Ticket 595"); + + $this->click($base.'ctl2'); + $this->assertAttribute($base.'A@class','errorclassA'); + + $this->type($base.'A', 'Prado'); + $this->click($base.'ctl2'); + $this->assertAttribute($base.'A@class','errorclassA'); + + $this->type($base.'A', 'test@example.com'); + $this->click($base.'ctl2'); + $this->pause(800); + $this->assertAttribute($base.'A@class',''); + + + $this->click($base.'ctl5'); + $this->pause(800); + $this->assertAttribute($base.'B@class','errorclassB'); + + $this->type($base.'B', 'Prado'); + $this->click($base.'ctl5'); + $this->pause(800); + $this->assertAttribute($base.'B@class','errorclassB'); + + $this->type($base.'B', 'test@example.com'); + $this->click($base.'ctl5'); + $this->pause(800); + $this->assertAttribute($base.'B@class',''); + } +} +?> |