From 4f968c045e0d09ab3e4f659743effb5305a963ce Mon Sep 17 00:00:00 2001 From: wei <> Date: Fri, 30 Mar 2007 05:04:30 +0000 Subject: Fixed #507 and update other active controls. --- .../tickets/protected/pages/Ticket507.page | 29 ++++++++++++++++++++++ .../tickets/protected/pages/Ticket507.php | 25 +++++++++++++++++++ .../tickets/tests/Ticket507TestCase.php | 27 ++++++++++++++++++++ 3 files changed, 81 insertions(+) create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket507.page create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket507.php create mode 100644 tests/FunctionalTests/tickets/tests/Ticket507TestCase.php (limited to 'tests/FunctionalTests/tickets') diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket507.page b/tests/FunctionalTests/tickets/protected/pages/Ticket507.page new file mode 100644 index 00000000..f80dea44 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket507.page @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + +
+
+	SelectionMode="Multiple"
+	--> this doesn't work Enabled="false" 
+	--> enable selection in code but
+	--> getSelectedValues returns Null 
+	--> enabled and disbaled dynamically doesn't solved the 
+	--> problem either.
+
+
+ +
+ diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket507.php b/tests/FunctionalTests/tickets/protected/pages/Ticket507.php new file mode 100644 index 00000000..94cd8aed --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket507.php @@ -0,0 +1,25 @@ +list1->SelectionMode="Multiple"; + } + + function list1_callback($sender, $param) + { + $values = $sender->getSelectedValues(); + $this->label1->setText("Selection: ".implode(', ', $values)); + } + + function enable_list() + { + $this->list1->enabled = true; + } +} + +?> \ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket507TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket507TestCase.php new file mode 100644 index 00000000..e8ddbfce --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket507TestCase.php @@ -0,0 +1,27 @@ +open('tickets/index.php?page=Ticket507'); + $this->verifyTitle("Verifying Ticket 507", ""); + + $this->assertText("{$base}label1", "Label 1"); + + $this->click("{$base}button1"); + $this->pause(800); + + $this->select("{$base}list1", "item 1"); + $this->pause(800); + $this->assertText("{$base}label1", "Selection: value 1"); + + $this->addSelection("{$base}list1", "item 3"); + + $this->pause(800); + $this->assertText("{$base}label1", "Selection: value 1, value 3"); + } +} + +?> \ No newline at end of file -- cgit v1.2.3