diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/FunctionalTests/tickets/protected/pages/Ticket595.page | 18 | ||||
-rw-r--r-- | tests/FunctionalTests/tickets/tests/Ticket595TestCase.php | 39 |
2 files changed, 57 insertions, 0 deletions
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',''); + } +} +?> |