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/CallbackAdapterTestCase.php | |
parent | 2b11341614ac4a15be697fa8acad07055154ac54 (diff) | |
parent | 0c5026b55cde5c104f10686afd8b441568175d38 (diff) |
Backports for Prado 3.2.4
Diffstat (limited to 'tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php')
-rwxr-xr-x | tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php | 66 |
1 files changed, 37 insertions, 29 deletions
diff --git a/tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php b/tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php index c495935a..d5d112d8 100755 --- a/tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php @@ -1,58 +1,66 @@ <?php -class CallbackAdapterTestCase extends PradoGenericSeleniumTest +class CallbackAdapterTestCase extends PradoGenericSelenium2Test { function test() { + $base='ctl0_Content_'; + $this->url("active-controls/index.php?page=ControlAdapterTest"); + $this->assertContains('Control Adapter - State Tracking Tests', $this->source()); - $this->open("active-controls/index.php?page=ControlAdapterTest"); - $this->assertTextPresent('Control Adapter - State Tracking Tests'); + $this->byId("{$base}button2")->click(); + $this->assertEquals('ok', $this->alertText()); + $this->acceptAlert(); - $this->click('button2'); - $this->assertAlert('ok'); - - $this->click('test6'); + $this->byId("{$base}test6")->click(); $this->pause(800); - $this->click('test7'); + $this->byId("{$base}test7")->click(); $this->pause(800); - $this->click('test8'); + $this->byId("{$base}test8")->click(); $this->pause(800); - $this->click('test9'); + $this->byId("{$base}test9")->click(); $this->pause(800); - $this->click('button1'); - $this->assertAlert('haha!'); - - $this->click('button2'); - $this->assertAlert('ok'); - $this->assertAlert('baz!'); + $this->byId("{$base}button1")->click(); + $this->assertEquals('haha!', $this->alertText()); + $this->acceptAlert(); + $this->byId("{$base}button2")->click(); + $this->assertEquals('ok', $this->alertText()); + $this->acceptAlert(); + $this->pause(500); + $this->assertEquals('baz!', $this->alertText()); + $this->acceptAlert(); } /* function testIE() { - $this->open("active-controls/index.php?page=ControlAdapterTest"); - $this->assertTextPresent('Control Adapter - State Tracking Tests'); + $this->url("active-controls/index.php?page=ControlAdapterTest"); + $this->assertContains('Control Adapter - State Tracking Tests', $this->source()); - $this->click('button2'); - $this->assertAlert('ok'); + $this->byId("{$base}button2")->click(); + $this->assertEquals('ok', $this->alertText()); + $this->acceptAlert(); - $this->click('test6'); + $this->byId('test6')->click(); $this->pause(800); - $this->click('test7'); + $this->byId('test7')->click(); $this->pause(800); - $this->click('test8'); + $this->byId('test8')->click(); $this->pause(800); - $this->click('test9'); + $this->byId('test9')->click(); $this->pause(800); - $this->click('button1'); - $this->assertAlert('haha!'); + $this->byId("{$base}button1")->click(); + $this->assertEquals('haha!', $this->alertText()); + $this->acceptAlert(); //IE alerts in diffrent order - $this->click('button2'); - $this->assertAlert('baz!'); - $this->assertAlert('ok'); + $this->byId("{$base}button2")->click(); + $this->assertEquals('baz!', $this->alertText()); + $this->acceptAlert(); + $this->assertEquals('ok', $this->alertText()); + $this->acceptAlert(); } */ } |