summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/features/protected/pages
diff options
context:
space:
mode:
authorxue <>2006-03-12 04:43:03 +0000
committerxue <>2006-03-12 04:43:03 +0000
commitcb7b7f1929dce12936eca957caa432e74c6dc7de (patch)
tree5de1b58f968241299e65e8ac852f88d755f8f25d /tests/FunctionalTests/features/protected/pages
parentdcaeab55c94f6f51ab92b7d1a70503a544df73cd (diff)
reorganized FT tests.
Diffstat (limited to 'tests/FunctionalTests/features/protected/pages')
-rw-r--r--tests/FunctionalTests/features/protected/pages/ColorPicker.page40
-rw-r--r--tests/FunctionalTests/features/protected/pages/DatePicker.page59
-rw-r--r--tests/FunctionalTests/features/protected/pages/FeatureList.page3
-rw-r--r--tests/FunctionalTests/features/protected/pages/FeatureList.php34
-rw-r--r--tests/FunctionalTests/features/protected/pages/HtmlArea.page10
-rw-r--r--tests/FunctionalTests/features/protected/pages/I18N/BasicI18N.page31
-rw-r--r--tests/FunctionalTests/features/protected/pages/I18N/BasicI18N.php45
-rw-r--r--tests/FunctionalTests/features/protected/pages/I18N/Home.page3
-rw-r--r--tests/FunctionalTests/features/protected/pages/I18N/Home.zh_CN.page3
-rw-r--r--tests/FunctionalTests/features/protected/pages/I18N/config.xml12
-rw-r--r--tests/FunctionalTests/features/protected/pages/RatingList.page41
11 files changed, 281 insertions, 0 deletions
diff --git a/tests/FunctionalTests/features/protected/pages/ColorPicker.page b/tests/FunctionalTests/features/protected/pages/ColorPicker.page
new file mode 100644
index 00000000..3d8c46db
--- /dev/null
+++ b/tests/FunctionalTests/features/protected/pages/ColorPicker.page
@@ -0,0 +1,40 @@
+<com:TContent ID="Content">
+
+<com:TColorPicker Text="#FFCC00" /><br />
+
+
+<p>asda<br /></p>
+<p>asda<br /></p>
+<p>asda<br /></p>
+
+<p>asda<br /></p>
+<p>asda<br /></p>
+
+<com:TColorPicker Mode="Simple" /><br />
+
+
+<p>asda<br /></p>
+<p>asda<br /></p>
+<p>asda<br /></p>
+
+<com:TColorPicker ShowColorPicker="false" /><br />
+
+<p>asda<br /></p>
+
+<com:TColorPicker Mode="Full" /><br />
+
+<p>asda<br /></p>
+<p>asda<br /></p>
+
+<p>asda<br /></p>
+<p>asda<br /></p>
+<p>asda<br /></p>
+<p>asda<br /></p>
+<p>asda<br /></p>
+<p>asda<br /></p>
+<p>asda<br /></p>
+<p>asda<br /></p>
+<p>asda<br /></p>
+
+
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/features/protected/pages/DatePicker.page b/tests/FunctionalTests/features/protected/pages/DatePicker.page
new file mode 100644
index 00000000..4347f748
--- /dev/null
+++ b/tests/FunctionalTests/features/protected/pages/DatePicker.page
@@ -0,0 +1,59 @@
+<com:TContent ID="Content">
+
+<h1>TDatePicker Samples</h1>
+
+<table class="sampletable">
+
+<tr>
+ <td class="samplenote">Default TDatePicker</td>
+ <td class="sampleaction">
+ <com:TDatePicker />
+ </td>
+</tr>
+
+<tr>
+ <td class="samplenote">Button Mode</td>
+ <td class="sampleaction">
+ <com:TDatePicker Mode="Button" />
+ </td>
+</tr>
+
+<tr>
+ <td class="samplenote">InputMode="DropDownList", custom DateFormat</td>
+ <td class="sampleaction">
+ <com:TDatePicker DateFormat="yyyy/MMMM" InputMode="DropDownList"/>
+ </td>
+</tr>
+
+<tr>
+ <td class="samplenote">InputMode="DropDownList", custom DateFormat, Culture</td>
+ <td class="sampleaction">
+ <com:TDatePicker DateFormat="MM/yyyy" Culture="fr" InputMode="DropDownList"/>
+ </td>
+</tr>
+
+
+<tr>
+ <td class="samplenote">Custom DateFormat, culture, ImageButton mode</td>
+ <td class="sampleaction">
+ <com:TDatePicker Mode="ImageButton" Culture="zh_CN" DateFormat="日期:yyyy年M月d日"/>
+ </td>
+</tr>
+
+<tr>
+ <td class="samplenote">Custom DateFormat, DropDownList, pre-selected date set in as Text</td>
+ <td class="sampleaction">
+ <com:TDatePicker DateFormat="yyyy/MMMM/dd" Text="2005/05/15" InputMode="DropDownList"/>
+ </td>
+</tr>
+
+<tr>
+ <td class="samplenote">DropDownList, pre-selected date as integer</td>
+ <td class="sampleaction">
+ <com:TDatePicker InputMode="DropDownList" Date=<%= @strtotime("-1 month") %>/>
+ </td>
+</tr>
+
+</table>
+
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/features/protected/pages/FeatureList.page b/tests/FunctionalTests/features/protected/pages/FeatureList.page
new file mode 100644
index 00000000..ef25ccb9
--- /dev/null
+++ b/tests/FunctionalTests/features/protected/pages/FeatureList.page
@@ -0,0 +1,3 @@
+<com:TContent ID="Content">
+<com:TBulletedList ID="List" DisplayMode="HyperLink"/>
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/features/protected/pages/FeatureList.php b/tests/FunctionalTests/features/protected/pages/FeatureList.php
new file mode 100644
index 00000000..7f82d34e
--- /dev/null
+++ b/tests/FunctionalTests/features/protected/pages/FeatureList.php
@@ -0,0 +1,34 @@
+<?php
+
+class FeatureList extends TPage
+{
+ public function onLoad($param)
+ {
+ parent::onLoad($param);
+ $list=$this->getPageList(dirname(__FILE__),'');
+ $this->List->DataSource=$list;
+ $this->List->dataBind();
+ }
+
+ protected function getPageList($directory,$basePath)
+ {
+ $list=array();
+ $folder=@opendir($directory);
+ while($entry=@readdir($folder))
+ {
+ if($entry[0]==='.')
+ continue;
+ else if(is_file($directory.'/'.$entry))
+ {
+ if(($page=basename($entry,'.page'))!==$entry && strpos($page,'.')===false)
+ $list['?page='.$basePath.$page]=$basePath.$page;
+ }
+ else
+ $list=array_merge($list,$this->getPageList($directory.'/'.$entry,$basePath.$entry.'.'));
+ }
+ closedir($folder);
+ return $list;
+ }
+}
+
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/features/protected/pages/HtmlArea.page b/tests/FunctionalTests/features/protected/pages/HtmlArea.page
new file mode 100644
index 00000000..8b56f48d
--- /dev/null
+++ b/tests/FunctionalTests/features/protected/pages/HtmlArea.page
@@ -0,0 +1,10 @@
+<%@ Application.Globalization.Charset="GB2312" %>
+<com:TContent ID="Content">
+
+ <com:THtmlArea>
+ <prop:Options>
+ plugins : "contextmenu,paste",
+ language: "zh_CN"
+ </prop:Options>
+ </com:THtmlArea>
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/features/protected/pages/I18N/BasicI18N.page b/tests/FunctionalTests/features/protected/pages/I18N/BasicI18N.page
new file mode 100644
index 00000000..e13eecf2
--- /dev/null
+++ b/tests/FunctionalTests/features/protected/pages/I18N/BasicI18N.page
@@ -0,0 +1,31 @@
+<%@ Title="Basic I18N Test" Application.Globalization.Culture="zh_CN" %>
+<com:TContent ID="Content">
+<h1>Basic I18N Test</h1>
+<com:TTranslate>
+ Hello {name}
+ <com:TTranslateParameter Key="name">
+ <com:TLabel>
+ <com:TTranslate>Name</com:TTranslate>
+ </com:TLabel>
+ </com:TTranslateParameter>
+</com:TTranslate>
+
+<div>
+<com:TNumberFormat Value="10000" Type="currency"/>
+</div>
+<div><com:TDateFormat Value="2006-01-15" Culture="zh_CN"/></div>
+
+<div>
+<com:TChoiceFormat Value="0">
+ [0] None |[1] One thing. |[2,Inf) Many things.
+</com:TChoiceFormat><br />
+
+<com:TChoiceFormat Value="1">
+ [0] None |[1] One thing. |[2,Inf) Many things.
+</com:TChoiceFormat><br />
+
+<com:TChoiceFormat Value="5">
+ [0] None |[1] One thing. |[2,Inf) Many things.
+</com:TChoiceFormat>
+</div>
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/features/protected/pages/I18N/BasicI18N.php b/tests/FunctionalTests/features/protected/pages/I18N/BasicI18N.php
new file mode 100644
index 00000000..cac0a04e
--- /dev/null
+++ b/tests/FunctionalTests/features/protected/pages/I18N/BasicI18N.php
@@ -0,0 +1,45 @@
+<?php
+
+/**
+ * ${classname}
+ *
+ * ${description}
+ *
+ * @author Wei Zhuo<weizhuo[at]gmail[dot]com>
+ * @version $Revision: 1.66 $ $Date: ${DATE} ${TIME} $
+ * @package ${package}
+ */
+class BasicI18N extends TPage
+{
+}
+
+/**
+ * ${classname}
+ *
+ * ${description}
+ *
+ * @author Wei Zhuo<weizhuo[at]gmail[dot]com>
+ * @version $Revision: 1.66 $ $Date: ${DATE} ${TIME} $
+ * @package ${package}
+ *//*
+class BasicI18NTestCase extends SeleniumTestCase
+{
+ function setup()
+ {
+ $page = Prado::getApplication()->getTestPage(__FILE__);
+ $this->open($page);
+ }
+
+ function testI18N()
+ {
+ $this->verifyTitle("Basic I18N Test", "");
+ $this->verifyTextPresent("Hello", "");
+ $this->verifyTextPresent("US$10,000.00", "");
+ $this->verifyTextPresent("2006年1月15日 上午12时00分00秒", "");
+ $this->verifyTextPresent("None", "");
+ $this->verifyTextPresent("One thing.", "");
+ $this->verifyTextPresent("Many things.", "");
+ }
+}
+*/
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/features/protected/pages/I18N/Home.page b/tests/FunctionalTests/features/protected/pages/I18N/Home.page
new file mode 100644
index 00000000..9a49e3a2
--- /dev/null
+++ b/tests/FunctionalTests/features/protected/pages/I18N/Home.page
@@ -0,0 +1,3 @@
+<com:TContent ID="Content">
+<h1>Prado Functional Tests</h1>
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/features/protected/pages/I18N/Home.zh_CN.page b/tests/FunctionalTests/features/protected/pages/I18N/Home.zh_CN.page
new file mode 100644
index 00000000..1b931cc2
--- /dev/null
+++ b/tests/FunctionalTests/features/protected/pages/I18N/Home.zh_CN.page
@@ -0,0 +1,3 @@
+<com:TContent ID="Content">
+<h1>Prado Functional Tests (Chinese)</h1>
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/features/protected/pages/I18N/config.xml b/tests/FunctionalTests/features/protected/pages/I18N/config.xml
new file mode 100644
index 00000000..25e26ac5
--- /dev/null
+++ b/tests/FunctionalTests/features/protected/pages/I18N/config.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<configuration>
+ <paths>
+ <using namespace="System.I18N.*" />
+ </paths>
+ <modules>
+ <module id="globalization" class="TGlobalization">
+ <translation type="XLIFF" source="Application.pages.I18N.messages" autosave="true" cache="true" />
+ </module>
+ </modules>
+</configuration> \ No newline at end of file
diff --git a/tests/FunctionalTests/features/protected/pages/RatingList.page b/tests/FunctionalTests/features/protected/pages/RatingList.page
new file mode 100644
index 00000000..909180c7
--- /dev/null
+++ b/tests/FunctionalTests/features/protected/pages/RatingList.page
@@ -0,0 +1,41 @@
+<com:TContent ID="Content">
+<h1>TRatingList Examples</h1>
+
+<h2>Default TRatingList</h2>
+ <com:TRatingList RepeatDirection="Vertical" Style="caption-side: right;">
+ <com:TListItem Text="Fair" />
+ <com:TListItem Text="Average" />
+ <com:TListItem Text="Good" />
+ <com:TListItem Text="Execellent" />
+ </com:TRatingList>
+
+<h2>TRatingList </h2>
+ <com:TRatingList SelectedIndex="2">
+ <com:TListItem Text="Poor" />
+ <com:TListItem Text="Fair" />
+ <com:TListItem Text="Average" />
+ <com:TListItem Text="Good" />
+ <com:TListItem Text="Execellent" />
+ <com:TListItem Text="Super" />
+ </com:TRatingList>
+
+<h2>TRatingList </h2>
+ <com:TRatingList RatingStyle="blocks" SelectedValue="Good">
+ <com:TListItem Text="Poor" />
+ <com:TListItem Text="Fair" />
+ <com:TListItem Text="Average" />
+ <com:TListItem Text="Good" />
+ <com:TListItem Text="Execellent" />
+ <com:TListItem Text="Super" />
+ </com:TRatingList>
+
+<h2>TRatingList </h2>
+ <com:TRatingList ID="Rating1" AllowInput="false" Caption="Rating:" Rating="4.6">
+ <com:TListItem Text="Poor" />
+ <com:TListItem Text="Fair" />
+ <com:TListItem Text="Average" />
+ <com:TListItem Text="Good" />
+ <com:TListItem Text="Execellent" />
+ <com:TListItem Text="Super" />
+ </com:TRatingList>
+</com:TContent> \ No newline at end of file