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
|
<?php
class ActiveListBoxMasterTestCase extends PradoGenericSelenium2Test
{
function test()
{
$this->url("active-controls/index.php?page=ActiveListBoxMasterTest");
$this->assertContains('Active List Box Functional Test', $this->source());
$base = 'ctl0_body_';
$this->assertText("{$base}label1", "Label 1");
$this->byId("{$base}button1")->click();
$this->pause(800);
$this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 3', 'item 4'));
$this->byId("{$base}button3")->click();
$this->pause(800);
$this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 1'));
$this->byId("{$base}button4")->click();
$this->pause(800);
$this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 5'));
$this->byId("{$base}button5")->click();
$this->pause(800);
$this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 5'));
$this->byId("{$base}button2")->click();
$this->pause(800);
$this->assertNotSomethingSelected("{$base}list1");
$this->byId("{$base}button6")->click();
$this->pause(800);
$this->byId("{$base}button1")->click();
$this->pause(800);
$this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 3', 'item 4'));
$this->select("{$base}list1", "item 1");
$this->pause(800);
$this->assertText("{$base}label1", 'Selection: value 1');
$this->addSelection("{$base}list1", "item 4");
$this->pause(800);
$this->assertText("{$base}label1", 'Selection: value 1, value 4');
}
}
|