summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/protected/pages/UI
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FunctionalTests/protected/pages/UI')
-rw-r--r--tests/FunctionalTests/protected/pages/UI/TestTPanelDefaultButton.page4
-rw-r--r--tests/FunctionalTests/protected/pages/UI/TestTPanelDefaultButton.php22
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