summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxTestCase.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/ActiveCheckBoxTestCase.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/ActiveCheckBoxTestCase.php')
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveCheckBoxTestCase.php53
1 files changed, 27 insertions, 26 deletions
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxTestCase.php
index 6f235273..782b35be 100755
--- a/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxTestCase.php
+++ b/tests/FunctionalTests/active-controls/tests/ActiveCheckBoxTestCase.php
@@ -1,59 +1,60 @@
<?php
-class ActiveCheckBoxTestCase extends PradoGenericSeleniumTest
+class ActiveCheckBoxTestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("active-controls/index.php?page=ActiveCheckBoxTest");
- $this->verifyTextPresent("Active CheckBox Test");
+ $base='ctl0_Content_';
+ $this->url("active-controls/index.php?page=ActiveCheckBoxTest");
+ $this->assertContains("Active CheckBox Test", $this->source());
- $this->assertText("checkbox1_label", "CheckBox 1");
- $this->assertText("checkbox2_label", "CheckBox 2");
- $this->assertText('label1', 'Label 1');
+ $this->assertText("{$base}checkbox1_label", "CheckBox 1");
+ $this->assertText("{$base}checkbox2_label", "CheckBox 2");
+ $this->assertText("{$base}label1", 'Label 1');
- $this->click("change_text1");
+ $this->byId("{$base}change_text1")->click();
$this->pause(800);
- $this->assertText('checkbox1_label', 'Hello CheckBox 1');
+ $this->assertText("{$base}checkbox1_label", 'Hello CheckBox 1');
- $this->click("change_text2");
+ $this->byId("{$base}change_text2")->click();
$this->pause(800);
- $this->assertText('checkbox2_label', 'CheckBox 2 World');
+ $this->assertText("{$base}checkbox2_label", 'CheckBox 2 World');
//check box 1
- $this->click('change_checked1');
+ $this->byId("{$base}change_checked1")->click();
$this->pause(800);
- $this->assertChecked('checkbox1');
+ $this->assertTrue($this->byId("{$base}checkbox1")->selected());
- $this->click('change_checked1');
+ $this->byId("{$base}change_checked1")->click();
$this->pause(800);
- $this->assertNotChecked('checkbox1');
+ $this->assertFalse($this->byId("{$base}checkbox1")->selected());
//check box 2
- $this->click('change_checked2');
+ $this->byId("{$base}change_checked2")->click();
$this->pause(800);
- $this->assertChecked('checkbox2');
+ $this->assertTrue($this->byId("{$base}checkbox2")->selected());
- $this->click('change_checked2');
+ $this->byId("{$base}change_checked2")->click();
$this->pause(800);
- $this->assertNotChecked('checkbox2');
+ $this->assertFalse($this->byId("{$base}checkbox2")->selected());
//click checkbox 1
- $this->click("checkbox1");
+ $this->byId("{$base}checkbox1")->click();
$this->pause(800);
- $this->assertText("label1", "Label 1:Hello CheckBox 1 Checked");
+ $this->assertText("{$base}label1", "Label 1:Hello CheckBox 1 Checked");
- $this->click("checkbox1");
+ $this->byId("{$base}checkbox1")->click();
$this->pause(800);
- $this->assertText("label1", "Label 1:Hello CheckBox 1 Not Checked");
+ $this->assertText("{$base}label1", "Label 1:Hello CheckBox 1 Not Checked");
//click checkbox 2
- $this->click("checkbox2");
+ $this->byId("{$base}checkbox2")->click();
$this->pause(800);
- $this->assertText("label1", "Label 1:CheckBox 2 World Checked");
+ $this->assertText("{$base}label1", "Label 1:CheckBox 2 World Checked");
- $this->click("checkbox2");
+ $this->byId("{$base}checkbox2")->click();
$this->pause(800);
- $this->assertText("label1", "Label 1:CheckBox 2 World Not Checked");
+ $this->assertText("{$base}label1", "Label 1:CheckBox 2 World Not Checked");
}
}