summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/validators/tests/RegExpValidatorTestCase.php
blob: f269bf3bbeb9bc6c16cd16889c5d632885d632b5 (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
32
<?php

//New Test
class RegExpValidatorTestCase extends PradoGenericSeleniumTest
{
	function test()
	{
		$base = "ctl0_Content_";
		$this->open("validators/index.php?page=RegularExpressionValidator", "");
		$this->verifyTextPresent("Prado RegularExpressionValidator Tests", "");
		$this->assertNotVisible("{$base}validator1", "");
		$this->assertNotVisible("{$base}validator2", "");
		$this->type("{$base}text1", "1");
		$this->type("{$base}text2", "2");
		$this->click("//input[@type='submit' and @value='Test']", "");
		$this->assertVisible("{$base}validator1", "");
		$this->assertVisible("{$base}validator2", "");
		$this->type("{$base}text1", "asdasd");
		$this->click("//input[@type='submit' and @value='Test']", "");
		$this->assertVisible("{$base}validator1", "");
		$this->type("{$base}text1", "12345");
		$this->assertNotVisible("{$base}validator1", "");
		$this->assertVisible("{$base}validator2", "");
		$this->type("{$base}text2", "wei@gmail.com");
		$this->assertNotVisible("{$base}validator1", "");
		$this->assertNotVisible("{$base}validator2", "");
		$this->clickAndWait("//input[@type='submit' and @value='Test']", "");
		$this->assertNotVisible("{$base}validator1", "");
		$this->assertNotVisible("{$base}validator2", "");

	}
}