From 407aa2ff5d56859fcd1f47b85b4c4180d035c428 Mon Sep 17 00:00:00 2001 From: wei <> Date: Sat, 21 Jan 2006 02:07:59 +0000 Subject: Fixed DefaultButton and TLinkButton --- .../pages/UI/TestTPanelDefaultButton.page | 4 +++- .../protected/pages/UI/TestTPanelDefaultButton.php | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) (limited to 'tests/FunctionalTests/protected/pages') diff --git a/tests/FunctionalTests/protected/pages/UI/TestTPanelDefaultButton.page b/tests/FunctionalTests/protected/pages/UI/TestTPanelDefaultButton.page index 7585bdbc..753550d8 100644 --- a/tests/FunctionalTests/protected/pages/UI/TestTPanelDefaultButton.page +++ b/tests/FunctionalTests/protected/pages/UI/TestTPanelDefaultButton.page @@ -3,13 +3,15 @@ This is panel content with a and two buttons:
- + +
When you change focus to the panel and hit 'enter' key, button2 will be clicked because it is set as the default button of the panel.
+ \ No newline at end of file diff --git a/tests/FunctionalTests/protected/pages/UI/TestTPanelDefaultButton.php b/tests/FunctionalTests/protected/pages/UI/TestTPanelDefaultButton.php index bc88dc00..2b0ba466 100644 --- a/tests/FunctionalTests/protected/pages/UI/TestTPanelDefaultButton.php +++ b/tests/FunctionalTests/protected/pages/UI/TestTPanelDefaultButton.php @@ -8,4 +8,26 @@ class TestTPanelDefaultButton extends TPage } } +/** + * + * + * @author Wei Zhuo + * @version $Revision: $ $Date: $ + * @package System.Web.UI.WebControls + * @since 3.0 + */ +class DefaultButtonTest extends SeleniumTestCase +{ + function setup() + { + $page = Prado::getApplication()->getTestPage(__FILE__); + $this->open($page); + } + + function testClick() + { + $this->clickAndWait("ctl0_Content_Button2"); + $this->assertTextPresent("You have clicked on 'button2'."); + } +} ?> \ No newline at end of file -- cgit v1.2.3