summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/validators/tests/ValidationSummaryTestCase.php
blob: 9b999b01facb9b97407ce54b257ca82a2f853459 (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php

//New Test
class ValidationSummaryTestCase extends PradoGenericSelenium2Test
{
	function test()
	{
		$base = "ctl0_Content_";

		$this->url("validators/index.php?page=ValidationSummary");
		$this->assertSourceContains("Validation Summary Test");
		//$this->assertText("{$base}summary1", "");
		//$this->assertText("{$base}summary2", "");

		$this->byXPath("//input[@type='submit' and @value='Create New Account']")->click();
		$this->assertVisible("{$base}summary1");
		$this->assertNotVisible("{$base}summary2");

		$this->byXPath("//input[@type='submit' and @value='Sign In']")->click();
		$this->assertNotVisible("{$base}summary1");
		$this->assertVisible("{$base}summary2");

		$this->type("{$base}Username", "qwe");
		$this->type("{$base}Password", "ewwq");
		$this->byXPath("//input[@type='submit' and @value='Sign In']")->click();
		$this->assertNotVisible("{$base}summary1");
		$this->assertVisible("{$base}summary2");

		/*$this->byXPath("//input[@type='submit' and @value='Create New Account']")->click();
		$this->type("{$base}UserID", "123");
		$this->type("{$base}Pass", "123");
		$this->byXPath("//input[@type='submit' and @value='Sign In']")->click();
		//$this->assertText("{$base}summary1", "");
		//$this->assertText("{$base}summary2", "");
		$this->byXPath("//input[@type='submit' and @value='Create New Account']")->click();
		//$this->assertText("{$base}summary1", "");
		//$this->assertText("{$base}summary2", "");

		$this->type("{$base}Password", "");
		$this->byXPath("//input[@type='submit' and @value='Create New Account']")->click();
		$this->assertVisible("{$base}summary1");
		$this->assertNotVisible("{$base}summary2");

		$this->type("{$base}Password", "12312");
		$this->assertVisible("{$base}summary1");
		*/
	}
}