summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/features
diff options
context:
space:
mode:
authorxue <>2006-04-28 11:10:06 +0000
committerxue <>2006-04-28 11:10:06 +0000
commit2cc93773feb5e76d2dd002b1dcd463a01d606794 (patch)
treec3615e1183fa6db678dbdf08b07c25543a2cde09 /tests/FunctionalTests/features
parent1f63d5c05ba117e0158c02d5bc79fa1f38f8ce85 (diff)
Merge from 3.0 branch till 985.
Diffstat (limited to 'tests/FunctionalTests/features')
-rw-r--r--tests/FunctionalTests/features/protected/application.xml3
-rw-r--r--tests/FunctionalTests/features/protected/controls/LabeledTextBox.tpl2
-rw-r--r--tests/FunctionalTests/features/protected/controls/LabeledTextbox.php25
-rw-r--r--tests/FunctionalTests/features/protected/pages/CompositeControl.page12
-rw-r--r--tests/FunctionalTests/features/protected/pages/HtmlArea.page29
-rw-r--r--tests/FunctionalTests/features/protected/pages/ValidatorEffects.page12
-rw-r--r--tests/FunctionalTests/features/tests/CompositeControlTestCase.php23
7 files changed, 96 insertions, 10 deletions
diff --git a/tests/FunctionalTests/features/protected/application.xml b/tests/FunctionalTests/features/protected/application.xml
index 642152cc..9153f3f7 100644
--- a/tests/FunctionalTests/features/protected/application.xml
+++ b/tests/FunctionalTests/features/protected/application.xml
@@ -1,6 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<application id="FeatureTests" Mode="Debug">
+ <paths>
+ <using namespace="Application.controls.*" />
+ </paths>
<services>
<service id="page" class="TPageService" DefaultPage="FeatureList">
<pages MasterClass="Application.controls.Layout" />
diff --git a/tests/FunctionalTests/features/protected/controls/LabeledTextBox.tpl b/tests/FunctionalTests/features/protected/controls/LabeledTextBox.tpl
new file mode 100644
index 00000000..276d03b2
--- /dev/null
+++ b/tests/FunctionalTests/features/protected/controls/LabeledTextBox.tpl
@@ -0,0 +1,2 @@
+<com:TLabel ID="label" ForControl="textbox" Text="label:" />
+<com:TTextBox ID="textbox" /> \ No newline at end of file
diff --git a/tests/FunctionalTests/features/protected/controls/LabeledTextbox.php b/tests/FunctionalTests/features/protected/controls/LabeledTextbox.php
new file mode 100644
index 00000000..9a50d095
--- /dev/null
+++ b/tests/FunctionalTests/features/protected/controls/LabeledTextbox.php
@@ -0,0 +1,25 @@
+<?php
+/*
+ * Created on 28/04/2006
+ */
+
+class LabeledTextBox extends TTemplateControl
+{
+ public function __construct()
+ {
+ parent::__construct();
+ $this->ensureChildControls();
+ }
+
+ public function getTextBox()
+ {
+ return $this->getRegisteredObject('textbox');
+ }
+
+ public function getLabel()
+ {
+ return $this->getRegisteredObject('label');
+ }
+}
+
+?>
diff --git a/tests/FunctionalTests/features/protected/pages/CompositeControl.page b/tests/FunctionalTests/features/protected/pages/CompositeControl.page
new file mode 100644
index 00000000..b135445a
--- /dev/null
+++ b/tests/FunctionalTests/features/protected/pages/CompositeControl.page
@@ -0,0 +1,12 @@
+<com:TContent ID="Content">
+<h1>Composite Control Test</h1>
+ <com:LabeledTextBox id="user" Label.Text="username:" /><br />
+ <com:LabeledTextBox id="pass" Label.Text="password:" /><br />
+ <com:TButton Text="Submit" />
+
+<com:TPanel Visible=<%= $this->user->TextBox->Text != "" %> >
+<h2>Result</h2>
+ User: <%= $this->user->TextBox->Text %> Pass: <%= $this->pass->TextBox->Text %>
+</com:TPanel>
+
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/features/protected/pages/HtmlArea.page b/tests/FunctionalTests/features/protected/pages/HtmlArea.page
index 8b56f48d..3936e68c 100644
--- a/tests/FunctionalTests/features/protected/pages/HtmlArea.page
+++ b/tests/FunctionalTests/features/protected/pages/HtmlArea.page
@@ -1,10 +1,25 @@
-<%@ Application.Globalization.Charset="GB2312" %>
+
<com:TContent ID="Content">
- <com:THtmlArea>
- <prop:Options>
- plugins : "contextmenu,paste",
- language: "zh_CN"
- </prop:Options>
- </com:THtmlArea>
+ <com:THtmlArea ID="text1" />
+
+ <com:TRequiredFieldValidator
+ ControlToValidate="text1"
+ ErrorMessage="*" />
+
+ <com:TButton ID="button1" Text="submit 1" />
+
+ <com:TButton ID="button2" Text="submit 2" />
+
+ <com:THtmlArea ID="text2" />
+
+ <com:TRequiredFieldValidator
+ ControlToValidate="text2"
+ ValidationGroup="group2"
+ ErrorMessage="*" />
+
+ <com:TButton ID="button3" ValidationGroup="group2" Text="submit 3" />
+
+ <com:TButton ID="button4" ValidationGroup="group2" Text="submit 4" />
+
</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/features/protected/pages/ValidatorEffects.page b/tests/FunctionalTests/features/protected/pages/ValidatorEffects.page
index 47d99969..da03f9b8 100644
--- a/tests/FunctionalTests/features/protected/pages/ValidatorEffects.page
+++ b/tests/FunctionalTests/features/protected/pages/ValidatorEffects.page
@@ -4,7 +4,7 @@
<fieldset id="quickRegistration">
<legend>Create New Account</legend>
-<com:TClientScript UsingPradoScripts="effects" />
+<com:TClientScript UsingPradoScripts="effects,logger" />
<div class="username">
Username:
@@ -81,8 +81,14 @@
<com:TValidationSummary
ID="summary2"
ValidationGroup="signin"
- AutoUpdate="false"
- HeaderText="<p>You could not login because</p>" />
+ Display="Dynamic"
+ ClientValidation.OnHideSummary="Effect.Squish(summary.messages)"
+ HeaderText="<p>You could not login because</p>">
+ <prop:ClientValidation.OnShowSummary>
+ Effect.Appear(summary.messages)
+ Effect.Shake(summary.messages,{ queue: 'end'})
+ </prop:ClientValidation.OnShowSummary>
+ </com:TValidationSummary>
</div>
</fieldset>
diff --git a/tests/FunctionalTests/features/tests/CompositeControlTestCase.php b/tests/FunctionalTests/features/tests/CompositeControlTestCase.php
new file mode 100644
index 00000000..dda3f63b
--- /dev/null
+++ b/tests/FunctionalTests/features/tests/CompositeControlTestCase.php
@@ -0,0 +1,23 @@
+<?php
+/*
+ * Created on 28/04/2006
+ */
+
+class CompositeControlTestCase extends SeleniumTestCase
+{
+
+ function test()
+ {
+ $base = "ctl0_Content_";
+ $this->open("features/index.php?page=CompositeControl", "");
+ $this->verifyTextPresent("Composite Control Test", "");
+ $this->type("{$base}user_textbox", "Hello");
+ $this->type("{$base}pass_textbox", "world");
+ $this->clickAndWait("//input[@type='submit' and @value='Submit']", "");
+ $this->verifyTextPresent("Result", "");
+ $this->verifyTextPresent("User: Hello Pass: world", "");
+ }
+
+}
+
+?>