summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php
blob: fceb2e21dbc9fcfa89a4bf172390387d5c5e8692 (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
49
50
51
52
53
<?php

class ActiveRadioButtonTestCase extends PradoGenericSeleniumTest
{
	function test()
	{
		$this->open("active-controls/index.php?page=ActiveRadioButtonTest");
		$this->verifyTextPresent("Active Radio Button Test");
		$this->assertText('label1', 'Label 1');

		$this->assertNotChecked('radio1');
		$this->assertNotChecked('radio2');
		$this->assertNotChecked('radio3');

		$this->assertText('radio1_label', 'Radio Button 1');
		$this->assertText('radio2_label', 'Radio Button 2');
		$this->assertText('radio3_label', 'Radio Button 3');

		$this->click('change_text1');
		$this->pause(800);
		$this->assertText('radio1_label', 'Hello Radio Button 1');
		$this->assertText('radio2_label', 'Radio Button 2');
		$this->assertText('radio3_label', 'Radio Button 3');

		$this->click('change_text2');
		$this->pause(800);
		$this->assertText('radio1_label', 'Hello Radio Button 1');
		$this->assertText('radio2_label', 'Radio Button 2 World');
		$this->assertText('radio3_label', 'Radio Button 3');

		$this->click('change_radio1');
		$this->pause(800);
		$this->assertChecked('radio1');
		$this->assertNotChecked('radio2');
		$this->assertNotChecked('radio3');

		$this->click('change_radio2');
		$this->pause(800);
		$this->assertNotChecked('radio1');
		$this->assertChecked('radio2');
		$this->assertNotChecked('radio3');


		$this->click('radio3');
		$this->pause(800);
		$this->assertNotChecked('radio1');
		$this->assertChecked('radio2');
		$this->assertChecked('radio3');
		$this->assertText('label1', 'Label 1:Radio Button 3 Checked');


	}
}