From 45dc5224f9b2eb5f9c24d4eecda2d8a1f6ac5d8c Mon Sep 17 00:00:00 2001 From: xue <> Date: Tue, 14 Feb 2006 14:39:23 +0000 Subject: Added changing page size to the datagrid demo and two more FT. --- .../quickstart/Controls/DataGrid4TestCase.php | 30 +++++++++++++ .../quickstart/Controls/DataGrid6TestCase.php | 50 ++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 tests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.php create mode 100644 tests/FunctionalTests/quickstart/Controls/DataGrid6TestCase.php (limited to 'tests/FunctionalTests/quickstart/Controls') diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.php new file mode 100644 index 00000000..36810a8d --- /dev/null +++ b/tests/FunctionalTests/quickstart/Controls/DataGrid4TestCase.php @@ -0,0 +1,30 @@ +open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample4&notheme=true", ""); + + // 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_ctl6@checked','regexp:true|checked'); + $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl6@disabled','regexp:true|disabled'); + + // verify sorting + $this->clickAndWait("link=Book Title", ""); + $this->verifyAttribute('ctl0_body_DataGrid_ctl1_ctl6@checked','regexp:false|null'); + $this->clickAndWait("link=Publisher", ""); + $this->verifyAttribute('ctl0_body_DataGrid_ctl6_ctl6@checked','regexp:false|null'); + $this->clickAndWait("link=Price", ""); + $this->verifyAttribute('ctl0_body_DataGrid_ctl2_ctl6@checked','regexp:false|null'); + $this->clickAndWait("link=In-stock", ""); + $this->verifyAttribute('ctl0_body_DataGrid_ctl1_ctl6@checked','regexp:false|null'); + $this->clickAndWait("link=Rating", ""); + $this->verifyAttribute('ctl0_body_DataGrid_ctl4_ctl6@checked','regexp:false|null'); + } +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid6TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid6TestCase.php new file mode 100644 index 00000000..ad6cd8ca --- /dev/null +++ b/tests/FunctionalTests/quickstart/Controls/DataGrid6TestCase.php @@ -0,0 +1,50 @@ +open("../../demos/quickstart/index.php?page=Controls.Samples.TDataGrid.Sample6&notheme=true", ""); + + // verify column headers + $this->verifyTextPresent('id',''); + $this->verifyTextPresent('name',''); + $this->verifyTextPresent('quantity',''); + $this->verifyTextPresent('price',''); + $this->verifyTextPresent('imported',''); + + $this->verifyTextPresent('ITN001',''); + $this->verifyTextPresent('ITN002',''); + $this->verifyTextPresent('ITN003',''); + $this->verifyTextPresent('ITN004',''); + $this->verifyTextPresent('ITN005',''); + $this->verifyTextNotPresent('ITN006',''); + + // verify paging + $this->clickAndWait("link=2", ""); + $this->verifyTextPresent('ITN006',''); + $this->verifyTextPresent('ITN007',''); + $this->verifyTextPresent('ITN008',''); + $this->verifyTextPresent('ITN009',''); + $this->verifyTextPresent('ITN010',''); + $this->verifyTextNotPresent('ITN011',''); + $this->verifyTextNotPresent('ITN005',''); + + $this->clickAndWait("link=4", ""); + $this->verifyTextPresent('ITN016',''); + $this->verifyTextPresent('ITN017',''); + $this->verifyTextPresent('ITN018',''); + $this->verifyTextPresent('ITN019',''); + $this->verifyTextNotPresent('ITN015',''); + + $this->clickAndWait("link=1", ""); + $this->verifyTextPresent('ITN001',''); + $this->verifyTextPresent('ITN002',''); + $this->verifyTextPresent('ITN003',''); + $this->verifyTextPresent('ITN004',''); + $this->verifyTextPresent('ITN005',''); + $this->verifyTextNotPresent('ITN006',''); + } +} + +?> \ No newline at end of file -- cgit v1.2.3