summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/quickstart/Controls/Repeater2TestCase.php
blob: 8eb8c86361936225f5fa894e5a059a317ec0c1bb (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
<?php

class QuickstartRepeater2TestCase extends PradoGenericSelenium2Test
{
	function test()
	{
		$this->url("../../demos/quickstart/index.php?page=Controls.Samples.TRepeater.Sample2&amp;notheme=true&amp;lang=en");

		// verify if all required texts are present
		$this->assertContains('North', $this->source());
		$this->assertContains('John', $this->source());
		$this->assertContains('Developer', $this->source());
		$this->assertContains('South', $this->source());
		$this->assertContains('Carter', $this->source());
		$this->assertContains('Program Manager', $this->source());

		// verify specific table tags
		$this->assertElementPresent("//table[@cellspacing='1']");
		$this->assertElementPresent("//td[@id='ctl0_body_Repeater_ctl1_Cell' and contains(text(),'North')]","");
		$this->assertElementPresent("//td[@id='ctl0_body_Repeater_ctl1_Cell']","");
		$this->assertElementPresent("//td[@id='ctl0_body_Repeater_ctl2_Cell']","");
		$this->assertElementPresent("//td[@id='ctl0_body_Repeater_ctl3_Cell']","");
		$this->assertElementPresent("//td[@id='ctl0_body_Repeater_ctl4_Cell']","");
		$this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl1_Repeater2_ctl1_Row']","");
		$this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl1_Repeater2_ctl2_Row']","");
		$this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl1_Repeater2_ctl3_Row']","");
		$this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl2_Repeater2_ctl1_Row']","");
		$this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl2_Repeater2_ctl2_Row']","");
		$this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl2_Repeater2_ctl3_Row']","");
		$this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl3_Repeater2_ctl1_Row']","");
		$this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl3_Repeater2_ctl2_Row']","");
		$this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl4_Repeater2_ctl1_Row']","");
		$this->assertElementPresent("//tr[@id='ctl0_body_Repeater_ctl4_Repeater2_ctl2_Row']","");
	}
}