summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorxue <>2006-04-13 12:38:46 +0000
committerxue <>2006-04-13 12:38:46 +0000
commit9e21d160ead61cd0ed86c16a0668c50b14f58baf (patch)
treeae52b73597d49737477f4cc2025310b3b9d831ee /tests
parent8758ffa08275ec1a38f161e0eb80f8ae6ca403f8 (diff)
Added test case for Ticket#121.
Diffstat (limited to 'tests')
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket121.page16
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket121.php11
-rw-r--r--tests/FunctionalTests/tickets/tests/Ticket121TestCase.php19
3 files changed, 46 insertions, 0 deletions
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket121.page b/tests/FunctionalTests/tickets/protected/pages/Ticket121.page
new file mode 100644
index 00000000..9c9633d3
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket121.page
@@ -0,0 +1,16 @@
+<com:TContent ID="Content">
+
+<com:TImageButton
+ ImageUrl="http://www.pradosoft.com/images/powered.gif"
+ Text="Foo"
+ ValidationGroup="Foo"
+ OnClick="buttonClicked" />
+<com:TTextBox ID="FooTextBox" Text="sometext" />
+<com:TRequiredFieldValidator
+ ValidationGroup="Foo"
+ ControlToValidate="FooTextBox"
+ Text="Field required." />
+
+<com:TLabel ID="Result" />
+
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket121.php b/tests/FunctionalTests/tickets/protected/pages/Ticket121.php
new file mode 100644
index 00000000..1a625d83
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket121.php
@@ -0,0 +1,11 @@
+<?php
+
+class Ticket121 extends TPage
+{
+ public function buttonClicked($sender,$param)
+ {
+ $this->Result->Text="clicked at ({$param->X},{$param->Y})";
+ }
+}
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/tests/Ticket121TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket121TestCase.php
new file mode 100644
index 00000000..7453aeef
--- /dev/null
+++ b/tests/FunctionalTests/tickets/tests/Ticket121TestCase.php
@@ -0,0 +1,19 @@
+<?php
+
+class Ticket121TestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $this->open('tickets/index.php?page=Ticket121');
+ $this->type("ctl0\$Content\$FooTextBox", "");
+ $this->verifyNotVisible('ctl0_Content_ctl1');
+ $this->click("//input[@type='image' and @id='ctl0_Content_ctl0']", "");
+ $this->verifyVisible('ctl0_Content_ctl1');
+ $this->type("ctl0\$Content\$FooTextBox", "content");
+ $this->clickAndWait("//input[@type='image' and @id='ctl0_Content_ctl0']", "");
+ $this->verifyNotVisible('ctl0_Content_ctl1');
+ $this->verifyTextPresent("clicked at", "");
+ }
+}
+
+?> \ No newline at end of file