From a2a030c3cfbb0249762fffa4159107bc13f8952d Mon Sep 17 00:00:00 2001 From: wei <> Date: Thu, 2 Feb 2006 05:04:50 +0000 Subject: Fixed #19 --- .../protected/pages/UI/testOnClickAttribute.php | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tests/FunctionalTests/protected/pages/UI/testOnClickAttribute.php (limited to 'tests/FunctionalTests/protected/pages/UI/testOnClickAttribute.php') 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 @@ + + * @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 -- cgit v1.2.3