summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/quickstart/JuiControls/JuiDialogTestCase.php
blob: 576582e69436790d6278db1fb9125f71ec3800fd (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


/**
 * Testcase for TJuiDialog
 */
class JuiDialogTestCase extends PradoGenericSelenium2Test
{
	function test ()
	{
		$this->url("../../demos/quickstart/index.php?page=JuiControls.Samples.TJuiDialog.Home&amp;notheme=true&amp;lang=en");

		$this->assertEquals("PRADO QuickStart Sample", $this->title());

		$this->assertContains('TJuiDialog Samples', $this->source());

		$base = 'ctl0_body_';


		$this->byId("${base}ctl0")->click();
		$this->pause(500);
		$this->assertVisible("${base}dlg1");


		$this->assertEmpty($this->byId("${base}lbl3")->text());
		$this->byId("${base}ctl2")->click();
		$this->pause(500);
		$this->assertVisible("${base}dlg3");

		// Click OK (by keys...)
		$this->keys(PHPUnit_Extensions_Selenium2TestCase_Keys::ENTER);
		$this->pause(500);
		$this->assertEquals('Button Ok clicked', $this->byId("${base}lbl3")->text());
	}
}