diff options
author | godzilla80@gmx.net <> | 2010-02-14 01:22:57 +0000 |
---|---|---|
committer | godzilla80@gmx.net <> | 2010-02-14 01:22:57 +0000 |
commit | 94e94e0a8566f23d16658a04c55b0bbfdd6689aa (patch) | |
tree | 72ffad82c279080dd9320d45dda26d64ffb4626f /tests/FunctionalTests/tickets | |
parent | 966fd66f217911d079c4bd6a87b09f4a0c5c4736 (diff) |
Merge Branches & Trunk
/trunk:r2680,2692,2707-2736
/branches/3.1:r2682-2686,2694-2702,2705,2738-2762
Diffstat (limited to 'tests/FunctionalTests/tickets')
3 files changed, 57 insertions, 0 deletions
diff --git a/tests/FunctionalTests/tickets/protected/pages/Issue216.page b/tests/FunctionalTests/tickets/protected/pages/Issue216.page new file mode 100644 index 00000000..2efff728 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Issue216.page @@ -0,0 +1,15 @@ +<com:TContent ID="Content">
+ <h1>TTabPanel doesn't preserve active tab on callback request</h1>
+
+ <com:TTabPanel id="tabpanel">
+ <com:TTabView id="tab1" Caption="Tab 1">
+ <p>This is Tab 1</p>
+ </com:TTabView>
+ <com:TTabView id="tab2" Caption="Tab 2">
+ <p>This is Tab 2</p>
+ </com:TTabView>
+ </com:TTabPanel>
+
+ <com:TActiveButton id="btn1" OnCallback="buttonClickCallback" Text ="Click me"/>
+ <com:TActiveLabel id="result"/>
+</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Issue216.php b/tests/FunctionalTests/tickets/protected/pages/Issue216.php new file mode 100644 index 00000000..15491e2e --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Issue216.php @@ -0,0 +1,14 @@ +<?php
+Prado::using('System.Web.UI.ActiveControls.*');
+
+class Issue216 extends TPage
+{
+ public function buttonClickCallback($sender, $param)
+ {
+
+ $this->result->setText('Tab ActiveIndex is : '.$this->tabpanel->ActiveViewIndex);
+
+ }
+}
+
+?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Issue216TestCase.php b/tests/FunctionalTests/tickets/tests/Issue216TestCase.php new file mode 100644 index 00000000..1cfdf0cd --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Issue216TestCase.php @@ -0,0 +1,28 @@ +<?php
+
+class Issue216TestCase extends SeleniumTestCase
+{
+ function test()
+ {
+ $this->open('tickets/index.php?page=Issue216');
+ $this->assertTextPresent('TTabPanel doesn\'t preserve active tab on callback request');
+
+ $this->assertVisible('ctl0_Content_tab1');
+
+ $this->click("ctl0_Content_btn1");
+ $this->pause(800);
+
+ $this->assertText("ctl0_Content_result", "Tab ActiveIndex is : 0");
+
+ $this->click("ctl0_Content_tab2_0");
+ $this->pause(800);
+
+ $this->assertVisible('ctl0_Content_tab2');
+
+ $this->click("ctl0_Content_btn1");
+ $this->pause(800);
+ $this->assertText("ctl0_Content_result", "Tab ActiveIndex is : 1");
+ }
+}
+
+?>
\ No newline at end of file |