summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/validators/tests/RequiredListTestCase.php
blob: 0de6815e78fe9fce6f3cf8d29bace012eb285ca0 (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
<?php

class RequiredListTestCase extends PradoGenericSelenium2Test
{

	function test()
	{
		$base = "ctl0_Content_";
		$this->url("validators/index.php?page=RequiredListValidator");
		$this->byId("{$base}submit1")->click();
		$this->assertVisible("{$base}validator1");
		$this->assertVisible("{$base}validator2");
		$this->assertVisible("{$base}validator3");
		$this->byId("{$base}list1_c0")->click();
		$this->addSelection("{$base}list2", "One");
		$this->addSelection("{$base}list2", "Two");
		$this->byId("{$base}list3_c3")->click();
		$this->byId("{$base}submit1")->click();
		$this->assertNotVisible("{$base}validator1");
		$this->assertNotVisible("{$base}validator2");
		$this->assertNotVisible("{$base}validator3");
		$this->byId("{$base}list1_c1")->click();
		$this->byId("{$base}list1_c2")->click();
		$this->byId("{$base}list1_c3")->click();
		$this->addSelection("{$base}list2", "Two");
		$this->byId("{$base}list1_c3")->click();
		$this->byId("{$base}submit1")->click();
		$this->assertNotVisible("{$base}validator1");
		$this->assertNotVisible("{$base}validator2");
		$this->assertNotVisible("{$base}validator3");
		$this->byId("{$base}list3_c3")->click();
		$this->byId("{$base}submit1")->click();
		$this->pause(200);
		$this->assertNotVisible("{$base}validator1");
		$this->assertNotVisible("{$base}validator2");
		$this->assertNotVisible("{$base}validator3");
	}
}