summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/protected/pages
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FunctionalTests/protected/pages')
-rw-r--r--tests/FunctionalTests/protected/pages/Validation/RequiredFieldValidator.page7
-rw-r--r--tests/FunctionalTests/protected/pages/Validation/RequiredFieldValidator.php27
2 files changed, 34 insertions, 0 deletions
diff --git a/tests/FunctionalTests/protected/pages/Validation/RequiredFieldValidator.page b/tests/FunctionalTests/protected/pages/Validation/RequiredFieldValidator.page
new file mode 100644
index 00000000..4c9a8cd3
--- /dev/null
+++ b/tests/FunctionalTests/protected/pages/Validation/RequiredFieldValidator.page
@@ -0,0 +1,7 @@
+<com:TForm>
+<h1>Basic TRequiredFieldValidator Test1</h1>
+ <com:TTextBox ID="text1" />
+ <com:TRequiredFieldValidator ID="validator1" ControlToValidate="text1" ErrorMessage="*" />
+ <com:TButton ID="button1" Text="Click" />
+ <com:TJavascriptLogger />
+</com:TForm> \ No newline at end of file
diff --git a/tests/FunctionalTests/protected/pages/Validation/RequiredFieldValidator.php b/tests/FunctionalTests/protected/pages/Validation/RequiredFieldValidator.php
new file mode 100644
index 00000000..3456dd40
--- /dev/null
+++ b/tests/FunctionalTests/protected/pages/Validation/RequiredFieldValidator.php
@@ -0,0 +1,27 @@
+<?php
+
+class RequiredFieldValidator extends TPage
+{
+
+}
+
+class RequiredFieldTestCase extends SeleniumTestCase
+{
+ function setup()
+ {
+ $this->open(Prado::getApplication()->getTestPage(__FILE__));
+ }
+
+ function testValidator()
+ {
+ $this->assertTextPresent("Basic TRequiredFieldValidator Test1");
+ $this->assertNotVisible("validator1");
+ $this->click("button1");
+ $this->assertVisible("validator1");
+ $this->type("text1", "test");
+ $this->clickAndWait("button1");
+ $this->assertNotVisible("validator1");
+ }
+}
+
+?> \ No newline at end of file