diff options
| -rw-r--r-- | .gitattributes | 2 | ||||
| -rw-r--r-- | tests/FunctionalTests/protected/pages/Validation/CheckBox.page | 37 | ||||
| -rw-r--r-- | tests/FunctionalTests/protected/pages/Validation/CheckBox.php | 31 | 
3 files changed, 70 insertions, 0 deletions
diff --git a/.gitattributes b/.gitattributes index 70a4a86e..c683b531 100644 --- a/.gitattributes +++ b/.gitattributes @@ -633,6 +633,8 @@ tests/FunctionalTests/protected/pages/Layout.tpl -text  tests/FunctionalTests/protected/pages/UI/DatePicker.page -text  tests/FunctionalTests/protected/pages/UI/TestTPanelDefaultButton.page -text  tests/FunctionalTests/protected/pages/UI/TestTPanelDefaultButton.php -text +tests/FunctionalTests/protected/pages/Validation/CheckBox.page -text +tests/FunctionalTests/protected/pages/Validation/CheckBox.php -text  tests/FunctionalTests/protected/pages/Validation/RequiredFieldValidator.page -text  tests/FunctionalTests/protected/pages/Validation/RequiredFieldValidator.php -text  tests/FunctionalTests/protected/pages/ViewSource.page -text diff --git a/tests/FunctionalTests/protected/pages/Validation/CheckBox.page b/tests/FunctionalTests/protected/pages/Validation/CheckBox.page new file mode 100644 index 00000000..42241ca7 --- /dev/null +++ b/tests/FunctionalTests/protected/pages/Validation/CheckBox.page @@ -0,0 +1,37 @@ +<%@ Title="Basic TRequiredFieldValidator" %>
 +<com:TContent ID="Content">
 +<com:TForm>
 +
 +<h1>An AutoPostBack CheckBox</h1>
 +
 +<com:TCheckBox
 +	AutoPostBack="true"
 +	Text="Without ValidationGroup"
 +	/>
 +<br/>
 +<! Uncomment the following and see
 +<com:TCheckBox
 +	AutoPostBack="true"
 +	Text="With ValidationGroup"
 +	ValidationGroup="Group"
 +	/>
 +<br/>
 +<com:TCheckBox
 +	AutoPostBack="true"
 +	CausesValidation="false"
 +	Text="CausesValidation=false"
 +	/>
 +<br/>
 +!>
 +Input: <com:TTextBox ID="TextBox" />
 +<com:TRequiredFieldValidator
 +	ControlToValidate="TextBox"
 +	Display="Dynamic"
 +	ErrorMessage="input required in the textbox"
 +	ValidationGroup="Group"
 +	/>
 +<br/>
 +<com:TJavascriptLogger />
 +
 +</com:TForm>
 +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/protected/pages/Validation/CheckBox.php b/tests/FunctionalTests/protected/pages/Validation/CheckBox.php new file mode 100644 index 00000000..b85bf383 --- /dev/null +++ b/tests/FunctionalTests/protected/pages/Validation/CheckBox.php @@ -0,0 +1,31 @@ +<?php
 +
 +class CheckBox extends TPage
 +{
 +	protected function onLoad($param)
 +	{
 +		if(!$this->IsPostBack)
 +			$this->dataBind();
 +	}
 +}
 +
 +class CheckBoxTestCase 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  | 
