summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.php
blob: 0d36480c10893bd1237e3bea8713d039937e26f5 (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
<?php

class DataGrid4TestCase extends SeleniumTestCase
{
	function test()
	{
		$this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample4&amp;notheme=true&amp;lang=en", "");

		// verify the 2nd row of data
		$this->verifyTextPresent("Design Patterns: Elements of Reusable Object-Oriented Software", "");
		$this->verifyTextPresent("Addison-Wesley Professional", "");
		$this->verifyTextPresent("$47.04", "");
		$this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl5@checked','regexp:true|checked');
		$this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl5@disabled','regexp:true|disabled');

		// verify sorting
		$this->clickAndWait("link=Book Title", "");
		$this->verifyAttribute('ctl0_body_DataGrid_ctl1_ctl5@checked','regexp:false|null');
		$this->clickAndWait("link=Publisher", "");
		$this->verifyAttribute('ctl0_body_DataGrid_ctl6_ctl5@checked','regexp:false|null');
		$this->clickAndWait("link=Price", "");
		$this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl5@checked','regexp:false|null');
		$this->clickAndWait("link=In-stock", "");
		$this->verifyAttribute('ctl0_body_DataGrid_ctl1_ctl5@checked','regexp:false|null');
		$this->clickAndWait("link=Rating", "");
		$this->verifyAttribute('ctl0_body_DataGrid_ctl4_ctl5@checked','regexp:false|null');
	}
}

?>