diff options
author | Christophe.Boulain <> | 2008-11-08 17:41:48 +0000 |
---|---|---|
committer | Christophe.Boulain <> | 2008-11-08 17:41:48 +0000 |
commit | 15161da7755a8d74853ccae0966afa22d9830b07 (patch) | |
tree | cb2343aafc94f4dfc06db40a137c840d346c8a55 /tests/FunctionalTests/active-controls/protected/pages | |
parent | 4ee9040fbfce871db1bf01e7f7a051184bbca37b (diff) |
Issue#36: Refactored TRatingList/TActiveRatingList, and added some docs.
Diffstat (limited to 'tests/FunctionalTests/active-controls/protected/pages')
17 files changed, 368 insertions, 12 deletions
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:" />
|