summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/protected/pages/Validation/RequiredFieldValidator.php
blob: 0399d4a30ef1b9db2a2fddb86419d98c6a95a1ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php

class RequiredFieldValidator extends TPage
{
	protected function onLoad($param)
	{
		if(!$this->IsPostBack)
			$this->dataBind();
	}
}

class RequiredFieldTestCase extends SeleniumTestCase
{
	function setup()
	{
	    $this->open(Prado::getApplication()->getTestPage(__FILE__));
	}

	function testValidator()
	{
		$this->assertTextPresent("Basic TRequiredFieldValidator Test1");
		$this->assertNotVisible("ctl0_Content_validator1");
		$this->click("ctl0_Content_button1");
		$this->assertVisible("ctl0_Content_validator1");
		$this->type("ctl0_Content_text1", "test");
		$this->clickAndWait("ctl0_Content_button1");
		$this->assertNotVisible("ctl0_Content_validator1");
	}
}

?>