summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/quickstart/Controls/CheckBoxListTestCase.php
diff options
context:
space:
mode:
authorxue <>2006-02-13 06:04:33 +0000
committerxue <>2006-02-13 06:04:33 +0000
commit934069ca2164753f72783eaa7d9fd98e4280f2ec (patch)
tree2b671bdabbe5896f2af6c766c43cacbc1f8338cc /tests/FunctionalTests/quickstart/Controls/CheckBoxListTestCase.php
parentacf77801d4066055cfc3c20e5b634722923f865f (diff)
Reorganized FT test folder.
Diffstat (limited to 'tests/FunctionalTests/quickstart/Controls/CheckBoxListTestCase.php')
-rw-r--r--tests/FunctionalTests/quickstart/Controls/CheckBoxListTestCase.php54
1 files changed, 54 insertions, 0 deletions
diff --git a/tests/FunctionalTests/quickstart/Controls/CheckBoxListTestCase.php b/tests/FunctionalTests/quickstart/Controls/CheckBoxListTestCase.php
new file mode 100644
index 00000000..783e2ccc
--- /dev/null
+++ b/tests/FunctionalTests/quickstart/Controls/CheckBoxListTestCase.php
@@ -0,0 +1,54 @@
+<?php
+
+//New Test
+class CheckBoxListTestCase extends SeleniumTestCase
+{
+ function test ()
+ {
+ $this->open("../../demos/quickstart/index.php?page=Controls.Samples.TCheckBoxList.Home&amp;notheme=true", "");
+
+ // Check box list with default settings:
+ $this->click("//input[@name='ctl0\$body\$ctl0\$0' 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']", "");
+
+ // *** Currently unable to test the following cases:
+ // Check box list with vertical (default) repeat direction
+ // Check box list with horizontal repeat direction
+ // Check box list with flow layout and vertical (default) repeat direction
+ // 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->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->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='item 2']", "");
+ $this->verifyTextPresent("Your selection is: (Index: 1, Value: item 2, Text: item 2)", "");
+
+ // Databind to an associative array:
+ $this->clickAndWait("//input[@name='ctl0\$body\$DBCheckBoxList2\$1' 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->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->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->verifyNotVisible('ctl0_body_ctl8');
+ }
+}
+
+?> \ No newline at end of file