summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/quickstart/Controls/DataGrid2TestCase.php
diff options
context:
space:
mode:
authorFabio Bas <ctrlaltca@gmail.com>2014-02-28 10:39:25 +0100
committerDavid <ottodavid@gmx.net>2014-08-21 17:28:52 +0200
commit32dfd8233520261483bdf30f23425e3b50f05d17 (patch)
tree3e0287adbe64f07e4c04615c8f26a3b9db397b18 /tests/FunctionalTests/quickstart/Controls/DataGrid2TestCase.php
parent3db08b4d991c02870d04f7198d65fd926805709c (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/Controls/DataGrid2TestCase.php')
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/DataGrid2TestCase.php40
1 files changed, 20 insertions, 20 deletions
diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid2TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid2TestCase.php
index 7efd69cc..15a4c510 100755
--- a/tests/FunctionalTests/quickstart/Controls/DataGrid2TestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/DataGrid2TestCase.php
@@ -1,49 +1,49 @@
<?php
-class QuickstartDataGrid2TestCase extends PradoGenericSeleniumTest
+class QuickstartDataGrid2TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample2&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample2&amp;notheme=true&amp;lang=en");
// verify if all required texts are present
- $this->verifyTextPresent('Book Title','');
- $this->verifyTextPresent('Publisher','');
- $this->verifyTextPresent('Price','');
- $this->verifyTextPresent('In-stock','');
- $this->verifyTextPresent('Rating','');
+ $this->assertTextPresent('Book Title','');
+ $this->assertTextPresent('Publisher','');
+ $this->assertTextPresent('Price','');
+ $this->assertTextPresent('In-stock','');
+ $this->assertTextPresent('Rating','');
// verify book titles
- $this->verifyElementPresent("//a[@href='http://www.amazon.com/gp/product/0596007124' and text()='Head First Design Patterns']",'');
- $this->verifyElementPresent("//a[@href='http://www.amazon.com/gp/product/0321278658' and text()='Extreme Programming Explained : Embrace Change']",'');
+ $this->assertElementPresent("//a[@href='http://www.amazon.com/gp/product/0596007124' and text()='Head First Design Patterns']",'');
+ $this->assertElementPresent("//a[@href='http://www.amazon.com/gp/product/0321278658' and text()='Extreme Programming Explained : Embrace Change']",'');
// verify publishers
- $this->verifyTextPresent("O'Reilly Media, Inc.",'');
- $this->verifyTextPresent("Addison-Wesley Professional",'');
+ $this->assertTextPresent("O'Reilly Media, Inc.",'');
+ $this->assertTextPresent("Addison-Wesley Professional",'');
// verify prices
- $this->verifyTextPresent("\$37.49",'');
- $this->verifyTextPresent("\$38.49",'');
+ $this->assertTextPresent("\$37.49",'');
+ $this->assertTextPresent("\$38.49",'');
// verify in-stock
$this->verifyAttribute('ctl0_body_DataGrid_ctl1_ctl5@checked','regexp:true|checked');
$this->verifyAttribute('ctl0_body_DataGrid_ctl1_ctl5@disabled','regexp:true|disabled');
$this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl5@checked','regexp:true|checked');
- $this->assertEquals($this->getEval('this.browserbot.findElement("ctl0_body_DataGrid_ctl6_ctl5").hasAttribute("checked")'), 'false');
+ $this->verifyAttribute('ctl0_body_DataGrid_ctl6_ctl5@checked',null);
$this->verifyAttribute('ctl0_body_DataGrid_ctl6_ctl5@disabled','regexp:true|disabled');
// verify ratings
- //$this->verifyElementPresent("//img[@src='images/star5.gif']",'');
- //$this->verifyElementPresent("//img[@src='images/star2.gif']",'');
+ //$this->assertElementPresent("//img[@src='images/star5.gif']",'');
+ //$this->assertElementPresent("//img[@src='images/star2.gif']",'');
// verify toggle column visibility
$this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Book Title']", "");
- $this->verifyTextNotPresent('Head First Design Patterns','');
+ $this->assertTextNotPresent('Head First Design Patterns','');
$this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c3' and @value='In-stock']", "");
- $this->verifyElementNotPresent('ctl0_body_DataGrid_ctl1_ctl5','');
+ $this->assertElementNotPresent('ctl0_body_DataGrid_ctl1_ctl5','');
$this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c3' and @value='In-stock']", "");
- $this->verifyElementPresent('ctl0_body_DataGrid_ctl1_ctl5','');
+ $this->assertElementPresent('ctl0_body_DataGrid_ctl1_ctl5','');
$this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Book Title']", "");
- $this->verifyTextPresent('Head First Design Patterns','');
+ $this->assertTextPresent('Head First Design Patterns','');
}
}