diff options
-rw-r--r-- | .gitattributes | 1 | ||||
-rw-r--r-- | tests/FunctionalTests/tickets/protected/pages/Ticket669.page | 71 | ||||
-rw-r--r-- | tests/FunctionalTests/tickets/protected/pages/Ticket669.php | 36 | ||||
-rw-r--r-- | tests/FunctionalTests/tickets/tests/Ticket669TestCase.php | 48 |
4 files changed, 156 insertions, 0 deletions
diff --git a/.gitattributes b/.gitattributes index 00918633..583764d6 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2998,6 +2998,7 @@ tests/FunctionalTests/tickets/protected/pages/Ticket653/Layout.tpl -text 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/Ticket669.page -text tests/FunctionalTests/tickets/protected/pages/Ticket670.page -text tests/FunctionalTests/tickets/protected/pages/Ticket671.page -text tests/FunctionalTests/tickets/protected/pages/Ticket671_reopened.page -text diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket669.page b/tests/FunctionalTests/tickets/protected/pages/Ticket669.page new file mode 100644 index 00000000..9f7e6cf8 --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket669.page @@ -0,0 +1,71 @@ +<com:TContent id="Content"> +<com:THyperLink Text="1 - Test without callback" NavigateUrl="<%= $_SERVER['REQUEST_URI'] %>" /><br /> +<com:TActiveLinkButton Text="2 - Test callback with 2nd ActivePanel" OnCallback="Page.load1" /><br /> +<com:TActiveLinkButton Text="3 - Test callback without 2nd ActivePanel" OnCallback="Page.load2" /><br /> +<hr /> + +<com:TActivePanel ID="panel1" Style="padding: 5px" GroupingText="panel1"> +<com:TMultiView ID="multiView" ActiveViewIndex="0"> +<com:TView> +1 - Test without callback +<pre style="color:#006600"> +<com:TActivePanel ID="panel2"> + <com:TActiveTextBox ID="tb1" Columns="30" Text="ActiveTextBox" /> + <com:TActivePanel ID="panel3"> + <com:TTextBox ID="tb2" Columns="30" Text="TextBox in ActivePanel" /> + </com:TActivePanel> +</com:TActivePanel> +</pre> + + <com:TActiveButton Text="Test" OnCallback="Page.test1" /><br /> + <com:TActivePanel ID="panel2" GroupingText="panel2"> + <com:TActiveTextBox ID="tb1" Columns="30" Text="ActiveTextBox" /> + <com:TActivePanel ID="panel3" Style="padding: 5px" GroupingText="panel3"> + <com:TTextBox ID="tb2" Columns="30" Text="TextBox in ActivePanel" /> + </com:TActivePanel> + </com:TActivePanel> +</com:TView> +<com:TView> +2 - Test callback with 2nd ActivePanel +<pre style="color:#006600"> +<com:TActivePanel ID="panel4"> + <com:TActiveTextBox ID="tb3" Columns="30" Text="ActiveTextBox" /> + <com:TActivePanel ID="panel5"> + <com:TTextBox ID="tb4" Columns="30" Text="TextBox in ActivePanel" /> + </com:TActivePanel> +</com:TActivePanel> +</pre> +<com:TActiveButton Text="Test" OnCallback="Page.test2" /><br /> +<com:TActivePanel ID="panel4" Style="padding: 5px" GroupingText="panel4" > + <com:TActiveTextBox ID="tb3" Columns="30" Text="ActiveTextBox" /> + <com:TActivePanel ID="panel5" Style="padding: 5px" GroupingText="panel5"> + <com:TTextBox ID="tb4" Columns="30" Text="TextBox in ActivePanel" /> + <com:TActivePanel ID="panel6" Style="padding: 5px" GroupingText="panel6"> + <com:TTextBox ID="tb5" Columns="30" Text="TextBox in ActivePanel" /> + + </com:TActivePanel> + </com:TActivePanel> +</com:TActivePanel> +</com:TView> + +<com:TView> +3 - Test callback without 2nd ActivePanel +<pre style="color:#006600"> +<com:TActivePanel ID="panel6"> + <com:TActiveTextBox ID="tb5" Columns="30" Text="ActiveTextBox" /> + <com:TPanel ID="panel7"> + <com:TTextBox ID="tb6" Columns="30" Text="TextBox in Panel" /> + </com:TPanel> +</com:TActivePanel> +</pre> +<com:TActiveButton Text="Test" OnCallback="Page.test3" /><br /> +<com:TActivePanel ID="panel7" Style="padding: 5px" GroupingText="panel7"> + <com:TActiveTextBox ID="tb6" Columns="30" Text="ActiveTextBox" /> + <com:TPanel ID="panel8" Style="padding: 5px" GroupingText="panel8"> + <com:TTextBox ID="tb7" Columns="30" Text="TextBox in Panel" /> + </com:TPanel> +</com:TActivePanel> +</com:TView> +</com:TMultiView> +</com:TActivePanel> +</com:TContent>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/protected/pages/Ticket669.php b/tests/FunctionalTests/tickets/protected/pages/Ticket669.php new file mode 100644 index 00000000..0131d95c --- /dev/null +++ b/tests/FunctionalTests/tickets/protected/pages/Ticket669.php @@ -0,0 +1,36 @@ +<?php +prado::using ('System.Web.UI.ActiveControls.*'); +class Ticket669 extends TPage +{ + public function load1($sender,$param) + { + $this->multiView->setActiveViewIndex(1); + $this->panel1->render($param->getNewWriter()); + } + public function load2($sender,$param) + { + $this->multiView->setActiveViewIndex(2); + $this->panel1->render($param->getNewWriter()); + } + public function test1($sender,$param) + { + $this->tb1->setText($this->tb1->getText().' +1'); + $this->tb2->setText($this->tb2->getText().' +1'); + $this->panel2->render($param->getNewWriter()); + } + public function test2($sender,$param) + { + $this->tb3->setText($this->tb3->getText().' +1'); + $this->tb4->setText($this->tb4->getText().' +1'); + $this->tb5->setText($this->tb5->getText().' +1'); + $this->panel4->render($param->getNewWriter()); + } + public function test3($sender,$param) + { + $this->tb6->setText($this->tb6->getText().' +1'); + $this->tb7->setText($this->tb7->getText().' +1'); + $this->panel7->render($param->getNewWriter()); + } +} + +?>
\ No newline at end of file diff --git a/tests/FunctionalTests/tickets/tests/Ticket669TestCase.php b/tests/FunctionalTests/tickets/tests/Ticket669TestCase.php new file mode 100644 index 00000000..c3c2fa5d --- /dev/null +++ b/tests/FunctionalTests/tickets/tests/Ticket669TestCase.php @@ -0,0 +1,48 @@ +<?php +class Ticket669TestCase extends SeleniumTestCase +{ + function test() + { + $base = 'ctl0_Content_'; + $this->open('tickets/index.php?page=Ticket669'); + $this->assertTitle("Verifying Ticket 669"); + + $this->assertTextPresent('1 - Test without callback'); + $this->assertValue($base.'tb1', 'ActiveTextBox'); + $this->assertValue($base.'tb2', 'TextBox in ActivePanel'); + + $this->click($base.'ctl4'); + $this->pause(800); + $this->assertValue($base.'tb1', 'ActiveTextBox +1'); + $this->assertValue($base.'tb2', 'TextBox in ActivePanel +1'); + + $this->click($base.'ctl1'); + $this->pause(800); + $this->assertTextPresent('2 - Test callback with 2nd ActivePanel'); + $this->assertValue($base.'tb3', 'ActiveTextBox'); + $this->assertValue($base.'tb4', 'TextBox in ActivePanel'); + $this->assertValue($base.'tb5', 'TextBox in ActivePanel'); + + $this->click($base.'ctl6'); + $this->pause(800); + + $this->assertValue($base.'tb3', 'ActiveTextBox +1'); + $this->assertValue($base.'tb4', 'TextBox in ActivePanel +1'); + $this->assertValue($base.'tb5', 'TextBox in ActivePanel +1'); + + $this->click($base.'ctl2'); + $this->pause(800); + $this->assertTextPresent('3 - Test callback without 2nd ActivePanel'); + $this->assertValue($base.'tb6', 'ActiveTextBox'); + $this->assertValue($base.'tb7', 'TextBox in Panel'); + + $this->click($base.'ctl8'); + $this->pause(800); + + $this->assertValue($base.'tb6', 'ActiveTextBox +1'); + $this->assertValue($base.'tb7', 'TextBox in Panel +1'); + + } + +} +?>
\ No newline at end of file |