From 414451b4e1062433734f0927daff003235148ef1 Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 21 May 2006 22:53:49 +0000 Subject: Merge from 3.0 branch till 1089. --- .../quickstart/Controls/CheckBoxListTestCase.php | 18 +++++++------- .../quickstart/Controls/DataGrid2TestCase.php | 8 +++---- .../quickstart/Controls/DataGrid5TestCase.php | 4 ++-- .../validators/tests/ListControlTestCase.php | 28 +++++++++++----------- 4 files changed, 29 insertions(+), 29 deletions(-) (limited to 'tests/FunctionalTests') diff --git a/tests/FunctionalTests/quickstart/Controls/CheckBoxListTestCase.php b/tests/FunctionalTests/quickstart/Controls/CheckBoxListTestCase.php index 50f2545a..09c05f2f 100644 --- a/tests/FunctionalTests/quickstart/Controls/CheckBoxListTestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/CheckBoxListTestCase.php @@ -8,10 +8,10 @@ class CheckBoxListTestCase extends SeleniumTestCase $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TCheckBoxList.Home&notheme=true", ""); // Check box list with default settings: - $this->click("//input[@name='ctl0\$body\$ctl0\$0' and @value='value 1']", ""); + $this->click("//input[@name='ctl0\$body\$ctl0\$c0' and @value='value 1']", ""); // Check box list with customized cellpadding, cellspacing, color and text alignment: - $this->click("//input[@name='ctl0\$body\$ctl1\$1' and @value='value 2']", ""); + $this->click("//input[@name='ctl0\$body\$ctl1\$c1' and @value='value 2']", ""); // *** Currently unable to test the following cases: // Check box list with vertical (default) repeat direction @@ -20,33 +20,33 @@ class CheckBoxListTestCase extends SeleniumTestCase // Check box list with flow layout and horizontal repeat direction: // Check box list's behavior upon postback - $this->click("//input[@name='ctl0\$body\$CheckBoxList\$2' and @value='value 3']", ""); + $this->click("//input[@name='ctl0\$body\$CheckBoxList\$c2' and @value='value 3']", ""); $this->clickAndWait("//input[@type='submit' and @value='Submit']", ""); $this->verifyTextPresent("Your selection is: (Index: 1, Value: value 2, Text: item 2)(Index: 2, Value: value 3, Text: item 3)(Index: 4, Value: value 5, Text: item 5)", ""); // Auto postback check box list - $this->clickAndWait("//input[@name='ctl0\$body\$ctl7\$1' and @value='value 2']", ""); + $this->clickAndWait("//input[@name='ctl0\$body\$ctl7\$c1' and @value='value 2']", ""); $this->verifyTextPresent("Your selection is: (Index: 4, Value: value 5, Text: item 5)", ""); // Databind to an integer-indexed array - $this->clickAndWait("//input[@name='ctl0\$body\$DBCheckBoxList1\$1' and @value='1']", ""); + $this->clickAndWait("//input[@name='ctl0\$body\$DBCheckBoxList1\$c1' and @value='1']", ""); $this->verifyTextPresent("Your selection is: (Index: 1, Value: 1, Text: item 2)", ""); // Databind to an associative array: - $this->clickAndWait("//input[@name='ctl0\$body\$DBCheckBoxList2\$1' and @value='key 2']", ""); + $this->clickAndWait("//input[@name='ctl0\$body\$DBCheckBoxList2\$c1' and @value='key 2']", ""); $this->verifyTextPresent("Your selection is: (Index: 1, Value: key 2, Text: item 2)", ""); // Databind with DataTextField and DataValueField specified - $this->clickAndWait("//input[@name='ctl0\$body\$DBCheckBoxList3\$2' and @value='003']", ""); + $this->clickAndWait("//input[@name='ctl0\$body\$DBCheckBoxList3\$c2' and @value='003']", ""); $this->verifyTextPresent("Your selection is: (Index: 2, Value: 003, Text: Cary)", ""); // CheckBox list causing validation $this->verifyNotVisible('ctl0_body_ctl8'); - $this->click("//input[@name='ctl0\$body\$ctl9$0' and @value='Agree']", ""); + $this->click("//input[@name='ctl0\$body\$ctl9\$c0' and @value='Agree']", ""); // $this->pause(1000); $this->verifyVisible('ctl0_body_ctl8'); $this->type("ctl0\$body\$TextBox", "test"); - $this->clickAndWait("//input[@name='ctl0\$body\$ctl9$0' and @value='Agree']", ""); + $this->clickAndWait("//input[@name='ctl0\$body\$ctl9\$c0' and @value='Agree']", ""); $this->verifyNotVisible('ctl0_body_ctl8'); } } diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid2TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid2TestCase.php index 64c44fc3..919200ff 100644 --- a/tests/FunctionalTests/quickstart/Controls/DataGrid2TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/DataGrid2TestCase.php @@ -37,13 +37,13 @@ class DataGrid2TestCase extends SeleniumTestCase //$this->verifyElementPresent("//img[@src='images/star2.gif']",''); // verify toggle column visibility - $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$0' and @value='Book Title']", ""); + $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Book Title']", ""); $this->verifyTextNotPresent('Head First Design Patterns',''); - $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$3' and @value='In-stock']", ""); + $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c3' and @value='In-stock']", ""); $this->verifyElementNotPresent('ctl0_body_DataGrid_ctl1_ctl6',''); - $this->clickAndWait("//input[@name='ctl0\$body\$ctl1$3' and @value='In-stock']", ""); + $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c3' and @value='In-stock']", ""); $this->verifyElementPresent('ctl0_body_DataGrid_ctl1_ctl6',''); - $this->clickAndWait("//input[@name='ctl0\$body\$ctl1$0' and @value='Book Title']", ""); + $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Book Title']", ""); $this->verifyTextPresent('Head First Design Patterns',''); } } diff --git a/tests/FunctionalTests/quickstart/Controls/DataGrid5TestCase.php b/tests/FunctionalTests/quickstart/Controls/DataGrid5TestCase.php index 9fee059a..43882418 100644 --- a/tests/FunctionalTests/quickstart/Controls/DataGrid5TestCase.php +++ b/tests/FunctionalTests/quickstart/Controls/DataGrid5TestCase.php @@ -47,11 +47,11 @@ class DataGrid5TestCase extends SeleniumTestCase $this->verifyTextNotPresent('ITN006',''); // show top pager - $this->clickAndWait("//input[@name='ctl0\$body\$ctl1$0' and @value='Top']", ""); + $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Top']", ""); $this->clickAndWait("id=ctl0_body_DataGrid_ctl8_ctl3", ""); $this->clickAndWait("link=1", ""); // hide top pager - $this->clickAndWait("//input[@name='ctl0\$body\$ctl1$0' and @value='Top']", ""); + $this->clickAndWait("//input[@name='ctl0\$body\$ctl1\$c0' and @value='Top']", ""); // change next prev caption $this->type("ctl0\$body\$NextPageText", "Next Page"); diff --git a/tests/FunctionalTests/validators/tests/ListControlTestCase.php b/tests/FunctionalTests/validators/tests/ListControlTestCase.php index 6c0c73e7..76d84eff 100644 --- a/tests/FunctionalTests/validators/tests/ListControlTestCase.php +++ b/tests/FunctionalTests/validators/tests/ListControlTestCase.php @@ -6,43 +6,43 @@ class ListControlTestCase extends SeleniumTestCase { function test() - { + { $base = "ctl0_Content_"; $this->open("validators/index.php?page=ListControl", ""); $this->verifyTextPresent("List Control Required Field Validation Test", ""); $this->click("//input[@type='submit' and @value='Submit!']", ""); - + $this->assertVisible("{$base}validator1"); $this->assertVisible("{$base}validator2"); $this->assertVisible("{$base}validator3"); $this->assertVisible("{$base}validator4"); - - $this->click("//input[@id='{$base}list1_1' and @value='Red']", ""); + + $this->click("//input[@id='{$base}list1_c1' and @value='Red']", ""); $this->select("{$base}list2", "label=Red"); $this->select("{$base}list3", "label=Blue"); - $this->click("{$base}list4_3", ""); + $this->click("{$base}list4_c3", ""); $this->clickAndWait("//input[@type='submit' and @value='Submit!']", ""); - + $this->assertNotVisible("{$base}validator1"); $this->assertNotVisible("{$base}validator2"); $this->assertNotVisible("{$base}validator3"); $this->assertNotVisible("{$base}validator4"); - + $this->select("{$base}list3", "label=Don't select this one"); - $this->click("{$base}list4_0"); + $this->click("{$base}list4_c0"); $this->select("{$base}list2", "label=--- Select a color ---"); $this->click("//input[@type='submit' and @value='Submit!']", ""); - $this->click("//input[@id='{$base}list1_1' and @value='Red']", ""); - $this->click("//input[@id='{$base}list1_0' and @value='Select a color below']", ""); + $this->click("//input[@id='{$base}list1_c1' and @value='Red']", ""); + $this->click("//input[@id='{$base}list1_c0' and @value='Select a color below']", ""); $this->click("//input[@type='submit' and @value='Submit!']", ""); - + $this->assertVisible("{$base}validator1"); $this->assertVisible("{$base}validator2"); $this->assertVisible("{$base}validator3"); $this->assertVisible("{$base}validator4"); - - } - + + } + } ?> -- cgit v1.2.3