summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/protected/pages/Validation
diff options
context:
space:
mode:
authorwei <>2006-02-02 05:04:50 +0000
committerwei <>2006-02-02 05:04:50 +0000
commita2a030c3cfbb0249762fffa4159107bc13f8952d (patch)
treee8b2f97068cf92a314df360ccf8dfb1d37b92bd6 /tests/FunctionalTests/protected/pages/Validation
parent93f6933c39b2e1896ff781a8f839a3c73a7e56b1 (diff)
Fixed #19
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