summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/protected/pages/Validation
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FunctionalTests/protected/pages/Validation')
-rw-r--r--tests/FunctionalTests/protected/pages/Validation/CheckBox.page4
-rw-r--r--tests/FunctionalTests/protected/pages/Validation/RequiredFieldValidator.page3
-rw-r--r--tests/FunctionalTests/protected/pages/Validation/testInitialValueRequired.page11
-rw-r--r--tests/FunctionalTests/protected/pages/Validation/testInitialValueRequired.php25
4 files changed, 36 insertions, 7 deletions
diff --git a/tests/FunctionalTests/protected/pages/Validation/CheckBox.page b/tests/FunctionalTests/protected/pages/Validation/CheckBox.page
index 109710fb..0653a0c2 100644
--- a/tests/FunctionalTests/protected/pages/Validation/CheckBox.page
+++ b/tests/FunctionalTests/protected/pages/Validation/CheckBox.page
@@ -1,6 +1,5 @@
<%@ Title="An AutoPostBack CheckBox" %>
<com:TContent ID="Content">
-<com:TForm>
<h1>An AutoPostBack CheckBox</h1>
@@ -33,7 +32,4 @@ Input: <com:TTextBox ID="TextBox"/>
ID="validator1"
/>
<br/>
-<com:TJavascriptLogger />
-
-</com:TForm>
</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/protected/pages/Validation/RequiredFieldValidator.page b/tests/FunctionalTests/protected/pages/Validation/RequiredFieldValidator.page
index e6b67c8d..5447b834 100644
--- a/tests/FunctionalTests/protected/pages/Validation/RequiredFieldValidator.page
+++ b/tests/FunctionalTests/protected/pages/Validation/RequiredFieldValidator.page
@@ -1,6 +1,5 @@
<%@ Title="Basic TRequiredFieldValidator" %>
<com:TContent ID="Content">
-<com:TForm>
<h1>Basic TRequiredFieldValidator Test1</h1>
<com:TTextBox ID="text1" />
<com:TRequiredFieldValidator
@@ -11,6 +10,4 @@
ErrorMessage="*" />
<com:TButton ID="button1" Text="Click" />
<com:TTextBox ID="text2" />
- <com:TJavascriptLogger />
-</com:TForm>
</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/protected/pages/Validation/testInitialValueRequired.page b/tests/FunctionalTests/protected/pages/Validation/testInitialValueRequired.page
new file mode 100644
index 00000000..62cf761c
--- /dev/null
+++ b/tests/FunctionalTests/protected/pages/Validation/testInitialValueRequired.page
@@ -0,0 +1,11 @@
+<%@ Title="InitialValue Validation Test" %>
+<com:TContent ID="Content">
+<h1>InitialValue Validation Test</h1>
+<com:TTextBox ID="text1" />
+<com:TRequiredFieldValidator ID="validator1"
+ ControlToValidate="text1"
+ InitialValue="test"
+ ErrorMessage="Text must not equal to 'test'" />
+
+<com:TButton ID="submit" Text="Submit!" />
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/protected/pages/Validation/testInitialValueRequired.php b/tests/FunctionalTests/protected/pages/Validation/testInitialValueRequired.php
new file mode 100644
index 00000000..cc35accc
--- /dev/null
+++ b/tests/FunctionalTests/protected/pages/Validation/testInitialValueRequired.php
@@ -0,0 +1,25 @@
+<?php
+
+class testInitialValueRequired extends TPage
+{
+
+}
+
+class InitialValueRequiredTestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $page = Prado::getApplication()->getTestPage(__FILE__);
+ $this->open($page);
+ $this->assertTitle("InitialValue Validation Test");
+ $this->assertNotVisible("ctl0_Content_validator1");
+ $this->type("ctl0_Content_text1", "hello");
+ $this->clickAndWait("ctl0_Content_submit");
+ $this->assertNotVisible("ctl0_Content_validator1");
+ $this->type("ctl0_Content_text1", "test");
+ $this->click("ctl0_Content_submit");
+ $this->assertVisible("ctl0_Content_validator1");
+ }
+}
+
+?> \ No newline at end of file