summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/tickets/tests/Ticket719TestCase.php
blob: 46346ca1984d8bf44808effd0e3842d987f971f0 (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
<?php

class Ticket719TestCase extends PradoGenericSelenium2Test
{
	function test()
	{
		$this->url("tickets/index.php?page=Ticket719");
		$this->assertContains("Verifying Ticket 719", $this->source());
		
		$base="ctl0_Content_";
		
		$this->byId("${base}ctl2")->click();
		$this->pause(800);
		$this->assertVisible("${base}ctl0", 'Required');
		$this->assertVisible("${base}ctl1", 'Required');
		
		$this->byId("${base}autocomplete")->click();

		$this->keys('f');
		$this->pause(500);
		$this->assertContains('Finland', $this->source());

		$this->keys('r');
		$this->pause(500);
		$this->assertContains('French', $this->source());

		$this->keys('a');
		$this->pause(500);
		$this->assertContains('France', $this->source());
	
		$this->byCssSelector("#${base}autocomplete_result ul li")->click();
		$this->pause(800);
		$this->assertNotVisible("${base}ctl1");

		$this->byId("${base}textbox")->clear();
		$this->byId("${base}textbox")->value('Prado');
		// trigger onblur() event
		$this->byCssSelector('body')->click();

		$this->assertNotVisible("${base}ctl0");
		
		$this->byId("${base}ctl2")->click();
		$this->pause(800);
		$this->assertText("${base}Result", "TextBox Content : Prado -- Autocomplete Content :France");
	}
}