summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.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/quickstart/Controls/DataGrid4TestCase.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/quickstart/Controls/DataGrid4TestCase.php')
-rwxr-xr-xtests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.php34
1 files changed, 17 insertions, 17 deletions
diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.php
index 702b997e..f67f5634 100755
--- a/tests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.php
+++ b/tests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.php
@@ -1,28 +1,28 @@
<?php
-class QuickstartDataGrid4TestCase extends PradoGenericSeleniumTest
+class QuickstartDataGrid4TestCase extends PradoGenericSelenium2Test
{
function test()
{
- $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample4&amp;notheme=true&amp;lang=en", "");
+ $this->url("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample4&amp;notheme=true&amp;lang=en");
// verify the 2nd row of data
- $this->verifyTextPresent("Design Patterns: Elements of Reusable Object-Oriented Software", "");
- $this->verifyTextPresent("Addison-Wesley Professional", "");
- $this->verifyTextPresent("$47.04", "");
- $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl5@checked','regexp:true|checked');
- $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl5@disabled','regexp:true|disabled');
+ $this->assertContains("Design Patterns: Elements of Reusable Object-Oriented Software", $this->source());
+ $this->assertContains("Addison-Wesley Professional", $this->source());
+ $this->assertContains("$47.04", $this->source());
+ $this->assertAttribute('ctl0_body_DataGrid_ctl2_ctl5@checked','regexp:true|checked');
+ $this->assertAttribute('ctl0_body_DataGrid_ctl2_ctl5@disabled','regexp:true|disabled');
// verify sorting
- $this->clickAndWait("link=Book Title", "");
- $this->assertEquals($this->getEval('this.browserbot.findElement("ctl0_body_DataGrid_ctl1_ctl5").hasAttribute("checked")'), 'false');
- $this->clickAndWait("link=Publisher", "");
- $this->assertEquals($this->getEval('this.browserbot.findElement("ctl0_body_DataGrid_ctl6_ctl5").hasAttribute("checked")'), 'false');
- $this->clickAndWait("link=Price", "");
- $this->assertEquals($this->getEval('this.browserbot.findElement("ctl0_body_DataGrid_ctl2_ctl5").hasAttribute("checked")'), 'false');
- $this->clickAndWait("link=In-stock", "");
- $this->assertEquals($this->getEval('this.browserbot.findElement("ctl0_body_DataGrid_ctl1_ctl5").hasAttribute("checked")'), 'false');
- $this->clickAndWait("link=Rating", "");
- $this->assertEquals($this->getEval('this.browserbot.findElement("ctl0_body_DataGrid_ctl4_ctl5").hasAttribute("checked")'), 'false');
+ $this->byLinkText("Book Title")->click();
+ $this->assertAttribute('ctl0_body_DataGrid_ctl1_ctl5@checked', null);
+ $this->byLinkText("Publisher")->click();
+ $this->assertAttribute('ctl0_body_DataGrid_ctl6_ctl5@checked', null);
+ $this->byLinkText("Price")->click();
+ $this->assertAttribute('ctl0_body_DataGrid_ctl2_ctl5@checked', null);
+ $this->byLinkText("In-stock")->click();
+ $this->assertAttribute('ctl0_body_DataGrid_ctl1_ctl5@checked', null);
+ $this->byLinkText("Rating")->click();
+ $this->assertAttribute('ctl0_body_DataGrid_ctl4_ctl5@checked', null);
}
}