summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets
diff options
context:
space:
mode:
authorwei <>2006-08-05 00:38:30 +0000
committerwei <>2006-08-05 00:38:30 +0000
commit93c4193f4a3c315c7785bf5f9f522c955ef6fce7 (patch)
tree6166ca58b6a947a0e6fa3cbc9cd728650fc57221 /tests/FunctionalTests/tickets
parenta9bdf9fde29c5bf71d3a402fc15806ca8923aea8 (diff)
Fixed #274
Diffstat (limited to 'tests/FunctionalTests/tickets')
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket274.page22
-rw-r--r--tests/FunctionalTests/tickets/tests/Ticket274TestCase.php24
2 files changed, 46 insertions, 0 deletions
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket274.page b/tests/FunctionalTests/tickets/protected/pages/Ticket274.page
new file mode 100644
index 00000000..4e1441ed
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket274.page
@@ -0,0 +1,22 @@
+<com:TContent ID="Content">
+
+<com:TDatePicker ID="MyDate"
+ DateFormat="dd/MM/yyyy"
+ Mode="ImageButton" />
+ <com:TRequiredFieldValidator
+ ID="validator1"
+ ControlToValidate="MyDate"
+ EnableClientScript="false"
+ ErrorMessage="date required (dd/MM/yyyy)" />
+
+ <com:TDataTypeValidator
+ ID="validator2"
+ DataType="Date"
+ DateFormat="dd/MM/yyyy"
+ ControlToValidate="MyDate"
+ EnableClientScript="false"
+ ErrorMessage="date must be of the form dd/MM/yyyy" />
+
+ <com:TButton ID="button1" Text="Submit!" />
+
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/tests/Ticket274TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket274TestCase.php
new file mode 100644
index 00000000..ae976a7f
--- /dev/null
+++ b/tests/FunctionalTests/tickets/tests/Ticket274TestCase.php
@@ -0,0 +1,24 @@
+<?php
+
+class Ticket274TestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $base = 'ctl0_Content_';
+ $this->open('tickets/index.php?page=Ticket274');
+ $this->assertTitle('Verifying Ticket 274');
+ $this->assertNotVisible($base.'validator1');
+ $this->assertNotVisible($base.'validator2');
+
+ $this->click($base.'button1');
+ $this->assertVisible($base.'validator1');
+ $this->assertNotVisible($base.'validator2');
+
+ $this->type($base.'MyDate', 'asd');
+ $this->click($base.'button1');
+ $this->assertVisible($base.'validator1');
+ $this->assertNotVisible($base.'validator2');
+ }
+}
+
+?> \ No newline at end of file