diff options
author | wei <> | 2006-01-21 02:07:59 +0000 |
---|---|---|
committer | wei <> | 2006-01-21 02:07:59 +0000 |
commit | 407aa2ff5d56859fcd1f47b85b4c4180d035c428 (patch) | |
tree | 7c4442ad2652f3021a969391fd8a468ca9400100 /tests/FunctionalTests/protected | |
parent | f74267f8927d39b5cb3dc43203060488371127c9 (diff) |
Fixed DefaultButton and TLinkButton
Diffstat (limited to 'tests/FunctionalTests/protected')
-rw-r--r-- | tests/FunctionalTests/protected/pages/UI/TestTPanelDefaultButton.page | 4 | ||||
-rw-r--r-- | tests/FunctionalTests/protected/pages/UI/TestTPanelDefaultButton.php | 22 |
2 files changed, 25 insertions, 1 deletions
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 @@ <com:TPanel DefaultButton="Button2" Width="400px">
This is panel content with a <com:TLabel Text="label" Font.Italic="true" />
and two buttons: <br/>
- <com:TButton ID="Button1" Text="button1" Click="buttonClicked" />
+ <com:TCheckBox />
+ <com:TButton ID="Button1" Text="button1" Click="buttonClicked" />
<com:TButton ID="Button2" Text="button2" Click="buttonClicked" />
<com:TLabel ID="Result" ForeColor="red" />
<br/>
When you change focus to the panel and hit 'enter' key, <tt>button2</tt>
will be clicked because it is set as the default button of the panel.
</com:TPanel>
+ <com:TLinkButton Text="button 3" Click="buttonClicked" />
<com:TJavascriptLogger />
</com:TForm>
</com:TContent>
\ 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 <weizhuo[at]gmail[dot]com>
+ * @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 |