blob: fd805fedd4edea238ad957c27a1f977780dde03a (
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
47
48
49
50
|
<?php
/**
* Testcase for TJuiAutoComplete
*/
class JuiAutoCompleteTestCase extends PradoGenericSelenium2Test
{
function test ()
{
$this->url("../../demos/quickstart/index.php?page=JuiControls.Samples.TJuiAutoComplete.Home&notheme=true&lang=en");
$this->assertEquals("PRADO QuickStart Sample", $this->title());
$this->assertSourceContains('TJuiAutoComplete Samples');
$base = 'ctl0_body_';
$this->assertText("{$base}Selection1", "");
$this->byId("{$base}AutoComplete")->click();
$this->keys('J');
$this->pause(800);
$this->assertSourceContains('John');
$this->byCssSelector("#{$base}AutoComplete_result ul li")->click();
$this->pause(800);
$this->assertValue("{$base}AutoComplete", "John");
$this->assertText("{$base}Selection1", "Selected ID: 1");
$this->byId("{$base}AutoComplete2")->click();
$this->keys('Joh');
$this->pause(800);
$this->byCssSelector("#{$base}AutoComplete2_result ul li")->click();
$this->pause(800);
$this->assertValue("{$base}AutoComplete2", "John");
$this->assertText("{$base}Selection2", "Selected ID: 1");
//$this->keys(PHPUnit_Extensions_Selenium2TestCase_Keys::END);
$this->keys(',Ge');
$this->pause(800);
$this->byCssSelector("#{$base}AutoComplete2_result ul li")->click();
$this->pause(500);
$this->assertValue("{$base}AutoComplete2", "John,George");
$this->assertText("{$base}Selection2", "Selected ID: 3");
}
}
|