summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets
diff options
context:
space:
mode:
authorwei <>2007-04-02 07:11:06 +0000
committerwei <>2007-04-02 07:11:06 +0000
commit36ef6f1b680ff1ea525a293c3464f0dedad11c1f (patch)
tree1ee8ed8eb15c0c488c1c17bc6dfbf1380a1ca02b /tests/FunctionalTests/tickets
parentdf5a516f7e2098f9769ddbacd6b4d8c4c1d48aab (diff)
Add testcase #290
Diffstat (limited to 'tests/FunctionalTests/tickets')
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket290.page21
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket290.php16
-rw-r--r--tests/FunctionalTests/tickets/tests/Ticket290TestCase.php26
3 files changed, 63 insertions, 0 deletions
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket290.page b/tests/FunctionalTests/tickets/protected/pages/Ticket290.page
new file mode 100644
index 00000000..a785d5db
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket290.page
@@ -0,0 +1,21 @@
+<com:TContent ID="Content">
+ <com:TPanel ID="panel1" DefaultButton="button2"
+ Style="border:1px solid #ccc; padding:2em">
+ <com:TTextBox ID="textbox1" />
+
+ <com:TCustomValidator
+ ControlToValidate="textbox1"
+ OnServerValidate="customValidate"
+ ValidationGroup="group1"
+ ErrorMessage="required" />
+
+ <com:TButton ID="button1" Text="Button 1"
+ ValidationGroup="group1" OnClick="button_clicked" />
+ <com:TButton ID="button2" Text="Button 2 (default)"
+ ValidationGroup="group1" OnClick="button_clicked" />
+
+ <com:TLabel ID="label1" Text="Label 1" />
+ <com:TLabel ID="label2" Text="Label 2" />
+
+ </com:TPanel>
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket290.php b/tests/FunctionalTests/tickets/protected/pages/Ticket290.php
new file mode 100644
index 00000000..c5e9e357
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket290.php
@@ -0,0 +1,16 @@
+<?php
+
+class Ticket290 extends TPage
+{
+ function customValidate($sender, $param)
+ {
+ $this->label1->Text = "Doing Validation";
+ }
+
+ function button_clicked($sender, $param)
+ {
+ $this->label2->Text = $sender->Text . " Clicked!";
+ }
+}
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/tests/Ticket290TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket290TestCase.php
new file mode 100644
index 00000000..e32e58bf
--- /dev/null
+++ b/tests/FunctionalTests/tickets/tests/Ticket290TestCase.php
@@ -0,0 +1,26 @@
+<?php
+
+/**
+*
+*/
+class Ticket290TestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $base = 'ctl0_Content_';
+ $this->open('tickets/index.php?page=Ticket290');
+ $this->assertTitle("Verifying Ticket 290");
+
+ $this->assertText("{$base}label1", "Label 1");
+ $this->assertText("{$base}label2", "Label 2");
+
+ $this->type("{$base}textbox1", "test");
+ $this->keyDownAndWait("{$base}textbox1", "\\13");
+
+ $this->assertText("{$base}label1", "Doing Validation");
+ $this->assertText("{$base}label2", "Button 2 (default) Clicked!");
+ }
+}
+
+
+?> \ No newline at end of file