summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php
diff options
context:
space:
mode:
authorctrlaltca <ctrlaltca@gmail.com>2014-08-26 16:59:21 +0200
committerctrlaltca <ctrlaltca@gmail.com>2014-08-26 16:59:21 +0200
commit74b31be9515eddfa63005d6760614badfaba9fea (patch)
tree47c952901dcb5eccd6dd8b7c6ee7e0b6bf176510 /tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php
parent2b11341614ac4a15be697fa8acad07055154ac54 (diff)
parent0c5026b55cde5c104f10686afd8b441568175d38 (diff)
Merge pull request #530 from pradosoft/prado-3.2.43.2.4prado-3.2
Backports for Prado 3.2.4
Diffstat (limited to 'tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php')
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php63
1 files changed, 32 insertions, 31 deletions
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php
index fceb2e21..7606e46b 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonTestCase.php
@@ -1,52 +1,53 @@
<?php
-class ActiveRadioButtonTestCase extends PradoGenericSeleniumTest
+class ActiveRadioButtonTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActiveRadioButtonTest");
- $this->verifyTextPresent("Active Radio Button Test");
- $this->assertText('label1', 'Label 1');
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ActiveRadioButtonTest");
+ $this->assertContains("Active Radio Button Test", $this->source());
+ $this->assertText("{$base}label1", 'Label 1');
- $this->assertNotChecked('radio1');
- $this->assertNotChecked('radio2');
- $this->assertNotChecked('radio3');
+ $this->assertFalse($this->byId("{$base}radio1")->selected());
+ $this->assertFalse($this->byId("{$base}radio2")->selected());
+ $this->assertFalse($this->byId("{$base}radio3")->selected());
- $this->assertText('radio1_label', 'Radio Button 1');
- $this->assertText('radio2_label', 'Radio Button 2');
- $this->assertText('radio3_label', 'Radio Button 3');
+ $this->assertText("{$base}radio1_label", 'Radio Button 1');
+ $this->assertText("{$base}radio2_label", 'Radio Button 2');
+ $this->assertText("{$base}radio3_label", 'Radio Button 3');
- $this->click('change_text1');
+ $this->byId("{$base}change_text1")->click();
$this->pause(800);
- $this->assertText('radio1_label', 'Hello Radio Button 1');
- $this->assertText('radio2_label', 'Radio Button 2');
- $this->assertText('radio3_label', 'Radio Button 3');
+ $this->assertText("{$base}radio1_label", 'Hello Radio Button 1');
+ $this->assertText("{$base}radio2_label", 'Radio Button 2');
+ $this->assertText("{$base}radio3_label", 'Radio Button 3');
- $this->click('change_text2');
+ $this->byId("{$base}change_text2")->click();
$this->pause(800);
- $this->assertText('radio1_label', 'Hello Radio Button 1');
- $this->assertText('radio2_label', 'Radio Button 2 World');
- $this->assertText('radio3_label', 'Radio Button 3');
+ $this->assertText("{$base}radio1_label", 'Hello Radio Button 1');
+ $this->assertText("{$base}radio2_label", 'Radio Button 2 World');
+ $this->assertText("{$base}radio3_label", 'Radio Button 3');
- $this->click('change_radio1');
+ $this->byId("{$base}change_radio1")->click();
$this->pause(800);
- $this->assertChecked('radio1');
- $this->assertNotChecked('radio2');
- $this->assertNotChecked('radio3');
+ $this->assertTrue($this->byId("{$base}radio1")->selected());
+ $this->assertFalse($this->byId("{$base}radio2")->selected());
+ $this->assertFalse($this->byId("{$base}radio3")->selected());
- $this->click('change_radio2');
+ $this->byId("{$base}change_radio2")->click();
$this->pause(800);
- $this->assertNotChecked('radio1');
- $this->assertChecked('radio2');
- $this->assertNotChecked('radio3');
+ $this->assertFalse($this->byId("{$base}radio1")->selected());
+ $this->assertTrue($this->byId("{$base}radio2")->selected());
+ $this->assertFalse($this->byId("{$base}radio3")->selected());
- $this->click('radio3');
+ $this->byId("{$base}radio3")->click();
$this->pause(800);
- $this->assertNotChecked('radio1');
- $this->assertChecked('radio2');
- $this->assertChecked('radio3');
- $this->assertText('label1', 'Label 1:Radio Button 3 Checked');
+ $this->assertFalse($this->byId("{$base}radio1")->selected());
+ $this->assertTrue($this->byId("{$base}radio2")->selected());
+ $this->assertTrue($this->byId("{$base}radio3")->selected());
+ $this->assertText("{$base}label1", 'Label 1:Radio Button 3 Checked');
}