From f2927a652e6e1afa8a22f472a4765dcc418d341e Mon Sep 17 00:00:00 2001 From: tof <> Date: Fri, 14 Mar 2008 18:05:19 +0000 Subject: Added Testcase for #669 --- .../tickets/protected/pages/Ticket669.page | 71 ++++++++++++++++++++++ .../tickets/protected/pages/Ticket669.php | 36 +++++++++++ .../tickets/tests/Ticket669TestCase.php | 48 +++++++++++++++ 3 files changed, 155 insertions(+) create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket669.page create mode 100644 tests/FunctionalTests/tickets/protected/pages/Ticket669.php create mode 100644 tests/FunctionalTests/tickets/tests/Ticket669TestCase.php (limited to 'tests/FunctionalTests') 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 @@ + +
+
+
+
+ + + + +1 - Test without callback +
+<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>
+
+ +
+ + + + + + +
+ +2 - Test callback with 2nd ActivePanel +
+<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>
+
+
+ + + + + + + + + + +
+ + +3 - Test callback without 2nd ActivePanel +
+<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>
+
+
+ + + + + + +
+
+
+
\ 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 @@ +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 @@ +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 -- cgit v1.2.3