summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket691.page22
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket691.php13
-rw-r--r--tests/FunctionalTests/tickets/tests/Ticket691TestCase.php17
3 files changed, 52 insertions, 0 deletions
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket691.page b/tests/FunctionalTests/tickets/protected/pages/Ticket691.page
new file mode 100644
index 00000000..602f223a
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket691.page
@@ -0,0 +1,22 @@
+
+<com:TContent ID="Content">
+<com:TCallbackOptions ID="RatingOption">
+
+ <prop:ClientSide.OnComplete>
+ $('<%=$this->Title->ClientID%>').innerHTML = 'Thanks';
+ </prop:ClientSide.OnComplete>
+</com:TCallbackOptions>
+<com:TActiveLabel ID="Title" Text="Cast your vote:" />
+<com:TActiveRatingList ID="List" ActiveControl.CallbackOptions="RatingOption"
+ OnCallback="list_oncallback" ActiveControl.EnableUpdate="true">
+ <com:TListItem Value="1" Text="[One star" />
+ <com:TListItem Value="2" Text="[Two stars" />
+ <com:TListItem Value="3" Text="[Three stars" />
+ <com:TListItem Value="4" Text="[Four stars" />
+ <com:TListItem Value="5" Text="Five stars" />
+ <com:TListItem Value="6" Text="Six stars" />
+</com:TActiveRatingList>
+<com:TActiveLabel ID="Result"/>
+
+
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket691.php b/tests/FunctionalTests/tickets/protected/pages/Ticket691.php
new file mode 100644
index 00000000..a47a6a9d
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket691.php
@@ -0,0 +1,13 @@
+<?php
+
+prado::using ('System.Web.UI.ActiveControls.*');
+
+class Ticket691 extends TPage
+{
+ public function list_oncallback ($sender, $param)
+ {
+ $sender->Rating=$sender->SelectedIndex+1;
+ $this->Result->Text="You vote ".$sender->Rating;
+ }
+}
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/tests/Ticket691TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket691TestCase.php
new file mode 100644
index 00000000..12371e74
--- /dev/null
+++ b/tests/FunctionalTests/tickets/tests/Ticket691TestCase.php
@@ -0,0 +1,17 @@
+<?php
+class Ticket691TestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $base = 'ctl0_Content_';
+ $this->open('tickets/index.php?page=Ticket691');
+ $this->assertTitle("Verifying Ticket 691");
+
+ $this->click($base."List_c2");
+ $this->pause(800);
+ $this->assertText($base."Title", "Thanks");
+ $this->assertText($base."Result", "You vote 3");
+ }
+
+}
+?> \ No newline at end of file