summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls/tests/ActiveHiddenFieldTestCase.php
blob: d4b820685cabafda546d6dcd3dd17c96edf6b025 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php

class ActiveHiddenFieldTestCase extends PradoGenericSelenium2Test
{
	function test()
	{
		$base='ctl0_Content_';
	    $this->url("active-controls/index.php?page=ActiveHiddenFieldTest");
	    $fieldEmpty = 'No longer empty';
	    $fieldUsed = 'My value';

	    $this->assertContains('Value of current hidden field', $this->source());
		$this->byId("{$base}Button1")->click();
		$this->pause(800);
		$this->assertText("{$base}ResponseLabel", $fieldEmpty);
		$this->byId("{$base}Button2")->click();
		$this->pause(800);
		$this->assertText("{$base}ResponseLabel", $fieldUsed);
		$this->byId("{$base}Button3")->click();
		$this->pause(800);
		$this->assertText("{$base}ResponseLabel", $fieldEmpty.'|'.$fieldUsed);
	}
}