summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets
diff options
context:
space:
mode:
authormikl <>2008-04-07 21:56:09 +0000
committermikl <>2008-04-07 21:56:09 +0000
commitb43c8b4c9f3973eb5482298ed8283e33c1f426e1 (patch)
treed3864e2852da9a55e14c77b34ee14dbc351b3807 /tests/FunctionalTests/tickets
parent87276530099acba2912aa4a5cd2048e02e3e7435 (diff)
Added test case for #595
Diffstat (limited to 'tests/FunctionalTests/tickets')
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket595.page18
-rw-r--r--tests/FunctionalTests/tickets/tests/Ticket595TestCase.php39
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','');
+ }
+}
+?>