summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php')
-rw-r--r--tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php47
1 files changed, 47 insertions, 0 deletions
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php
new file mode 100644
index 00000000..386caa55
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/tests/ActiveRadioButtonListTestCase.php
@@ -0,0 +1,47 @@
+<?php
+
+class ActiveRadioButtonListTestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $this->open("active-controls/index.php?page=ActiveRadioButtonListTest");
+ $this->verifyTextPresent("TActiveRadioButtonList Test Case");
+
+ $this->assertText("label1", "Label 1");
+
+
+ $this->click("button3");
+ $this->pause(800);
+ $this->assertCheckBoxes(array(0));
+
+ $this->click("button2");
+ $this->pause(800);
+ $this->assertCheckBoxes(array());
+
+ $this->click("button4");
+ $this->pause(800);
+ $this->assertCheckBoxes(array(4));
+
+ $this->click("list1_c2");
+ $this->pause(800);
+ $this->assertText("label1", "Selection: value 3");
+
+ $this->click("list1_c3");
+ $this->pause(800);
+ $this->assertText("label1", "Selection: value 4");
+
+ }
+
+ function assertCheckBoxes($checks, $total = 5)
+ {
+ for($i = 0; $i < $total; $i++)
+ {
+ if(in_array($i, $checks))
+ $this->assertChecked("list1_c{$i}");
+ else
+ $this->assertNotChecked("list1_c{$i}");
+ }
+ }
+}
+
+?> \ No newline at end of file