summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwei <>2007-04-02 07:11:06 +0000
committerwei <>2007-04-02 07:11:06 +0000
commit36ef6f1b680ff1ea525a293c3464f0dedad11c1f (patch)
tree1ee8ed8eb15c0c488c1c17bc6dfbf1380a1ca02b
parentdf5a516f7e2098f9769ddbacd6b4d8c4c1d48aab (diff)
Add testcase #290
-rw-r--r--.gitattributes3
-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
4 files changed, 66 insertions, 0 deletions
diff --git a/.gitattributes b/.gitattributes
index 6e799161..985fa1c3 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -2377,6 +2377,8 @@ tests/FunctionalTests/tickets/protected/pages/Ticket284.php -text
tests/FunctionalTests/tickets/protected/pages/Ticket284Component.php -text
tests/FunctionalTests/tickets/protected/pages/Ticket284Component.tpl -text
tests/FunctionalTests/tickets/protected/pages/Ticket285.page -text
+tests/FunctionalTests/tickets/protected/pages/Ticket290.page -text
+tests/FunctionalTests/tickets/protected/pages/Ticket290.php -text
tests/FunctionalTests/tickets/protected/pages/Ticket306.page -text
tests/FunctionalTests/tickets/protected/pages/Ticket311.page -text
tests/FunctionalTests/tickets/protected/pages/Ticket312.page -text
@@ -2453,6 +2455,7 @@ tests/FunctionalTests/tickets/tests/Ticket27TestCase.php -text
tests/FunctionalTests/tickets/tests/Ticket284TestCase.php -text
tests/FunctionalTests/tickets/tests/Ticket285TestCase.php -text
tests/FunctionalTests/tickets/tests/Ticket28TestCase.php -text
+tests/FunctionalTests/tickets/tests/Ticket290TestCase.php -text
tests/FunctionalTests/tickets/tests/Ticket433TestCase.php -text
tests/FunctionalTests/tickets/tests/Ticket439TestCase.php -text
tests/FunctionalTests/tickets/tests/Ticket463TestCase.php -text
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