diff options
author | ctrlaltca <ctrlaltca@gmail.com> | 2014-08-26 16:59:21 +0200 |
---|---|---|
committer | ctrlaltca <ctrlaltca@gmail.com> | 2014-08-26 16:59:21 +0200 |
commit | 74b31be9515eddfa63005d6760614badfaba9fea (patch) | |
tree | 47c952901dcb5eccd6dd8b7c6ee7e0b6bf176510 /tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php | |
parent | 2b11341614ac4a15be697fa8acad07055154ac54 (diff) | |
parent | 0c5026b55cde5c104f10686afd8b441568175d38 (diff) |
Backports for Prado 3.2.4
Diffstat (limited to 'tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php')
-rwxr-xr-x | tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php index d45cb42c..1830f5ab 100755 --- a/tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/ActiveListBoxTestCase.php @@ -1,46 +1,47 @@ <?php -class ActiveListBoxTestCase extends PradoGenericSeleniumTest +class ActiveListBoxTestCase extends PradoGenericSelenium2Test { function test() { - $this->open("active-controls/index.php?page=ActiveListBoxTest"); - $this->assertTextPresent('Active List Box Functional Test'); + $base='ctl0_Content_'; + $this->url("active-controls/index.php?page=ActiveListBoxTest"); + $this->assertContains('Active List Box Functional Test', $this->source()); - $this->assertText("label1", "Label 1"); + $this->assertText("{$base}label1", "Label 1"); - $this->click("button1"); + $this->byId("{$base}button1")->click(); $this->pause(800); - $this->assertEquals($this->getSelectedLabels('list1'), array('item 2', 'item 3', 'item 4')); + $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 3', 'item 4')); - $this->click('button3'); + $this->byId("{$base}button3")->click(); $this->pause(800); - $this->assertEquals($this->getSelectedLabels('list1'), array('item 1')); + $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 1')); - $this->click('button4'); + $this->byId("{$base}button4")->click(); $this->pause(800); - $this->assertEquals($this->getSelectedLabels('list1'), array('item 5')); + $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 5')); - $this->click('button5'); + $this->byId("{$base}button5")->click(); $this->pause(800); - $this->assertEquals($this->getSelectedLabels('list1'), array('item 2', 'item 5')); + $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 5')); - $this->click('button2'); + $this->byId("{$base}button2")->click(); $this->pause(800); - $this->assertNotSomethingSelected("list1"); + $this->assertNotSomethingSelected("{$base}list1"); - $this->click('button6'); + $this->byId("{$base}button6")->click(); $this->pause(800); - $this->click("button1"); + $this->byId("{$base}button1")->click(); $this->pause(800); - $this->assertEquals($this->getSelectedLabels('list1'), array('item 2', 'item 3', 'item 4')); + $this->assertEquals($this->getSelectedLabels("{$base}list1"), array('item 2', 'item 3', 'item 4')); - $this->select("list1", "item 1"); + $this->select("{$base}list1", "item 1"); $this->pause(800); - $this->assertText('label1', 'Selection: value 1'); + $this->assertText("{$base}label1", 'Selection: value 1'); - $this->addSelection("list1", "item 4"); + $this->addSelection("{$base}list1", "item 4"); $this->pause(800); - $this->assertText('label1', 'Selection: value 1, value 4'); + $this->assertText("{$base}label1", 'Selection: value 1, value 4'); } }
\ No newline at end of file |