summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests
diff options
context:
space:
mode:
authorchristophe.boulain <>2008-12-03 14:22:03 +0000
committerchristophe.boulain <>2008-12-03 14:22:03 +0000
commit6228873cf9d6471463d2413e7dfd7447f759baf2 (patch)
tree496a0e658330c39d4caa35602ba9f783b6f24f9c /tests/FunctionalTests
parente8f239fea7351b248302a593a8e5eaa2a88c3e80 (diff)
Merge from trunk
Diffstat (limited to 'tests/FunctionalTests')
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page17
-rwxr-xr-xtests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.php42
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.page14
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.php27
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.page16
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.php27
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.page12
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.php23
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.page17
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.php37
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.page14
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.php27
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.page17
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.php32
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.page17
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.php38
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.page17
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.php32
-rw-r--r--tests/FunctionalTests/active-controls/protected/pages/RatingList.page13
-rwxr-xr-xtests/FunctionalTests/active-controls/tests/ActiveDatePickerTestCase.php97
-rw-r--r--tests/FunctionalTests/active-controlstests/ActiveRatingListTestCase.php253
-rw-r--r--tests/FunctionalTests/tickets/protected/application.xml3
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket284Component.php11
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket900.page45
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket900.php58
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket922.page12
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket922.php13
-rwxr-xr-xtests/FunctionalTests/tickets/protected/pages/Ticket925.page11
-rwxr-xr-xtests/FunctionalTests/tickets/protected/pages/Ticket925.php76
-rw-r--r--tests/FunctionalTests/tickets/tests/Ticket595TestCase.php4
-rw-r--r--tests/FunctionalTests/tickets/tests/Ticket900TestCase.php19
-rw-r--r--tests/FunctionalTests/tickets/tests/Ticket922TestCase.php18
32 files changed, 1043 insertions, 16 deletions
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page
new file mode 100755
index 00000000..ed35293e
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.page
@@ -0,0 +1,17 @@
+<html>
+<com:THead/>
+<body>
+<com:TForm>
+<h1>TActiveDatePicker test</h1>
+<p>
+<com:TActiveDatePicker ID="datepicker" DateFormat="MM-dd-yyyy" OnCallback="testDatePicker"/>
+<com:TActiveLabel ID="status" /><br/>
+<com:TActiveButton ID="decreaseButton" OnClick="decrease" Text="-1" OnCallback="testDatePicker"/>
+<com:TActiveButton ID="todayButton" OnClick="today" Text="Today" OnCallback="testDatePicker"/>
+<com:TActiveButton ID="increaseButton" OnClick="increase" Text="+1" OnCallback="testDatePicker"/>
+<com:TButton ID="toggleButton" OnClick="toggleMode" Text="Toggle input mode (postback)"/>
+</p>
+
+</com:TForm>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.php
new file mode 100755
index 00000000..6d78a664
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveDatePicker.php
@@ -0,0 +1,42 @@
+<?php
+
+prado::using('System.Web.UI.ActiveControls.*');
+
+class ActiveDatePicker extends TPage {
+
+ public function onLoad($param){
+ parent::onLoad($param);
+ if(!$this->IsPostBack)
+ $this->datepicker->setTimeStamp(time());
+ }
+
+ public function testDatePicker($sender, $param){
+ $this->status->Text = $this->datepicker->getText();
+ }
+
+ public function today ($sender, $param)
+ {
+ $this->datepicker->setTimestamp(time());
+ }
+
+ public function increase ($sender, $param)
+ {
+ $this->datepicker->setTimestamp(strtotime('+1 day', $this->datepicker->getTimestamp()));
+ }
+ public function decrease ($sender, $param)
+ {
+ $this->datepicker->setTimestamp(strtotime('-1 day', $this->datepicker->getTimestamp()));
+ }
+
+ public function toggleMode ($sender, $param)
+ {
+ if ($this->datepicker->getInputMode()==TDatePickerInputMode::DropDownList)
+ $this->datepicker->setInputMode(TDatePickerInputMode::TextBox);
+ else
+ $this->datepicker->setInputMode(TDatePickerInputMode::DropDownList);
+ }
+
+ }
+
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.page
new file mode 100644
index 00000000..35fcadc7
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.page
@@ -0,0 +1,14 @@
+<com:THead />
+<com:TForm ID="form1">
+ <h1>TActiveRatingList AllowInput Test Case</h1>
+ <com:TActiveRatingList ID="RatingList" AllowInput="false"
+ OnSelectedIndexChanged="ratingChanged">
+ <com:TListItem Text="Poor" />
+ <com:TListItem Text="Fair" />
+ <com:TListItem Text="Average" />
+ <com:TListItem Text="Good" Selected="true" />
+ <com:TListItem Text="Excellent" />
+ <com:TListItem Text="Super" />
+ </com:TActiveRatingList>
+ <com:TActiveLabel ID="Status" Text="AllowInput=false" />
+</com:TForm> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.php
new file mode 100644
index 00000000..c825f3f8
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAllowInputTest.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * TRatingListTest.php
+ *
+ * @author Bradley Booms <Bradley.Booms@nsighttel.com>
+ * @version Creation Date: Oct 13, 2008
+ */
+
+/**
+ * TRatingListTest.php class
+ *
+ *
+ *
+ * Properties
+ * -
+ *
+ * @author Bradley Booms <Bradley.Booms@nsighttel.com>
+ * @version Modified Date: Oct 13, 2008
+ *
+ * Modifications:
+ */
+class ActiveRatingListAllowInputTest extends TPage{
+ public function ratingChanged($sender, $param){
+ $this->Status->setText($sender->getRating().' : '.$sender->getSelectedValue());
+ }
+}
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.page
new file mode 100644
index 00000000..84ce4ef3
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.page
@@ -0,0 +1,16 @@
+<com:THead />
+<com:TForm ID="form1">
+ <h1>TActiveRatingList AutoPostBack Test Case</h1>
+ <com:TActiveRatingList ID="RatingList" AutoPostback="false"
+ OnSelectedIndexChanged="ratingChanged">
+ <com:TListItem Text="Poor" />
+ <com:TListItem Text="Fair" Selected="true" />
+ <com:TListItem Text="Average" />
+ <com:TListItem Text="Good" />
+ <com:TListItem Text="Excellent" />
+ <com:TListItem Text="Super" />
+ </com:TActiveRatingList>
+ <com:TActiveLabel ID="Status" Text="AutoPostback=false" />
+ <br />
+ <com:TActiveButton ID="Submit" Text="Submit" />
+</com:TForm> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.php
new file mode 100644
index 00000000..4b087b76
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListAutoPostBackTest.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * TRatingListTest.php
+ *
+ * @author Bradley Booms <Bradley.Booms@nsighttel.com>
+ * @version Creation Date: Oct 13, 2008
+ */
+
+/**
+ * TRatingListTest.php class
+ *
+ *
+ *
+ * Properties
+ * -
+ *
+ * @author Bradley Booms <Bradley.Booms@nsighttel.com>
+ * @version Modified Date: Oct 13, 2008
+ *
+ * Modifications:
+ */
+class ActiveRatingListAutoPostBackTest extends TPage{
+ public function ratingChanged($sender, $param){
+ $this->Status->setText($sender->getRating().' : '.$sender->getSelectedValue());
+ }
+}
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.page
new file mode 100644
index 00000000..36f4404d
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.page
@@ -0,0 +1,12 @@
+<com:THead />
+<com:TForm ID="form1">
+ <h1>TActiveRatingList Check Boxes Test Case</h1>
+ <com:TActiveRatingList ID="RatingList">
+ <com:TListItem Text="Poor" />
+ <com:TListItem Text="Fair" />
+ <com:TListItem Text="Average" Selected="true" />
+ <com:TListItem Text="Good" />
+ <com:TListItem Text="Excellent" />
+ <com:TListItem Text="Super" />
+ </com:TActiveRatingList>
+</com:TForm> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.php
new file mode 100644
index 00000000..5c6dfa70
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListCheckBoxesTest.php
@@ -0,0 +1,23 @@
+<?php
+/**
+ * TRatingListTest.php
+ *
+ * @author Bradley Booms <Bradley.Booms@nsighttel.com>
+ * @version Creation Date: Oct 13, 2008
+ */
+
+/**
+ * TRatingListTest.php class
+ *
+ *
+ *
+ * Properties
+ * -
+ *
+ * @author Bradley Booms <Bradley.Booms@nsighttel.com>
+ * @version Modified Date: Oct 13, 2008
+ *
+ * Modifications:
+ */
+class ActiveRatingListCheckBoxesTest extends TPage{ }
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.page
new file mode 100644
index 00000000..5f732e0d
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.page
@@ -0,0 +1,17 @@
+<com:THead />
+<com:TForm ID="form1">
+ <h1>TActiveRatingList Enabled Test Case</h1>
+ <com:TActiveRatingList ID="RatingList" Enabled="false"
+ OnSelectedIndexChanged="ratingChanged">
+ <com:TListItem Text="Poor" />
+ <com:TListItem Text="Fair" />
+ <com:TListItem Text="Average" />
+ <com:TListItem Text="Good" />
+ <com:TListItem Text="Excellent" />
+ <com:TListItem Text="Super" Selected="true" />
+ </com:TActiveRatingList>
+ <com:TActiveLabel ID="Status" Text="Enabled=false" />
+ <br />
+ <com:TActiveButton ID="Enable" Text="Enable" OnClick="enable" />
+ <com:TActiveButton ID="Disable" Text="Disable" OnClick="disable" />
+</com:TForm> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.php
new file mode 100644
index 00000000..0cac7418
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListEnabledTest.php
@@ -0,0 +1,37 @@
+<?php
+/**
+ * TRatingListTest.php
+ *
+ * @author Bradley Booms <Bradley.Booms@nsighttel.com>
+ * @version Creation Date: Oct 13, 2008
+ */
+
+/**
+ * TRatingListTest.php class
+ *
+ *
+ *
+ * Properties
+ * -
+ *
+ * @author Bradley Booms <Bradley.Booms@nsighttel.com>
+ * @version Modified Date: Oct 13, 2008
+ *
+ * Modifications:
+ */
+class ActiveRatingListEnabledTest extends TPage{
+ public function ratingChanged($sender, $param){
+ $this->Status->setText($sender->getRating().' : '.$sender->getSelectedValue());
+ }
+
+ public function enable($sender, $param){
+ $this->RatingList->setEnabled(true);
+ $this->Status->setText('Enabled=true');
+ }
+
+ public function disable($sender, $param){
+ $this->RatingList->setEnabled(false);
+ $this->Status->setText('Enabled=false');
+ }
+}
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.page
new file mode 100644
index 00000000..01e47a34
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.page
@@ -0,0 +1,14 @@
+<com:THead />
+<com:TForm ID="form1">
+ <h1>TActiveRatingList Hover Caption Test Case</h1>
+ <com:TActiveRatingList ID="RatingList" CaptionID="Status"
+ OnSelectedIndexChanged="ratingChanged" Rating="3.5">
+ <com:TListItem Text="Poor" />
+ <com:TListItem Text="Fair" />
+ <com:TListItem Text="Average" />
+ <com:TListItem Text="Good" />
+ <com:TListItem Text="Excellent" />
+ <com:TListItem Text="Super" />
+ </com:TActiveRatingList>
+ <com:TActiveLabel ID="Status" Text="CaptionID='Status'" />
+</com:TForm> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.php
new file mode 100644
index 00000000..06d82d39
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListHoverCaptionTest.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * TRatingListTest.php
+ *
+ * @author Bradley Booms <Bradley.Booms@nsighttel.com>
+ * @version Creation Date: Oct 13, 2008
+ */
+
+/**
+ * TRatingListTest.php class
+ *
+ *
+ *
+ * Properties
+ * -
+ *
+ * @author Bradley Booms <Bradley.Booms@nsighttel.com>
+ * @version Modified Date: Oct 13, 2008
+ *
+ * Modifications:
+ */
+class ActiveRatingListHoverCaptionTest extends TPage{
+ public function ratingChanged($sender, $param){
+ $sender->setCaption($sender->getRating().' : '.$sender->getSelectedValue());
+ }
+}
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.page
new file mode 100644
index 00000000..942a5b45
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.page
@@ -0,0 +1,17 @@
+<com:THead />
+<com:TForm ID="form1">
+ <h1>TActiveRatingList Rating Test Case</h1>
+ <com:TActiveRatingList ID="RatingList" Rating="5"
+ OnSelectedIndexChanged="ratingChanged">
+ <com:TListItem Text="Poor" />
+ <com:TListItem Text="Fair" />
+ <com:TListItem Text="Average" />
+ <com:TListItem Text="Good" />
+ <com:TListItem Text="Excellent" />
+ <com:TListItem Text="Super" />
+ </com:TActiveRatingList>
+ <com:TActiveLabel ID="Status" Text="Rating: 5" />
+ <br />
+ <com:TActiveButton ID="SetRating" Text="Set Rating=3"
+ OnClick="setRating" />
+</com:TForm> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.php
new file mode 100644
index 00000000..fe5c8404
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListRatingTest.php
@@ -0,0 +1,32 @@
+<?php
+/**
+ * TRatingListTest.php
+ *
+ * @author Bradley Booms <Bradley.Booms@nsighttel.com>
+ * @version Creation Date: Oct 13, 2008
+ */
+
+/**
+ * TRatingListTest.php class
+ *
+ *
+ *
+ * Properties
+ * -
+ *
+ * @author Bradley Booms <Bradley.Booms@nsighttel.com>
+ * @version Modified Date: Oct 13, 2008
+ *
+ * Modifications:
+ */
+class ActiveRatingListRatingTest extends TPage{
+ public function ratingChanged($sender, $param){
+ $this->Status->setText('Rating: '.$sender->getRating());
+ }
+
+ public function setRating($sender, $param){
+ $this->RatingList->setRating(3);
+ $this->ratingChanged($this->RatingList, null);
+ }
+}
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.page
new file mode 100644
index 00000000..dad3fd6e
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.page
@@ -0,0 +1,17 @@
+<com:THead />
+<com:TForm ID="form1">
+ <h1>TActiveRatingList ReadOnly Test Case</h1>
+ <com:TActiveRatingList ID="RatingList" ReadOnly="true"
+ OnSelectedIndexChanged="ratingChanged">
+ <com:TListItem Text="Poor" Selected="true" />
+ <com:TListItem Text="Fair" />
+ <com:TListItem Text="Average" />
+ <com:TListItem Text="Good" />
+ <com:TListItem Text="Excellent" />
+ <com:TListItem Text="Super" />
+ </com:TActiveRatingList>
+ <com:TActiveLabel ID="Status" Text="ReadOnly=true" />
+ <br />
+ <com:TActiveButton ID="Writable" Text="Writable" OnClick="writable" />
+ <com:TActiveButton ID="ReadOnly" Text="ReadOnly" OnClick="readOnly" />
+</com:TForm> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.php
new file mode 100644
index 00000000..070fd13f
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListReadOnlyTest.php
@@ -0,0 +1,38 @@
+<?php
+/**
+ * TRatingListTest.php
+ *
+ * @author Bradley Booms <Bradley.Booms@nsighttel.com>
+ * @version Creation Date: Oct 13, 2008
+ */
+
+/**
+ * TRatingListTest.php class
+ *
+ *
+ *
+ * Properties
+ * -
+ *
+ * @author Bradley Booms <Bradley.Booms@nsighttel.com>
+ * @version Modified Date: Oct 13, 2008
+ *
+ * Modifications:
+ */
+class ActiveRatingListReadOnlyTest extends TPage{
+ public function ratingChanged($sender, $param){
+ $this->Status->setText($sender->getRating().' : '.$sender->getSelectedValue());
+ }
+
+ public function readOnly($sender, $param){
+ $this->RatingList->setReadOnly(true);
+ $this->Status->setText('ReadOnly=true');
+ }
+
+ public function writable($sender, $param){
+ $this->RatingList->setReadOnly(false);
+ $this->Status->setText('ReadOnly=false');
+ }
+
+}
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.page b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.page
new file mode 100644
index 00000000..6fb52822
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.page
@@ -0,0 +1,17 @@
+<com:THead />
+<com:TForm ID="form1">
+ <h1>TActiveRatingList SelectedIndex Test Case</h1>
+ <com:TActiveRatingList ID="RatingList" SelectedIndex="1"
+ OnSelectedIndexChanged="ratingChanged">
+ <com:TListItem Text="Poor" />
+ <com:TListItem Text="Fair" />
+ <com:TListItem Text="Average" />
+ <com:TListItem Text="Good" />
+ <com:TListItem Text="Excellent" />
+ <com:TListItem Text="Super" />
+ </com:TActiveRatingList>
+ <com:TActiveLabel ID="Status" Text="SelectedIndex: 1" />
+ <br />
+ <com:TActiveButton ID="SetSelectedIndex" Text="Set SelectedIndex=5"
+ OnClick="setSelectedIndex" />
+</com:TForm> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.php b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.php
new file mode 100644
index 00000000..4dbc6949
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/protected/pages/ActiveRatingListSelectedIndexTest.php
@@ -0,0 +1,32 @@
+<?php
+/**
+ * TRatingListTest.php
+ *
+ * @author Bradley Booms <Bradley.Booms@nsighttel.com>
+ * @version Creation Date: Oct 13, 2008
+ */
+
+/**
+ * TRatingListTest.php class
+ *
+ *
+ *
+ * Properties
+ * -
+ *
+ * @author Bradley Booms <Bradley.Booms@nsighttel.com>
+ * @version Modified Date: Oct 13, 2008
+ *
+ * Modifications:
+ */
+class ActiveRatingListSelectedIndexTest extends TPage{
+ public function ratingChanged($sender, $param){
+ $this->Status->setText('SelectedIndex: '.$sender->getSelectedIndex());
+ }
+
+ public function setSelectedIndex($sender, $param){
+ $this->RatingList->setSelectedIndex(5);
+ $this->ratingChanged($this->RatingList, null);
+ }
+}
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controls/protected/pages/RatingList.page b/tests/FunctionalTests/active-controls/protected/pages/RatingList.page
index f9be4aee..ba9c2e5d 100644
--- a/tests/FunctionalTests/active-controls/protected/pages/RatingList.page
+++ b/tests/FunctionalTests/active-controls/protected/pages/RatingList.page
@@ -3,22 +3,11 @@
<style>
.more td
{
+ background-position: 10px 10px;
border: 1px solid #eee;
width: 40px;
height: 40px;
}
- .more td.rating
- {
- background-position: 10px 10px;
- }
- .more td.rating_selected
- {
- background-position: 10px -90px;
- }
- .more td.rating_hover
- {
- background-position: 10px -290px;
- }
</style>
<com:TLabel ID="label1" Text="Rate It:" />
diff --git a/tests/FunctionalTests/active-controls/tests/ActiveDatePickerTestCase.php b/tests/FunctionalTests/active-controls/tests/ActiveDatePickerTestCase.php
new file mode 100755
index 00000000..b8e9594e
--- /dev/null
+++ b/tests/FunctionalTests/active-controls/tests/ActiveDatePickerTestCase.php
@@ -0,0 +1,97 @@
+<?php
+class ActiveDatePickerTestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $this->open("active-controls/index.php?page=ActiveDatePicker");
+ $this->verifyTextPresent("TActiveDatePicker test");
+ $this->verifyText("status", "");
+ $this->verifyValue("datepicker", date('m-d-Y'));
+ $this->click("increaseButton");
+ $this->pause(800);
+ $this->verifyValue("datepicker", date('m-d-Y', strtotime('+ 1 day')));
+ $this->verifyText("status", date('m-d-Y', strtotime('+ 1 day')));
+ $this->click("increaseButton");
+ $this->pause(800);
+ $this->verifyValue("datepicker", date('m-d-Y', strtotime('+ 2 day')));
+ $this->verifyText("status", date('m-d-Y', strtotime('+ 2 day')));
+ $this->click("todayButton");
+ $this->pause(800);
+ $this->verifyValue("datepicker", date('m-d-Y'));
+ $this->verifyText("status", date('m-d-Y'));
+ $this->click("decreaseButton");
+ $this->pause(800);
+ $this->verifyValue("datepicker", date('m-d-Y', strtotime('- 1 day')));
+ $this->verifyText("status", date('m-d-Y', strtotime('- 1 day')));
+ $this->click("datepicker");
+ $this->pause(800);
+ $this->click("css=input.todayButton");
+ $this->pause(800);
+ $this->verifyValue("datepicker", date('m-d-Y'));
+ $this->verifyText("status", date('m-d-Y'));
+ $this->click("css=input.nextMonthButton");
+ $this->pause(800);
+ $this->verifyValue("datepicker", date('m-d-Y', strtotime('+ 1 month')));
+ $this->verifyText("status", date('m-d-Y', strtotime('+1 month')));
+
+ $this->click('toggleButton');
+ $this->pause(1000);
+
+ $this->click("todayButton");
+ $this->pause(800);
+ $this->verifySelected("datepicker_month", date('m'));
+ $this->verifyText("status", date('m-d-Y'));
+
+ $this->click("increaseButton");
+ $this->pause(800);
+ $dateToCheck=strtotime('+ 1 day');
+ $this->verifySelected("datepicker_month", date('m', $dateToCheck));
+ $this->verifySelected("datepicker_day", date('d', $dateToCheck));
+ $this->verifySelected("datepicker_year", date('Y', $dateToCheck));
+ $this->verifyText("status", date('m-d-Y', $dateToCheck));
+
+ $this->click("increaseButton");
+ $this->pause(800);
+ $dateToCheck=strtotime('+ 2 day');
+ $this->verifySelected("datepicker_month", date('m', $dateToCheck));
+ $this->verifySelected("datepicker_day", date('d', $dateToCheck));
+ $this->verifySelected("datepicker_year", date('Y', $dateToCheck));
+ $this->verifyText("status", date('m-d-Y', $dateToCheck));
+
+ $this->click("todayButton");
+ $this->pause(800);
+ $dateToCheck=time();
+ $this->verifySelected("datepicker_month", date('m', $dateToCheck));
+ $this->verifySelected("datepicker_day", date('d', $dateToCheck));
+ $this->verifySelected("datepicker_year", date('Y', $dateToCheck));
+ $this->verifyText("status", date('m-d-Y', $dateToCheck));
+
+ $this->click("decreaseButton");
+ $this->pause(800);
+ $dateToCheck=strtotime('- 1 day');
+ $this->verifySelected("datepicker_month", date('m', $dateToCheck));
+ $this->verifySelected("datepicker_day", date('d', $dateToCheck));
+ $this->verifySelected("datepicker_year", date('Y', $dateToCheck));
+ $this->verifyText("status", date('m-d-Y', $dateToCheck));
+
+ $this->click("datepickerbutton");
+ $this->pause(800);
+ $this->click("css=input.todayButton");
+ $this->pause(800);
+ $dateToCheck=time();
+ $this->verifySelected("datepicker_month", date('m', $dateToCheck));
+ $this->verifySelected("datepicker_day", date('d', $dateToCheck));
+ $this->verifySelected("datepicker_year", date('Y', $dateToCheck));
+ $this->verifyText("status", date('m-d-Y', $dateToCheck));
+
+ $this->click("css=input.nextMonthButton");
+ $this->pause(800);
+ $dateToCheck=strtotime('+ 1 month');
+ $this->verifySelected("datepicker_month", date('m', $dateToCheck));
+ $this->verifySelected("datepicker_day", date('d', $dateToCheck));
+ $this->verifySelected("datepicker_year", date('Y', $dateToCheck));
+ $this->verifyText("status", date('m-d-Y', $dateToCheck));
+ }
+}
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/active-controlstests/ActiveRatingListTestCase.php b/tests/FunctionalTests/active-controlstests/ActiveRatingListTestCase.php
new file mode 100644
index 00000000..c6dc50c2
--- /dev/null
+++ b/tests/FunctionalTests/active-controlstests/ActiveRatingListTestCase.php
@@ -0,0 +1,253 @@
+<?php
+/**
+ * ActiveRatingListTestCase.php
+ *
+ * @author Bradley Booms <Bradley.Booms@nsighttel.com>
+ * @version Creation Date: Oct 22, 2008
+ */
+
+/**
+ * ActiveRatingListTestCase.php class
+ *
+ *
+ *
+ * Properties
+ * -
+ *
+ * @author Bradley Booms <Bradley.Booms@nsighttel.com>
+ * @version Modified Date: Oct 22, 2008
+ *
+ * Modifications:
+ */
+class ActiveRatingListTestCase extends SeleniumTestCase
+{
+ function testCheckBoxes()
+ {
+ // Verify we're on the right page.
+ $this->open("active-controls/index.php?page=ActiveRatingListCheckBoxesTest");
+ $this->verifyTextPresent("TActiveRatingList Check Boxes Test Case");
+ $this->assertCheckBoxes("RatingList", array(2), 6);
+
+ // Change the list and make sure the radio buttons get updated properly.
+ $this->clickTD("RatingList_c4");
+ $this->pause(800);
+ $this->assertCheckBoxes("RatingList", array(4), 6);
+
+ $this->clickTD("RatingList_c2");
+ $this->pause(800);
+ $this->assertCheckBoxes("RatingList", array(2), 6);
+ }
+
+ function testRating()
+ {
+ // Verify we're on the right page.
+ $this->open("active-controls/index.php?page=ActiveRatingListRatingTest");
+ $this->verifyTextPresent("TActiveRatingList Rating Test Case");
+
+ // Check the list, make sure it starts out with 5 stars.
+ $this->assertText("Status", "Rating: 5");
+
+ // Click on 1 star and make sure the Rating property updates.
+ $this->clickTD("RatingList_c0");
+ $this->pause(800);
+ $this->assertText("Status", "Rating: 1");
+
+ // Then set Rating to three on the server side and make sure it's correct.
+ $this->click("SetRating");
+ $this->pause(800);
+ $this->assertText("Status", "Rating: 3");
+ }
+
+ function testSelectedIndex()
+ {
+ // Verify we're on the right page.
+ $this->open("active-controls/index.php?page=ActiveRatingListSelectedIndexTest");
+ $this->verifyTextPresent("TActiveRatingList SelectedIndex Test Case");
+ $this->assertText("Status", " SelectedIndex: 1");
+
+ // Click on 5 stars and make sure the SelectedIndex property updates.
+ $this->clickTD("RatingList_c4");
+ $this->pause(800);
+ $this->assertText("Status", " SelectedIndex: 4");
+
+ // Then set SelectedIndex to 5 on the server side and make sure it's correct.
+ $this->click("SetSelectedIndex");
+ $this->pause(800);
+ $this->assertText("Status", " SelectedIndex: 5");
+ }
+
+ function testAutoPostBack()
+ {
+ // Verify we're on the right page.
+ $this->open("active-controls/index.php?page=ActiveRatingListAutoPostBackTest");
+ $this->verifyTextPresent("TActiveRatingList AutoPostBack Test Case");
+ $this->assertText("Status", "AutoPostback=false");
+
+ // Make sure that it doesn't auto post when clicked.
+ $this->clickTD("RatingList_c3");
+ $this->pause(800);
+ $this->assertText("Status", "AutoPostback=false");
+
+ // Then submit with an active button and make sure it updates.
+ $this->click("Submit");
+ $this->pause(800);
+ $this->assertText("Status", "4 : Good");
+ }
+
+ function testAllowInput()
+ {
+ // Verify we're on the right page.
+ $this->open("active-controls/index.php?page=ActiveRatingListAllowInputTest");
+ $this->verifyTextPresent("TActiveRatingList AllowInput Test Case");
+ $this->assertText("Status", "AllowInput=false");
+ $this->assertCheckBoxes("RatingList", array(3), 6);
+
+ // Make sure that clicking doesn't change anything.
+ $this->clickTD("RatingList_c5");
+ $this->pause(800);
+ $this->assertText("Status", "AllowInput=false");
+ $this->assertCheckBoxes("RatingList", array(3), 6);
+ }
+
+ function testReadOnly()
+ {
+ // Verify we're on the right page.
+ $this->open("active-controls/index.php?page=ActiveRatingListReadOnlyTest");
+ $this->verifyTextPresent("TActiveRatingList ReadOnly Test Case");
+ $this->assertText("Status", "ReadOnly=true");
+ $this->assertCheckBoxes("RatingList", array(0), 6);
+
+ $this->clickTD("RatingList_c4");
+ $this->pause(800);
+ $this->assertText("Status", "ReadOnly=true");
+ $this->assertCheckBoxes("RatingList", array(0), 6);
+
+ // Then set ReadOnly to false, and make sure it works.
+ $this->click("Writable");
+ $this->pause(800);
+ $this->assertText("Status", "ReadOnly=false");
+ $this->assertCheckBoxes("RatingList", array(0), 6);
+
+
+ $this->clickTD("RatingList_c1");
+ $this->pause(800);
+ $this->assertText("Status", "2 : Fair");
+ $this->assertCheckBoxes("RatingList", array(1), 6);
+
+ // Then set ReadOnly to true, and make sure it doesn't work anymore.
+ $this->click("ReadOnly");
+ $this->pause(800);
+ $this->assertText("Status", "ReadOnly=true");
+ $this->assertCheckBoxes("RatingList", array(1), 6);
+
+
+ $this->clickTD("RatingList_c2");
+ $this->pause(800);
+ $this->assertText("Status", "ReadOnly=true");
+ $this->assertCheckBoxes("RatingList", array(1), 6);
+ }
+
+ function testEnabled()
+ {
+ // Verify we're on the right page.
+ $this->open("active-controls/index.php?page=ActiveRatingListEnabledTest");
+ $this->verifyTextPresent("TActiveRatingList Enabled Test Case");
+ $this->assertText("Status", "Enabled=false");
+ $this->assertCheckBoxes("RatingList", array(5), 6);
+
+ $this->clickTD("RatingList_c4");
+ $this->pause(800);
+ $this->assertText("Status", "Enabled=false");
+ $this->assertCheckBoxes("RatingList", array(5), 6);
+
+ // Then set Enable to true, and make sure it works.
+ $this->click("Enable");
+ $this->pause(800);
+ $this->assertText("Status", "Enabled=true");
+ $this->assertCheckBoxes("RatingList", array(5), 6);
+
+
+ $this->clickTD("RatingList_c3");
+ $this->pause(800);
+ $this->assertText("Status", "4 : Good");
+ $this->assertCheckBoxes("RatingList", array(3), 6);
+
+ // Then set Enable to false, and make sure it doesn't work anymore.
+ $this->click("Disable");
+ $this->pause(800);
+ $this->assertText("Status", "Enabled=false");
+ $this->assertCheckBoxes("RatingList", array(3), 6);
+
+
+ $this->clickTD("RatingList_c5");
+ $this->pause(800);
+ $this->assertText("Status", "Enabled=false");
+ $this->assertCheckBoxes("RatingList", array(3), 6);
+ }
+
+ function testHoverCaption()
+ {
+ // Verify we're on the right page.
+ $this->open("active-controls/index.php?page=ActiveRatingListHoverCaptionTest");
+ $this->verifyTextPresent("TActiveRatingList Hover Caption Test Case");
+ $this->assertText("Status", "CaptionID='Status'");
+ $this->assertElementPresent("//input[@id='RatingList_c0']/../..[contains(@class, 'rating_selected')]");
+ $this->assertElementPresent("//input[@id='RatingList_c1']/../..[contains(@class, 'rating_selected')]");
+ $this->assertElementPresent("//input[@id='RatingList_c2']/../..[contains(@class, 'rating_selected')]");
+ $this->assertElementPresent("//input[@id='RatingList_c3']/../..[contains(@class, 'rating_half')]");
+ $this->assertElementPresent("//input[@id='RatingList_c3']/../..[contains(@class, 'rating')]");
+ $this->assertElementPresent("//input[@id='RatingList_c4']/../..[contains(@class, 'rating')]");
+ $this->assertElementPresent("//input[@id='RatingList_c5']/../..[contains(@class, 'rating')]");
+
+ $this->mouseOver("//input[@id='RatingList_c4']/../../");
+ $this->assertText("Status", "Excellent");
+ $this->assertElementPresent("//input[@id='RatingList_c0']/../..[contains(@class, 'rating_hover')]");
+ $this->assertElementPresent("//input[@id='RatingList_c1']/../..[contains(@class, 'rating_hover')]");
+ $this->assertElementPresent("//input[@id='RatingList_c2']/../..[contains(@class, 'rating_hover')]");
+ $this->assertElementPresent("//input[@id='RatingList_c3']/../..[contains(@class, 'rating_hover')]");
+ $this->assertElementPresent("//input[@id='RatingList_c4']/../..[contains(@class, 'rating_hover')]");
+ $this->assertElementNotPresent("//input[@id='RatingList_c5']/../..[contains(@class, 'rating_hover')]");
+ $this->assertElementPresent("//input[@id='RatingList_c5']/../..[contains(@class, 'rating')]");
+
+ $this->mouseOut("//input[@id='RatingList_c4']/../../");
+ $this->assertText("Status", "CaptionID='Status'");
+ $this->assertElementPresent("//input[@id='RatingList_c0']/../..[contains(@class, 'rating_selected')]");
+ $this->assertElementPresent("//input[@id='RatingList_c1']/../..[contains(@class, 'rating_selected')]");
+ $this->assertElementPresent("//input[@id='RatingList_c2']/../..[contains(@class, 'rating_selected')]");
+ $this->assertElementNotPresent("//input[@id='RatingList_c3']/../..[contains(@class, 'rating_selected')]");
+ $this->assertElementPresent("//input[@id='RatingList_c3']/../..[contains(@class, 'rating')]");
+ $this->assertElementPresent("//input[@id='RatingList_c4']/../..[contains(@class, 'rating')]");
+ $this->assertElementPresent("//input[@id='RatingList_c5']/../..[contains(@class, 'rating')]");
+
+
+ $this->mouseOver("//input[@id='RatingList_c1']/../../");
+ $this->assertText("Status", "Fair");
+
+ $this->click("//input[@id='RatingList_c1']/../../");
+ $this->pause(800);
+ $this->assertText("Status", "2 : Fair");
+ $this->assertElementPresent("//input[@id='RatingList_c0']/../..[contains(@class, 'rating_selected')]");
+ $this->assertElementPresent("//input[@id='RatingList_c1']/../..[contains(@class, 'rating_selected')]");
+ $this->assertElementNotPresent("//input[@id='RatingList_c2']/../..[contains(@class, 'rating_selected')]");
+ $this->assertElementPresent("//input[@id='RatingList_c2']/../..[contains(@class, 'rating')]");
+ $this->assertElementPresent("//input[@id='RatingList_c3']/../..[contains(@class, 'rating')]");
+ $this->assertElementPresent("//input[@id='RatingList_c4']/../..[contains(@class, 'rating')]");
+ $this->assertElementPresent("//input[@id='RatingList_c5']/../..[contains(@class, 'rating')]");
+ }
+
+ function clickTD($clientID){
+ $this->click("//input[@id='{$clientID}']/../..");
+ }
+
+ function assertCheckBoxes($clientID, $checks, $total = 5)
+ {
+ for($i = 0; $i < $total; $i++)
+ {
+ if(in_array($i, $checks))
+ $this->assertChecked("{$clientID}_c{$i}");
+ else
+ $this->assertNotChecked("{$clientID}_c{$i}");
+ }
+ }
+}
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/application.xml b/tests/FunctionalTests/tickets/protected/application.xml
index 29273a2f..113b8455 100644
--- a/tests/FunctionalTests/tickets/protected/application.xml
+++ b/tests/FunctionalTests/tickets/protected/application.xml
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<application id="TicketTests" Mode="Debug">
<modules>
- <module id="friendly-url" class="System.Web.TUrlMapping">
+ <module id="friendly-url" class="System.Web.TUrlMapping" EnableCustomUrl="True">
<url ServiceID="testService" ServiceParameter="ticket653" pattern="/ticket653/?" />
+ <url ServiceParameter="Ticket922" pattern="/ticket922/{text}" parameters.text=".*" />
</module>
<module id="request" class="THttpRequest" UrlManager="friendly-url"/>
</modules>
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket284Component.php b/tests/FunctionalTests/tickets/protected/pages/Ticket284Component.php
index 892bdc87..da6ad153 100644
--- a/tests/FunctionalTests/tickets/protected/pages/Ticket284Component.php
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket284Component.php
@@ -2,6 +2,7 @@
class Ticket284Component extends TTemplateControl implements IValidatable
{
+ private $_isValid;
public function onPreRender($param)
{
if (!$this->ShowHours && $this->ShowMinutes)
@@ -90,5 +91,13 @@ class Ticket284Component extends TTemplateControl implements IValidatable
return $this->TimeStamp;
}
}
+ public function getIsValid()
+ {
+ return $this->_isValid;
+ }
+ public function setIsValid($value)
+ {
+ $this->_isValid=TPropertyValue::ensureBoolean($value);
+ }
}
-?> \ No newline at end of file
+?>
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket900.page b/tests/FunctionalTests/tickets/protected/pages/Ticket900.page
new file mode 100644
index 00000000..41c0fbc2
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket900.page
@@ -0,0 +1,45 @@
+<com:TContent ID="Content">
+
+Current Command:<com:TLabel ID="CommandName" Text="None." /><br />
+
+<com:TDataGrid
+ CellPadding="2"
+ ID="DataGrid"
+ DataKeyField="title"
+ AutoGenerateColumns="false"
+ OnEditCommand="editItem"
+ OnUpdateCommand="saveItem"
+ OnCancelCommand="cancelItem"
+ OnDeleteCommand="deleteItem"
+ >
+
+ <com:TTemplateColumn >
+ <prop:ItemTemplate>
+ <com:TLabel Text=<%# $this->Parent->Data['title']%>/>
+ </prop:ItemTemplate>
+ <prop:EditItemTemplate>
+ <com:TTextBox ID="TextBox" Text=<%# $this->Parent->Data['title']%>/>
+ <com:TRequiredFieldValidator
+ ControlToValidate="TextBox"
+ ErrorMessage="*"
+ Text="Field required."/>
+ </prop:EditItemTemplate>
+ </com:TTemplateColumn>
+ <com:TEditCommandColumn
+ ButtonType="ImageButton"
+ HeaderText="Edit"
+ EditText="Edit"
+ UpdateText="Save"
+ CancelText="Cancel"
+ />
+ <com:TButtonColumn
+ ID="DeleteColumn"
+ HeaderText="Delete"
+ HeaderStyle.Width="50px"
+ ItemStyle.HorizontalAlign="Center"
+ ItemStyle.Font.Italic="false"
+ Text="Delete"
+ CommandName="delete"
+ />
+</com:TDataGrid>
+</com:TContent>
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket900.php b/tests/FunctionalTests/tickets/protected/pages/Ticket900.php
new file mode 100644
index 00000000..21e87f67
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket900.php
@@ -0,0 +1,58 @@
+<?php
+class Ticket900 extends TPage {
+
+ public function onLoad($param)
+ {
+ parent::onLoad($param);
+ if(!$this->IsPostBack)
+ {
+ $this->DataGrid->DataSource=$this->Data;
+ $this->DataGrid->dataBind();
+ }
+ }
+
+
+ protected function getData()
+ {
+ return array(
+ array( 'title' => 'Title A'),
+ array( 'title' => 'Title B'),
+ array( 'title' => 'Title C')
+ );
+ }
+
+
+ public function editItem($sender,$param)
+ {
+ $this->CommandName->Text='edit';
+ $this->DataGrid->EditItemIndex=$param->Item->ItemIndex;
+ $this->DataGrid->DataSource=$this->Data;
+ $this->DataGrid->dataBind();
+ }
+
+ public function saveItem($sender,$param)
+ {
+ $this->CommandName->Text='save';
+ $this->DataGrid->EditItemIndex=-1;
+ $this->DataGrid->DataSource=$this->Data;
+ $this->DataGrid->dataBind();
+ }
+
+ public function cancelItem($sender,$param)
+ {
+ $this->CommandName->Text='cancel';
+ $this->DataGrid->EditItemIndex=-1;
+ $this->DataGrid->DataSource=$this->Data;
+ $this->DataGrid->dataBind();
+ }
+
+ public function deleteItem($sender,$param)
+ {
+ $this->CommandName->Text='delete';
+ $this->DataGrid->EditItemIndex=-1;
+ $this->DataGrid->DataSource=$this->Data;
+ $this->DataGrid->dataBind();
+ }
+
+}
+?>
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket922.page b/tests/FunctionalTests/tickets/protected/pages/Ticket922.page
new file mode 100644
index 00000000..87932680
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket922.page
@@ -0,0 +1,12 @@
+<com:TContent ID="Content">
+
+<h1>Problem with TUrlMapping and urlencoding</h1>
+
+Enter a string with spaces that will be used as URL parameter
+<com:TTextBox ID="Text" />
+<com:TButton Text="Perform redirect" OnClick="processString" />
+
+<br />
+Decoded String:
+<com:TLabel ID="Result" />
+</com:TContent>
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket922.php b/tests/FunctionalTests/tickets/protected/pages/Ticket922.php
new file mode 100644
index 00000000..52d4e411
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket922.php
@@ -0,0 +1,13 @@
+<?php
+class Ticket922 extends TPage {
+ public function processString($sender,$param) {
+ $text = $this->Text->Text;
+ $url= $this->getService()->constructUrl('Ticket922', array('text'=>$text));
+ $this->getResponse()->redirect($url);
+ }
+
+ public function onLoad($param) {
+ if ($this->Request->contains('text'))
+ $this->Result->setText($this->Request->itemAt('text'));
+ }
+}
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket925.page b/tests/FunctionalTests/tickets/protected/pages/Ticket925.page
new file mode 100755
index 00000000..cdb1e0fe
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket925.page
@@ -0,0 +1,11 @@
+<com:TContent ID="Content">
+ <com:TTimeTriggeredCallback id="timer1" Interval="2" OnCallback="timer1callback"/>
+ <com:TTimeTriggeredCallback id="timer2" Interval="1" OnCallback="timer2callback" StartTimerOnLoad="true"/>
+ Timer 1 : <com:TActiveLabel id="timer1result"/><br/>
+ Timer 2 : <com:TActiveLabel id="timer2result"/><br/>
+ <com:TActiveButton OnClick="startTimer1" Text="Start Timer1"/>
+ <com:TActiveButton OnClick="stopTimer1" Text="Stop Timer1"/>
+ <com:TActiveButton OnClick="startTimer2" Text="Start Timer2"/>
+ <com:TActiveButton OnClick="stopTimer2" Text="Stop Timer2"/>
+ <com:TActiveButton OnClick="changeIntervalTimer1" Text="Change Interval of Timer1 to 1 sec"/>
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket925.php b/tests/FunctionalTests/tickets/protected/pages/Ticket925.php
new file mode 100755
index 00000000..0284bd66
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket925.php
@@ -0,0 +1,76 @@
+<?php
+
+prado::using('System.Web.UI.ActiveControls.*');
+
+class Ticket925 extends TPage
+{
+ public function getTimer1Value()
+ {
+ return $this->getViewState('timer1', 0);
+ }
+
+ public function getTimer2Value()
+ {
+ return $this->getViewState('timer2', 0);
+ }
+
+ public function setTimer1Value($value)
+ {
+ $this->setViewState('timer1', $value, 0);
+ }
+
+ public function setTimer2Value($value)
+ {
+ $this->setViewState('timer2', $value, 0);
+ }
+
+ public function startTimer1($sender, $param)
+ {
+ $this->timer1->startTimer();
+ }
+
+ public function stopTimer1($sender, $param)
+ {
+ $this->timer1->stopTimer();
+ }
+
+ public function startTimer2($sender, $param)
+ {
+ $this->timer2->startTimer();
+ }
+
+ public function stopTimer2($sender, $param)
+ {
+ $this->timer2->stopTimer();
+ }
+
+ public function changeIntervalTimer1($sender, $param)
+ {
+ $this->timer1->setInterval(1);
+ }
+
+ public function timer1callback ($sender, $param)
+ {
+ $this->timer1result->Text .= ($this->Timer1Value+=$this->timer1->Interval).'... ';
+ if ($this->Timer1Value > 20)
+ {
+ $this->timer1Value=0;
+ $this->timer1result->Text='';
+ $this->timer1->stopTimer();
+ }
+
+ }
+
+ public function timer2callback ($sender, $param)
+ {
+ $this->timer2result->Text .= ($this->Timer2Value+=$this->timer2->Interval).'... ';
+ if ($this->Timer2Value > 20)
+ {
+ $this->timer2Value=0;
+ $this->timer2result->Text='';
+ $this->timer2->stopTimer();
+ }
+ }
+
+}
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/tests/Ticket595TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket595TestCase.php
index e2487f25..4321bd67 100644
--- a/tests/FunctionalTests/tickets/tests/Ticket595TestCase.php
+++ b/tests/FunctionalTests/tickets/tests/Ticket595TestCase.php
@@ -18,7 +18,7 @@ class Ticket595TestCase extends SeleniumTestCase
$this->type($base.'A', 'test@pradosoft.com');
$this->click($base.'ctl2');
$this->pause(800);
- $this->assertAttribute($base.'A@class','');
+ $this->assertAttribute($base.'A@class','null');
$this->click($base.'ctl5');
@@ -33,7 +33,7 @@ class Ticket595TestCase extends SeleniumTestCase
$this->type($base.'B', 'test@pradosoft.com');
$this->click($base.'ctl5');
$this->pause(800);
- $this->assertAttribute($base.'B@class','');
+ $this->assertAttribute($base.'B@class','null');
}
}
?>
diff --git a/tests/FunctionalTests/tickets/tests/Ticket900TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket900TestCase.php
new file mode 100644
index 00000000..b80e1187
--- /dev/null
+++ b/tests/FunctionalTests/tickets/tests/Ticket900TestCase.php
@@ -0,0 +1,19 @@
+<?php
+
+class Ticket900TestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $this->open('tickets/index.php?page=Ticket900');
+ $this->assertTitle("Verifying Ticket 900");
+ $base = 'ctl0_Content_';
+
+ $this->clickAndWait('ctl0$Content$DataGrid$ctl1$ctl3');
+ $this->type($base.'DataGrid_ctl1_TextBox', '');
+ $this->click($base.'DataGrid_ctl1_ctl3');
+ $this->clickAndWait('ctl0$Content$DataGrid$ctl1$ctl4');
+ $this->assertText($base.'CommandName', 'cancel');
+ }
+}
+
+?>
diff --git a/tests/FunctionalTests/tickets/tests/Ticket922TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket922TestCase.php
new file mode 100644
index 00000000..8420c10d
--- /dev/null
+++ b/tests/FunctionalTests/tickets/tests/Ticket922TestCase.php
@@ -0,0 +1,18 @@
+<?php
+
+class Ticket922TestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $this->open('tickets/index.php?page=Ticket922');
+ $this->assertTitle("Verifying Ticket 922");
+ $base = 'ctl0_Content_';
+
+ $this->type($base.'Text', 'two words');
+ $this->clickAndWait('ctl0$Content$ctl0');
+ $this->assertText($base.'Result','two words');
+
+ }
+}
+
+?>