summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxTestCase.php
blob: 6f23527342ff91963db23614a151d5b060ae1b43 (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
54
55
56
57
58
59
<?php

class ActiveCheckBoxTestCase extends PradoGenericSeleniumTest
{
	function test()
	{
		$this->open("active-controls/index.php?page=ActiveCheckBoxTest");
		$this->verifyTextPresent("Active CheckBox Test");

		$this->assertText("checkbox1_label", "CheckBox 1");
		$this->assertText("checkbox2_label", "CheckBox 2");
		$this->assertText('label1', 'Label 1');

		$this->click("change_text1");
		$this->pause(800);
		$this->assertText('checkbox1_label', 'Hello CheckBox 1');

		$this->click("change_text2");
		$this->pause(800);
		$this->assertText('checkbox2_label', 'CheckBox 2 World');

		//check box 1
		$this->click('change_checked1');
		$this->pause(800);
		$this->assertChecked('checkbox1');

		$this->click('change_checked1');
		$this->pause(800);
		$this->assertNotChecked('checkbox1');

		//check box 2
		$this->click('change_checked2');
		$this->pause(800);
		$this->assertChecked('checkbox2');

		$this->click('change_checked2');
		$this->pause(800);
		$this->assertNotChecked('checkbox2');

		//click checkbox 1
		$this->click("checkbox1");
		$this->pause(800);
		$this->assertText("label1", "Label 1:Hello CheckBox 1 Checked");

		$this->click("checkbox1");
		$this->pause(800);
		$this->assertText("label1", "Label 1:Hello CheckBox 1 Not Checked");

		//click checkbox 2
		$this->click("checkbox2");
		$this->pause(800);
		$this->assertText("label1", "Label 1:CheckBox 2 World Checked");

		$this->click("checkbox2");
		$this->pause(800);
		$this->assertText("label1", "Label 1:CheckBox 2 World Not Checked");

	}
}