diff options
author | Fabio Bas <ctrlaltca@gmail.com> | 2014-02-28 10:39:25 +0100 |
---|---|---|
committer | David <ottodavid@gmx.net> | 2014-08-21 17:28:52 +0200 |
commit | 32dfd8233520261483bdf30f23425e3b50f05d17 (patch) | |
tree | 3e0287adbe64f07e4c04615c8f26a3b9db397b18 /tests/FunctionalTests/quickstart/ActiveControls | |
parent | 3db08b4d991c02870d04f7198d65fd926805709c (diff) |
Ported all tests from Selenium1 (RC) to Selenium2 (WebDriver) using a compatibility layer
(cherry picked from commit 82774aa0a41562a325f31c901584ec01c8238573)
Conflicts:
tests/FunctionalTests/active-controls/tests/AutoCompleteTestCase.php
tests/FunctionalTests/active-controls/tests/CustomTemplateTestCase.php
tests/FunctionalTests/tickets/tests/Ticket220TestCase.php
tests/FunctionalTests/tickets/tests/Ticket719TestCase.php
tests/FunctionalTests/tickets/tests/Ticket769TestCase.php
tests/FunctionalTests/validators/tests/DataTypeValidatorTestCase.php
Diffstat (limited to 'tests/FunctionalTests/quickstart/ActiveControls')
3 files changed, 27 insertions, 28 deletions
diff --git a/tests/FunctionalTests/quickstart/ActiveControls/ActiveButtonTestCase.php b/tests/FunctionalTests/quickstart/ActiveControls/ActiveButtonTestCase.php index 03861440..dce8f144 100755 --- a/tests/FunctionalTests/quickstart/ActiveControls/ActiveButtonTestCase.php +++ b/tests/FunctionalTests/quickstart/ActiveControls/ActiveButtonTestCase.php @@ -1,36 +1,36 @@ <?php //$Id: ActiveButtonTestCase.php 3187 2012-07-12 11:21:01Z ctrlaltca $ -class QuickstartActiveButtonTestCase extends PradoGenericSeleniumTest +class QuickstartActiveButtonTestCase extends PradoGenericSelenium2Test { function test () { - $this->open("../../demos/quickstart/index.php?page=ActiveControls.Samples.TActiveButton.Home&notheme=true&lang=en"); + $this->url("../../demos/quickstart/index.php?page=ActiveControls.Samples.TActiveButton.Home&notheme=true&lang=en"); $this->verifyTitle("PRADO QuickStart Sample", ""); $this->assertTextPresent('TActiveButton Samples (AJAX)'); // a click button - $this->verifyElementNotPresent("//input[@type='submit' and @value=\"I'm clicked\"]"); + $this->assertElementNotPresent("//input[@type='submit' and @value=\"I'm clicked\"]"); $this->click("//input[@type='submit' and @value='click me']", ""); $this->pause(800); - $this->verifyElementPresent("//input[@type='submit' and @value=\"I'm clicked\"]"); + $this->assertElementPresent("//input[@type='submit' and @value=\"I'm clicked\"]"); // a command button - $this->verifyElementNotPresent("//input[@type='submit' and @value=\"Name: test, Param: value using callback\"]"); + $this->assertElementNotPresent("//input[@type='submit' and @value=\"Name: test, Param: value using callback\"]"); $this->click("//input[@type='submit' and @value='click me']", ""); $this->pause(800); - $this->verifyElementPresent("//input[@type='submit' and @value=\"Name: test, Param: value using callback\"]"); + $this->assertElementPresent("//input[@type='submit' and @value=\"Name: test, Param: value using callback\"]"); // a button causing validation - $this->verifyNotVisible('ctl0_body_ctl2'); + $this->assertNotVisible('ctl0_body_ctl2'); $this->click("//input[@type='submit' and @value='submit']", ""); $this->pause(800); - $this->verifyVisible('ctl0_body_ctl2'); + $this->assertVisible('ctl0_body_ctl2'); $this->type("ctl0\$body\$TextBox", "test"); $this->click("//input[@type='submit' and @value='submit']", ""); $this->pause(800); - $this->verifyNotVisible('ctl0_body_ctl2'); - $this->verifyElementPresent("//input[@type='submit' and @value=\"I'm clicked using callback\"]", ""); + $this->assertNotVisible('ctl0_body_ctl2'); + $this->assertElementPresent("//input[@type='submit' and @value=\"I'm clicked using callback\"]", ""); } } diff --git a/tests/FunctionalTests/quickstart/ActiveControls/ActiveCheckBoxTestCase.php b/tests/FunctionalTests/quickstart/ActiveControls/ActiveCheckBoxTestCase.php index 257917ec..64643d9d 100755 --- a/tests/FunctionalTests/quickstart/ActiveControls/ActiveCheckBoxTestCase.php +++ b/tests/FunctionalTests/quickstart/ActiveControls/ActiveCheckBoxTestCase.php @@ -1,12 +1,11 @@ <?php //$Id: ActiveCheckBoxTestCase.php 3187 2012-07-12 11:21:01Z ctrlaltca $ -class QuickstartActiveCheckBoxTestCase extends PradoGenericSeleniumTest +class QuickstartActiveCheckBoxTestCase extends PradoGenericSelenium2Test { function test () { - $this->setSpeed(500); - $this->open("../../demos/quickstart/index.php?page=ActiveControls.Samples.TActiveCheckBox.Home&notheme=true&lang=en", ""); + $this->url("../../demos/quickstart/index.php?page=ActiveControls.Samples.TActiveCheckBox.Home&notheme=true&lang=en"); $this->verifyTitle("PRADO QuickStart Sample", ""); @@ -14,45 +13,45 @@ class QuickstartActiveCheckBoxTestCase extends PradoGenericSeleniumTest // an auto postback checkbox - $this->verifyTextNotPresent("ctl0_body_ctl0 clicked using callback"); + $this->assertTextNotPresent("ctl0_body_ctl0 clicked using callback"); $this->click("//input[@name='ctl0\$body\$ctl0']"); $this->pause(800); $this->assertChecked("//input[@name='ctl0\$body\$ctl0']"); - $this->verifyTextPresent("ctl0_body_ctl0 clicked using callback"); + $this->assertTextPresent("ctl0_body_ctl0 clicked using callback"); $this->click("//input[@name='ctl0\$body\$ctl0']"); $this->pause(800); - $this->verifyTextPresent("ctl0_body_ctl0 clicked using callback"); + $this->assertTextPresent("ctl0_body_ctl0 clicked using callback"); $this->assertNotChecked("//input[@name='ctl0\$body\$ctl0']"); // a checkbox causing validation on a textbox - $this->verifyNotVisible('ctl0_body_ctl1'); + $this->assertNotVisible('ctl0_body_ctl1'); $this->click("//input[@name='ctl0\$body\$ctl2']"); - $this->verifyVisible('ctl0_body_ctl1'); + $this->assertVisible('ctl0_body_ctl1'); $this->click("//input[@name='ctl0\$body\$ctl2']", ""); - $this->verifyVisible('ctl0_body_ctl3'); + $this->assertVisible('ctl0_body_ctl3'); $this->type("ctl0\$body\$TextBox", "test"); $this->click("//input[@name='ctl0\$body\$ctl2']", ""); $this->pause(800); - $this->verifyNotVisible('ctl0_body_ctl1'); + $this->assertNotVisible('ctl0_body_ctl1'); $this->assertTextPresent("ctl0_body_ctl2 clicked using callback"); // a checkbox validated by a required field validator $this->assertNotChecked("//input[@name='ctl0\$body\$CheckBox']"); - $this->verifyNotVisible('ctl0_body_ctl4'); + $this->assertNotVisible('ctl0_body_ctl4'); $this->click("//input[@type='submit' and @value='Submit']", ""); - $this->verifyVisible('ctl0_body_ctl4'); + $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->verifyNotVisible('ctl0_body_ctl4'); + $this->pause(800); + $this->assertNotVisible('ctl0_body_ctl4'); $this->assertTextPresent("ctl0_body_CheckBox clicked"); // a checkbox validated by a required field validator using AutoPostBack $this->assertChecked("//input[@name='ctl0\$body\$CheckBox2']"); - $this->verifyNotVisible('ctl0_body_ctl5'); + $this->assertNotVisible('ctl0_body_ctl5'); $this->click("//input[@name='ctl0\$body\$CheckBox2']", ""); - $this->verifyVisible('ctl0_body_ctl5'); + $this->assertVisible('ctl0_body_ctl5'); $this->assertChecked("//input[@name='ctl0\$body\$CheckBox2']"); - $this->setSpeed(0); } } diff --git a/tests/FunctionalTests/quickstart/ActiveControls/ActiveCustomValidatorTestCase.php b/tests/FunctionalTests/quickstart/ActiveControls/ActiveCustomValidatorTestCase.php index 967842b0..dba29133 100755 --- a/tests/FunctionalTests/quickstart/ActiveControls/ActiveCustomValidatorTestCase.php +++ b/tests/FunctionalTests/quickstart/ActiveControls/ActiveCustomValidatorTestCase.php @@ -1,10 +1,10 @@ <?php //$Id: ActiveButtonTestCase.php 1405 2006-09-10 01:03:56Z wei $ -class QuickstartActiveCustomValidatorTestCase extends PradoGenericSeleniumTest +class QuickstartActiveCustomValidatorTestCase extends PradoGenericSelenium2Test { function test () { - $this->open("../../demos/quickstart/index.php?page=ActiveControls.Samples.TActiveCustomValidator.Home&notheme=true&lang=en"); + $this->url("../../demos/quickstart/index.php?page=ActiveControls.Samples.TActiveCustomValidator.Home&notheme=true&lang=en"); $this->verifyTitle("PRADO QuickStart Sample", ""); |