diff options
author | wei <> | 2007-03-30 05:04:30 +0000 |
---|---|---|
committer | wei <> | 2007-03-30 05:04:30 +0000 |
commit | 4f968c045e0d09ab3e4f659743effb5305a963ce (patch) | |
tree | 58d5cb87db43ba87c0a559d411e9d36aa0bd7f3c /tests | |
parent | 70744a98444df0583d76f19d4e399a5cc49349b7 (diff) |
Fixed #507 and update other active controls.
Diffstat (limited to 'tests')
4 files changed, 83 insertions, 1 deletions
diff --git a/tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.page b/tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.page index a8668b79..08b7bb3e 100644 --- a/tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.page +++ b/tests/FunctionalTests/active-controls/protected/pages/CustomValidatorByPass.page @@ -5,8 +5,9 @@ <a id="showLogin" href="#" onclick="new Effect.Appear('loginBox')">Login</a>
<div id="loginBox" style="display: none;">
+ <div style="height:1em">
<div id="loginLoader" style="display: none;">Please Wait...</div>
-
+ </div>
<span>Username:</span><br />
<com:TActiveTextBox ID="Username" />
<com:TRequiredFieldValidator
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 @@ +<com:TContent ID="Content">
+
+ <com:TActiveListBox ID="list1"
+ Enabled="false"
+ OnCallback="list1_callback">
+ <com:TListItem Value="value 1" Text="item 1" />
+ <com:TListItem Value="value 2" Text="item 2" />
+ <com:TListItem Value="value 3" Text="item 3" />
+ <com:TListItem Value="value 4" Text="item 4" />
+ <com:TListItem Value="value 5" Text="item 5" />
+ </com:TActiveListBox>
+
+ <com:TActiveLabel ID="label1" Text="Label 1" />
+
+ <com:TActiveButton Text="Enable it" id="button1" onClick="enable_list" />
+
+<div>
+<pre>
+ 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.
+</pre>
+</div>
+
+</com:TContent>
+
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 @@ +<?php
+
+Prado::using('System.Web.UI.ActiveControls.*');
+class Ticket507 extends TPage
+{
+
+ public function onLoad($s)
+ {
+ //the following fixed the static declaration on the above
+ $this->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 @@ +<?php
+
+class Ticket507TestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $base='ctl0_Content_';
+ $this->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 |