blob: 94cae5f236c0cfe8c3c42ff1003a0d90a9c839b3 (
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
|
<?php
class AutoCompleteTestCase extends PradoGenericSeleniumTest
{
function test()
{
$this->open("active-controls/index.php?page=AutoCompleteTest");
$this->verifyTextPresent("TAutoComplete Test");
$this->assertText("label1", "Label 1");
$this->type("textbox3", 'a');
$this->runScript('Prado.Registry[\'textbox3\'].onKeyPress({})');
$this->pause(500);
$this->verifyTextPresent('Andorra');
$this->assertText("label1", "suggestion for a");
$this->type("textbox3", 'au');
$this->runScript('Prado.Registry[\'textbox3\'].onKeyPress({})');
$this->pause(500);
$this->verifyTextPresent('Australia');
$this->assertText("label1", "suggestion for au");
$this->click("css=#textbox3_result ul li");
$this->pause(500);
$this->assertText("label1", "Label 1: Austria");
$this->type("textbox2", "cu");
$this->runScript('Prado.Registry[\'textbox2\'].onKeyPress({})');
$this->pause(500);
$this->click('css=#textbox2_result ul li');
$this->pause(500);
$this->assertText("label1", "Label 1: Cuba");
$this->type("textbox2", "Cuba,me");
$this->runScript('Prado.Registry[\'textbox2\'].onKeyPress({})');
$this->pause(500);
$this->click('css=#textbox2_result ul li');
$this->pause(500);
$this->assertText("label1", "Label 1: Cuba,Mexico");
}
}
|