summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/features
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FunctionalTests/features')
-rwxr-xr-xtests/FunctionalTests/features/protected/controls/Layout.tpl1
-rwxr-xr-xtests/FunctionalTests/features/protected/pages/I18N/BasicI18N.php18
-rwxr-xr-xtests/FunctionalTests/features/protected/pages/RatingList.page30
-rwxr-xr-xtests/FunctionalTests/features/protected/pages/RatingList.php9
-rwxr-xr-xtests/FunctionalTests/features/tests/MyTestCase.php6
5 files changed, 39 insertions, 25 deletions
diff --git a/tests/FunctionalTests/features/protected/controls/Layout.tpl b/tests/FunctionalTests/features/protected/controls/Layout.tpl
index dbd433b8..66b42f6c 100755
--- a/tests/FunctionalTests/features/protected/controls/Layout.tpl
+++ b/tests/FunctionalTests/features/protected/controls/Layout.tpl
@@ -27,7 +27,6 @@
<body>
<com:TForm>
<com:TContentPlaceHolder ID="Content" />
-<com:TJavascriptLogger />
</com:TForm>
</body>
</html> \ 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
index d4a98e26..5292affb 100755
--- a/tests/FunctionalTests/features/protected/pages/I18N/BasicI18N.php
+++ b/tests/FunctionalTests/features/protected/pages/I18N/BasicI18N.php
@@ -22,23 +22,23 @@ class BasicI18N extends TPage
* @version $Revision: 1.66 $ $Date: ${DATE} ${TIME} $
* @package ${package}
*//*
-class BasicI18NTestCase extends PradoGenericSeleniumTest
+class BasicI18NTestCase extends PradoGenericSelenium2Test
{
function setup()
{
$page = Prado::getApplication()->getTestPage(__FILE__);
- $this->open($page);
+ $this->url($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.", "");
+ $this->assertEquals("Basic I18N Test", $this->title());
+ $this->assertContains("Hello", $this->source());
+ $this->assertContains("US$10,000.00", $this->source());
+ $this->assertContains("2006年1月15日 上午12时00分00秒", $this->source());
+ $this->assertContains("None", $this->source());
+ $this->assertContains("One thing.", $this->source());
+ $this->assertContains("Many things.", $this->source());
}
}
*/ \ No newline at end of file
diff --git a/tests/FunctionalTests/features/protected/pages/RatingList.page b/tests/FunctionalTests/features/protected/pages/RatingList.page
index 909180c7..eaf9a282 100755
--- a/tests/FunctionalTests/features/protected/pages/RatingList.page
+++ b/tests/FunctionalTests/features/protected/pages/RatingList.page
@@ -2,40 +2,46 @@
<h1>TRatingList Examples</h1>
<h2>Default TRatingList</h2>
- <com:TRatingList RepeatDirection="Vertical" Style="caption-side: right;">
+ <com:TLabel ID="label1" Text="Rate it:" />
+ <com:TRatingList CaptionID="label1">
<com:TListItem Text="Fair" />
<com:TListItem Text="Average" />
<com:TListItem Text="Good" />
- <com:TListItem Text="Execellent" />
+ <com:TListItem Text="Excellent" />
</com:TRatingList>
-<h2>TRatingList </h2>
- <com:TRatingList SelectedIndex="2">
+<h2>TRatingList in vertical mode, SelectedIndex=2</h2>
+ <com:TLabel ID="label2" Text="Rate it:" />
+ <com:TRatingList CaptionID="label2" SelectedIndex="2" RepeatDirection="Vertical" Style="caption-side: right;">
<com:TListItem Text="Poor" />
<com:TListItem Text="Fair" />
<com:TListItem Text="Average" />
<com:TListItem Text="Good" />
- <com:TListItem Text="Execellent" />
+ <com:TListItem Text="Excellent" />
<com:TListItem Text="Super" />
</com:TRatingList>
-<h2>TRatingList </h2>
- <com:TRatingList RatingStyle="blocks" SelectedValue="Good">
+<h2>TRatingList with RatingStyle=blocks, AutoPostback=true, SelectedValue=Good</h2>
+ <com:TLabel ID="label3" Text="Rate it:" />
+ <com:TRatingList ID="Rating3" CaptionID="label3" RatingStyle="blocks" SelectedValue="Good" AutoPostBack="true" OnSelectedIndexChanged="rating3_selectionChanged">
<com:TListItem Text="Poor" />
<com:TListItem Text="Fair" />
<com:TListItem Text="Average" />
<com:TListItem Text="Good" />
- <com:TListItem Text="Execellent" />
+ <com:TListItem Text="Excellent" />
<com:TListItem Text="Super" />
</com:TRatingList>
+ Postback result: <com:TLabel ID="labelResult3" />
-<h2>TRatingList </h2>
- <com:TRatingList ID="Rating1" AllowInput="false" Caption="Rating:" Rating="4.6">
+<h2>TRatingList with AllowInput=false, Rating=4.6</h2>
+ <com:TLabel ID="label4" Text="Rate it:" />
+ <com:TRatingList CaptionID="label4" AllowInput="false" 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="Excellent" />
<com:TListItem Text="Super" />
- </com:TRatingList>
+ </com:TRatingList>
+
</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/features/protected/pages/RatingList.php b/tests/FunctionalTests/features/protected/pages/RatingList.php
new file mode 100755
index 00000000..9592680a
--- /dev/null
+++ b/tests/FunctionalTests/features/protected/pages/RatingList.php
@@ -0,0 +1,9 @@
+<?php
+
+class RatingList extends TPage
+{
+ protected function rating3_selectionChanged($sender, $param)
+ {
+ $this->labelResult3->Text=$this->Rating3->SelectedValue;
+ }
+} \ No newline at end of file
diff --git a/tests/FunctionalTests/features/tests/MyTestCase.php b/tests/FunctionalTests/features/tests/MyTestCase.php
index 92b0886a..d748b6b0 100755
--- a/tests/FunctionalTests/features/tests/MyTestCase.php
+++ b/tests/FunctionalTests/features/tests/MyTestCase.php
@@ -1,10 +1,10 @@
<?php
-class MyTestCase extends PradoGenericSeleniumTest
+class MyTestCase extends PradoGenericSelenium2Test
{
function test1()
{
- $this->open('http://127.0.0.1');
- $this->assertTextNotPresent('asd');
+ $this->url('http://127.0.0.1');
+ $this->assertNotContains('asd', $this->source());
}
}