diff options
Diffstat (limited to 'tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php')
-rwxr-xr-x | tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php | 57 |
1 files changed, 32 insertions, 25 deletions
diff --git a/tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php b/tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php index 75de3419..25dabe24 100755 --- a/tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php +++ b/tests/FunctionalTests/active-controls/tests/CallbackAdapterTestCase.php @@ -6,53 +6,60 @@ class CallbackAdapterTestCase extends PradoGenericSelenium2Test { $base='ctl0_Content_'; $this->url("active-controls/index.php?page=ControlAdapterTest"); - $this->assertTextPresent('Control Adapter - State Tracking Tests'); + $this->assertContains('Control Adapter - State Tracking Tests', $this->source()); - $this->click("{$base}button2"); - $this->assertAlert('ok'); + $this->byId("{$base}button2")->click(); + $this->assertEquals('ok', $this->alertText()); + $this->acceptAlert(); - $this->click("{$base}test6"); + $this->byId("{$base}test6")->click(); $this->pause(800); - $this->click("{$base}test7"); + $this->byId("{$base}test7")->click(); $this->pause(800); - $this->click("{$base}test8"); + $this->byId("{$base}test8")->click(); $this->pause(800); - $this->click("{$base}test9"); + $this->byId("{$base}test9")->click(); $this->pause(800); - $this->click("{$base}button1"); - $this->assertAlert('haha!'); - - $this->click("{$base}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->assertEquals('baz!', $this->alertText()); + $this->acceptAlert(); } /* function testIE() { $this->url("active-controls/index.php?page=ControlAdapterTest"); - $this->assertTextPresent('Control Adapter - State Tracking Tests'); + $this->assertContains('Control Adapter - State Tracking Tests', $this->source()); - $this->click("{$base}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("{$base}button1"); - $this->assertAlert('haha!'); + $this->byId("{$base}button1")->click(); + $this->assertEquals('haha!', $this->alertText()); + $this->acceptAlert(); //IE alerts in diffrent order - $this->click("{$base}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(); } */ } |