summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/protected/pages/UI/testOnClickAttribute.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FunctionalTests/protected/pages/UI/testOnClickAttribute.php')
-rw-r--r--tests/FunctionalTests/protected/pages/UI/testOnClickAttribute.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/FunctionalTests/protected/pages/UI/testOnClickAttribute.php b/tests/FunctionalTests/protected/pages/UI/testOnClickAttribute.php
new file mode 100644
index 00000000..3d9fc840
--- /dev/null
+++ b/tests/FunctionalTests/protected/pages/UI/testOnClickAttribute.php
@@ -0,0 +1,36 @@
+<?php
+
+/**
+ * testOnClickAttribute
+ *
+ * @author Wei Zhuo <weizhuo[at]gmail[dot]com>
+ * @version $Revision: $ $Date: $
+ * @package System.Web.UI.WebControls
+ * @since 3.0
+ */
+class testOnClickAttribute extends TPage
+{
+ function doClick()
+ {
+ $this->clickState->setText("Post Back clicked!");
+ }
+}
+
+class OnClickAttributeTestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $page = Prado::getApplication()->getTestPage(__FILE__);
+ $this->open($page);
+ $this->assertTitle("Test Attributes.OnClick");
+ $this->click("link=Click me");
+ $this->assertConfirmation("Are you sure?");
+ $this->chooseCancelOnNextConfirmation();
+ $this->assertTextNotPresent("Post Back clicked!");
+ $this->clickAndWait("link=Click me");
+ $this->assertConfirmation("Are you sure?");
+ $this->assertTextPresent("Post Back clicked!");
+ }
+}
+
+?> \ No newline at end of file