diff options
author | Fabio Bas <ctrlaltca@gmail.com> | 2014-03-05 23:02:18 +0100 |
---|---|---|
committer | David <ottodavid@gmx.net> | 2014-08-21 17:30:13 +0200 |
commit | 94e54d3023ed89281f89125f3ad0553afb9312cb (patch) | |
tree | 688470329e8b837252b523b6341fe5e10fe34b95 /tests/FunctionalTests/quickstart/ActiveControls/ActiveCheckBoxTestCase.php | |
parent | 32dfd8233520261483bdf30f23425e3b50f05d17 (diff) |
Started cleaning tests' selenium2 compatibility layer
(cherry picked from commit 4ce02f6973aa40c313364b5ff7990f2244309790)
Conflicts:
tests/FunctionalTests/tickets/tests/Ticket220TestCase.php
tests/FunctionalTests/tickets/tests/Ticket719TestCase.php
tests/FunctionalTests/tickets/tests/Ticket769TestCase.php
tests/FunctionalTests/validators/tests/CompareValidatorTestCase.php
tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php
tests/FunctionalTests/validators/tests/DatePickerTestCase.php
Diffstat (limited to 'tests/FunctionalTests/quickstart/ActiveControls/ActiveCheckBoxTestCase.php')
-rwxr-xr-x | tests/FunctionalTests/quickstart/ActiveControls/ActiveCheckBoxTestCase.php | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/tests/FunctionalTests/quickstart/ActiveControls/ActiveCheckBoxTestCase.php b/tests/FunctionalTests/quickstart/ActiveControls/ActiveCheckBoxTestCase.php index 64643d9d..9e537abd 100755 --- a/tests/FunctionalTests/quickstart/ActiveControls/ActiveCheckBoxTestCase.php +++ b/tests/FunctionalTests/quickstart/ActiveControls/ActiveCheckBoxTestCase.php @@ -7,51 +7,51 @@ class QuickstartActiveCheckBoxTestCase extends PradoGenericSelenium2Test { $this->url("../../demos/quickstart/index.php?page=ActiveControls.Samples.TActiveCheckBox.Home&notheme=true&lang=en"); - $this->verifyTitle("PRADO QuickStart Sample", ""); + $this->assertEquals("PRADO QuickStart Sample", $this->title()); - $this->assertTextPresent('TActiveCheckBox Samples (AJAX)'); + $this->assertContains('TActiveCheckBox Samples (AJAX)', $this->source()); // an auto postback checkbox - $this->assertTextNotPresent("ctl0_body_ctl0 clicked using callback"); - $this->click("//input[@name='ctl0\$body\$ctl0']"); + $this->assertNotContains("ctl0_body_ctl0 clicked using callback", $this->source()); + $this->byXPath("//input[@name='ctl0\$body\$ctl0']")->click(); $this->pause(800); - $this->assertChecked("//input[@name='ctl0\$body\$ctl0']"); - $this->assertTextPresent("ctl0_body_ctl0 clicked using callback"); - $this->click("//input[@name='ctl0\$body\$ctl0']"); + $this->assertTrue($this->byXPath("//input[@name='ctl0\$body\$ctl0']")->selected()); + $this->assertContains("ctl0_body_ctl0 clicked using callback", $this->source()); + $this->byXPath("//input[@name='ctl0\$body\$ctl0']")->click(); $this->pause(800); - $this->assertTextPresent("ctl0_body_ctl0 clicked using callback"); - $this->assertNotChecked("//input[@name='ctl0\$body\$ctl0']"); + $this->assertContains("ctl0_body_ctl0 clicked using callback", $this->source()); + $this->assertFalse($this->byXPath("//input[@name='ctl0\$body\$ctl0']")->selected()); // a checkbox causing validation on a textbox $this->assertNotVisible('ctl0_body_ctl1'); - $this->click("//input[@name='ctl0\$body\$ctl2']"); + $this->byXPath("//input[@name='ctl0\$body\$ctl2']")->click(); $this->assertVisible('ctl0_body_ctl1'); - $this->click("//input[@name='ctl0\$body\$ctl2']", ""); + $this->byXPath("//input[@name='ctl0\$body\$ctl2']")->click(); $this->assertVisible('ctl0_body_ctl3'); $this->type("ctl0\$body\$TextBox", "test"); - $this->click("//input[@name='ctl0\$body\$ctl2']", ""); + $this->byXPath("//input[@name='ctl0\$body\$ctl2']")->click(); $this->pause(800); $this->assertNotVisible('ctl0_body_ctl1'); - $this->assertTextPresent("ctl0_body_ctl2 clicked using callback"); + $this->assertContains("ctl0_body_ctl2 clicked using callback", $this->source()); // a checkbox validated by a required field validator - $this->assertNotChecked("//input[@name='ctl0\$body\$CheckBox']"); + $this->assertFalse($this->byXPath("//input[@name='ctl0\$body\$CheckBox']")->selected()); $this->assertNotVisible('ctl0_body_ctl4'); - $this->click("//input[@type='submit' and @value='Submit']", ""); + $this->byXPath("//input[@type='submit' and @value='Submit']")->click(); $this->assertVisible('ctl0_body_ctl4'); - $this->click("//input[@name='ctl0\$body\$CheckBox']", ""); - $this->assertChecked("//input[@name='ctl0\$body\$CheckBox']"); - $this->click("//input[@type='submit' and @value='Submit']", ""); + $this->byXPath("//input[@name='ctl0\$body\$CheckBox']")->click(); + $this->assertTrue($this->byXPath("//input[@name='ctl0\$body\$CheckBox']")->selected()); + $this->byXPath("//input[@type='submit' and @value='Submit']")->click(); $this->pause(800); $this->assertNotVisible('ctl0_body_ctl4'); - $this->assertTextPresent("ctl0_body_CheckBox clicked"); + $this->assertContains("ctl0_body_CheckBox clicked", $this->source()); // a checkbox validated by a required field validator using AutoPostBack - $this->assertChecked("//input[@name='ctl0\$body\$CheckBox2']"); + $this->assertTrue($this->byXPath("//input[@name='ctl0\$body\$CheckBox2']")->selected()); $this->assertNotVisible('ctl0_body_ctl5'); - $this->click("//input[@name='ctl0\$body\$CheckBox2']", ""); + $this->byXPath("//input[@name='ctl0\$body\$CheckBox2']")->click(); $this->assertVisible('ctl0_body_ctl5'); - $this->assertChecked("//input[@name='ctl0\$body\$CheckBox2']"); + $this->assertTrue($this->byXPath("//input[@name='ctl0\$body\$CheckBox2']")->selected()); } } |