From cb7b7f1929dce12936eca957caa432e74c6dc7de Mon Sep 17 00:00:00 2001 From: xue <> Date: Sun, 12 Mar 2006 04:43:03 +0000 Subject: reorganized FT tests. --- .../features/protected/application.xml | 9 ++++ .../features/protected/controls/Layout.php | 8 +++ .../features/protected/controls/Layout.tpl | 27 ++++++++++ .../features/protected/pages/ColorPicker.page | 40 +++++++++++++++ .../features/protected/pages/DatePicker.page | 59 ++++++++++++++++++++++ .../features/protected/pages/FeatureList.page | 3 ++ .../features/protected/pages/FeatureList.php | 34 +++++++++++++ .../features/protected/pages/HtmlArea.page | 10 ++++ .../features/protected/pages/I18N/BasicI18N.page | 31 ++++++++++++ .../features/protected/pages/I18N/BasicI18N.php | 45 +++++++++++++++++ .../features/protected/pages/I18N/Home.page | 3 ++ .../features/protected/pages/I18N/Home.zh_CN.page | 3 ++ .../features/protected/pages/I18N/config.xml | 12 +++++ .../features/protected/pages/RatingList.page | 41 +++++++++++++++ 14 files changed, 325 insertions(+) create mode 100644 tests/FunctionalTests/features/protected/application.xml create mode 100644 tests/FunctionalTests/features/protected/controls/Layout.php create mode 100644 tests/FunctionalTests/features/protected/controls/Layout.tpl create mode 100644 tests/FunctionalTests/features/protected/pages/ColorPicker.page create mode 100644 tests/FunctionalTests/features/protected/pages/DatePicker.page create mode 100644 tests/FunctionalTests/features/protected/pages/FeatureList.page create mode 100644 tests/FunctionalTests/features/protected/pages/FeatureList.php create mode 100644 tests/FunctionalTests/features/protected/pages/HtmlArea.page create mode 100644 tests/FunctionalTests/features/protected/pages/I18N/BasicI18N.page create mode 100644 tests/FunctionalTests/features/protected/pages/I18N/BasicI18N.php create mode 100644 tests/FunctionalTests/features/protected/pages/I18N/Home.page create mode 100644 tests/FunctionalTests/features/protected/pages/I18N/Home.zh_CN.page create mode 100644 tests/FunctionalTests/features/protected/pages/I18N/config.xml create mode 100644 tests/FunctionalTests/features/protected/pages/RatingList.page (limited to 'tests/FunctionalTests/features/protected') diff --git a/tests/FunctionalTests/features/protected/application.xml b/tests/FunctionalTests/features/protected/application.xml new file mode 100644 index 00000000..642152cc --- /dev/null +++ b/tests/FunctionalTests/features/protected/application.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/controls/Layout.php b/tests/FunctionalTests/features/protected/controls/Layout.php new file mode 100644 index 00000000..2c6e02d6 --- /dev/null +++ b/tests/FunctionalTests/features/protected/controls/Layout.php @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/tests/FunctionalTests/features/protected/controls/Layout.tpl b/tests/FunctionalTests/features/protected/controls/Layout.tpl new file mode 100644 index 00000000..18482377 --- /dev/null +++ b/tests/FunctionalTests/features/protected/controls/Layout.tpl @@ -0,0 +1,27 @@ + + + + + + + + + + + + + \ No newline at end of file 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 @@ + + +
+ + +

asda

+

asda

+

asda

+ +

asda

+

asda

+ +
+ + +

asda

+

asda

+

asda

+ +
+ +

asda

+ +
+ +

asda

+

asda

+ +

asda

+

asda

+

asda

+

asda

+

asda

+

asda

+

asda

+

asda

+

asda

+ + +
\ 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 @@ + + +

TDatePicker Samples

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Default TDatePicker + +
Button Mode + +
InputMode="DropDownList", custom DateFormat + +
InputMode="DropDownList", custom DateFormat, Culture + +
Custom DateFormat, culture, ImageButton mode + +
Custom DateFormat, DropDownList, pre-selected date set in as Text + +
DropDownList, pre-selected date as integer + /> +
+ +
\ 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 @@ + + + \ 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 @@ +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" %> + + + + + plugins : "contextmenu,paste", + language: "zh_CN" + + + \ 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" %> + +

Basic I18N Test

+ + Hello {name} + + + Name + + + + +
+ +
+
+ +
+ + [0] None |[1] One thing. |[2,Inf) Many things. +
+ + + [0] None |[1] One thing. |[2,Inf) Many things. +
+ + + [0] None |[1] One thing. |[2,Inf) Many things. + +
+
\ 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 @@ + + * @version $Revision: 1.66 $ $Date: ${DATE} ${TIME} $ + * @package ${package} + */ +class BasicI18N extends TPage +{ +} + +/** + * ${classname} + * + * ${description} + * + * @author Wei Zhuo + * @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 @@ + +

Prado Functional Tests

+
\ 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 @@ + +

Prado Functional Tests (Chinese)

+
\ 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 @@ + + + + + + + + + + + + \ 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 @@ + +

TRatingList Examples

+ +

Default TRatingList

+ + + + + + + +

TRatingList

+ + + + + + + + + +

TRatingList

+ + + + + + + + + +

TRatingList

+ + + + + + + + +
\ No newline at end of file -- cgit v1.2.3