summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortof <>2007-09-25 13:17:38 +0000
committertof <>2007-09-25 13:17:38 +0000
commitc67e6384d8d0695bf20693674ecfcec019ec5015 (patch)
treecf8a41797540250118b73209c547abe096ddbcb4
parentfff38f77a0234c8827a898a81e2d71278de0f302 (diff)
Add Ticket #679 testcase
-rw-r--r--.gitattributes2
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket679.page26
-rw-r--r--tests/FunctionalTests/tickets/protected/pages/Ticket679.php43
-rw-r--r--tests/FunctionalTests/tickets/tests/Ticket679TestCase.php37
4 files changed, 108 insertions, 0 deletions
diff --git a/.gitattributes b/.gitattributes
index 1642309a..688627d3 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -2942,6 +2942,8 @@ tests/FunctionalTests/tickets/protected/pages/Ticket653/ticket653.page -text
tests/FunctionalTests/tickets/protected/pages/Ticket656.page -text
tests/FunctionalTests/tickets/protected/pages/Ticket659.page -text
tests/FunctionalTests/tickets/protected/pages/Ticket670.page -text
+tests/FunctionalTests/tickets/protected/pages/Ticket679.page -text
+tests/FunctionalTests/tickets/protected/pages/Ticket679.php -text
tests/FunctionalTests/tickets/protected/pages/Ticket68.page -text
tests/FunctionalTests/tickets/protected/pages/Ticket72.page -text
tests/FunctionalTests/tickets/protected/pages/Ticket72.php -text
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket679.page b/tests/FunctionalTests/tickets/protected/pages/Ticket679.page
new file mode 100644
index 00000000..ba4b75e4
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket679.page
@@ -0,0 +1,26 @@
+<com:TContent ID="Content">
+
+repeater bug<br/>
+ <com:TActiveLabel ID="myLabel" Text="Some Text" Display="None" />
+<com:TRepeater ID="Repeater" EnableViewState="true" >
+ <prop:ItemTemplate>
+ <com:TActiveButton Text="inside" OnCallback="Page.changeText" />
+</prop:ItemTemplate>
+</com:TRepeater>
+
+<com:TActiveButton Text="outside" OnCallback="Page.changeText" />
+
+
+
+
+<br/><br/>
+
+radiobutton bug<br>
+
+<com:TActiveRadioButton ID="myRadioButton"/>
+
+<com:TActiveButton Text="check RadioButton" OnCallback="Page.checkRadioButton" />
+<com:TActiveButton Text="uncheck RadioButton" OnCallback="Page.uncheckRadioButton" />
+
+
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket679.php b/tests/FunctionalTests/tickets/protected/pages/Ticket679.php
new file mode 100644
index 00000000..c28252bd
--- /dev/null
+++ b/tests/FunctionalTests/tickets/protected/pages/Ticket679.php
@@ -0,0 +1,43 @@
+<?php
+
+prado::using ('System.Web.UI.ActiveControls.*');
+
+class Ticket679 extends TPage
+{
+ // repeater bug
+ public function onLoad($param)
+ {
+ parent::onLoad($param);
+ $dataArray[0][ 'id' ] = '1' ;
+
+ if( !$this->Page->IsPostBack && !$this->Page->IsCallBack)
+ {
+ $this->Repeater->DataSource = $dataArray ;
+ $this->Repeater->dataBind() ;
+ }
+ }
+
+ public function changeText( $sender, $param )
+ {
+ $obj = $this->myLabel ;
+ $obj->Text = $sender->Text ;
+ $obj->Display="Dynamic";
+
+ // solution
+ //$this->CallBackClient->show($obj, true);
+ }
+
+
+ // activeradiobutton bug
+ public function checkRadioButton($sender, $param){
+ $this->myRadioButton->checked = true;
+ }
+ public function uncheckRadioButton($sender, $param){
+ $this->myRadioButton->checked = false;
+
+ // solution
+ //$this->CallbackClient->check($this->myRadioButton, false);
+ }
+
+}
+?> \ No newline at end of file
diff --git a/tests/FunctionalTests/tickets/tests/Ticket679TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket679TestCase.php
new file mode 100644
index 00000000..9ab29115
--- /dev/null
+++ b/tests/FunctionalTests/tickets/tests/Ticket679TestCase.php
@@ -0,0 +1,37 @@
+<?php
+class Ticket679TestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $base = 'ctl0_Content_';
+ $this->open('tickets/index.php?page=Ticket679');
+ $this->assertTitle("Verifying Ticket 679");
+
+ // First part of ticket : Repeater bug
+ $this->click($base."ctl0");
+ $this->pause(800);
+ $this->assertText($base."myLabel",'outside');
+ $this->verifyVisible($base."myLabel");
+
+ // Reload completly the page
+ $this->refresh();
+ $this->pause(800);
+
+ $this->click($base."Repeater_ctl0_ctl0");
+ $this->pause(800);
+ $this->assertText($base."myLabel",'inside');
+ $this->verifyVisible($base."myLabel");
+
+ // Second part of ticket : ARB bug
+ $this->verifyNotChecked($base."myRadioButton");
+ $this->click($base."ctl1");
+ $this->pause(800);
+ $this->verifyChecked($base."myRadioButton");
+ $this->click($base."ctl2");
+ $this->pause(800);
+ $this->verifyNotChecked($base."myRadioButton");
+ $this->pause(800);
+ }
+
+}
+?> \ No newline at end of file